mirror of
https://github.com/nexus-stc/hyperboria
synced 2024-12-02 16:02:53 +01:00
43be16e4bc
- [nexus] Remove outdated protos - [nexus] Development - [nexus] Development - [nexus] Development - [nexus] Development - [nexus] Development - [nexus] Refactor views - [nexus] Update aiosumma - [nexus] Add tags - [nexus] Development - [nexus] Update repository - [nexus] Update repository - [nexus] Update dependencies - [nexus] Update dependencies - [nexus] Fixes for MetaAPI - [nexus] Support for new queries - [nexus] Adopt new versions of search - [nexus] Improving Nexus - [nexus] Various fixes - [nexus] Add profile - [nexus] Fixes for ingestion - [nexus] Refactorings and bugfixes - [idm] Add profile methods - [nexus] Fix stalled nexus-meta bugs - [nexus] Various bugfixes - [nexus] Restore IDM API functionality GitOrigin-RevId: a0842345a6dde5b321279ab5510a50c0def0e71a
105 lines
2.3 KiB
Python
105 lines
2.3 KiB
Python
load("@io_bazel_rules_docker//python:image.bzl", "py_layer")
|
|
load("@io_bazel_rules_docker//python3:image.bzl", "py3_image")
|
|
load("@io_bazel_rules_docker//container:container.bzl", "container_push")
|
|
|
|
load("@pip_modules//:requirements.bzl", "requirement")
|
|
|
|
alias(
|
|
name = "binary",
|
|
actual = ":image.binary",
|
|
visibility = ["//visibility:public"],
|
|
)
|
|
|
|
DEPS = [
|
|
requirement("aiochclient"),
|
|
requirement("aiohttp"),
|
|
requirement("aiosumma"),
|
|
requirement("cachetools"),
|
|
requirement("en_core_web_sm"),
|
|
requirement("grpcio"),
|
|
requirement("lightgbm"),
|
|
requirement("numpy"),
|
|
requirement("protobuf"),
|
|
requirement("recordclass"),
|
|
requirement("uvloop"),
|
|
"//library/aiogrpctools",
|
|
requirement("aiokit"),
|
|
"//library/aiopostgres",
|
|
"//library/configurator",
|
|
"//library/logging",
|
|
"//nexus/meta_api/proto:grpc_py",
|
|
"//nexus/models/proto:proto_py",
|
|
"//nexus/views/telegram",
|
|
requirement("izihawa_nlptools"),
|
|
]
|
|
|
|
py_layer(
|
|
name = "common_deps",
|
|
filter = "//pkg/common",
|
|
deps = DEPS,
|
|
)
|
|
|
|
py_layer(
|
|
name = "common_external_deps",
|
|
filter = "@",
|
|
deps = [":common_deps"],
|
|
)
|
|
|
|
py_layer(
|
|
name = "external_deps",
|
|
filter = "@",
|
|
deps = DEPS,
|
|
)
|
|
|
|
py3_image(
|
|
name = "image",
|
|
srcs = glob(
|
|
["**/*.py"],
|
|
exclude = ["proto/**/*.py"],
|
|
),
|
|
base = "//images/production:base-python-image",
|
|
data = [
|
|
"configs/base.yaml",
|
|
"configs/logging.yaml",
|
|
"models/classic.txt",
|
|
],
|
|
layers = [
|
|
":common_external_deps",
|
|
":common_deps",
|
|
":external_deps",
|
|
],
|
|
main = "main.py",
|
|
srcs_version = "PY3ONLY",
|
|
visibility = ["//visibility:public"],
|
|
deps = DEPS,
|
|
)
|
|
|
|
py_binary(
|
|
name = "cli",
|
|
srcs = ["cli.py"],
|
|
main = "cli.py",
|
|
deps = [
|
|
requirement("fire"),
|
|
"//nexus/meta_api/aioclient",
|
|
],
|
|
)
|
|
|
|
|
|
container_push(
|
|
name = "push-public-latest",
|
|
format = "Docker",
|
|
image = ":image",
|
|
registry = "registry.hub.docker.com",
|
|
repository = "thesuperpirate/nexus-meta-api",
|
|
tag = "latest",
|
|
)
|
|
|
|
container_push(
|
|
name = "push-public-testing",
|
|
format = "Docker",
|
|
image = ":image",
|
|
registry = "registry.hub.docker.com",
|
|
repository = "thesuperpirate/nexus-meta-api",
|
|
tag = "testing",
|
|
)
|