зеркало из https://github.com/mozilla/bugbug.git
Allow overriding the version of bugbug used while building the HTTP service worker image (#1345)
* Prioritize the TAG environment variable over the bugbug package version * Allow overriding the version of bugbug used while building the HTTP service worker image
This commit is contained in:
Родитель
22b27b97b0
Коммит
b72e96b269
|
@ -202,10 +202,12 @@ def get_last_modified(url):
|
|||
|
||||
|
||||
def download_model(model_name):
|
||||
try:
|
||||
version = f"v{get_bugbug_version()}"
|
||||
except DistributionNotFound:
|
||||
version = os.getenv("TAG", "latest")
|
||||
version = os.getenv("TAG")
|
||||
if not version:
|
||||
try:
|
||||
version = f"v{get_bugbug_version()}"
|
||||
except DistributionNotFound:
|
||||
version = "latest"
|
||||
|
||||
path = f"{model_name}model"
|
||||
url = f"https://community-tc.services.mozilla.com/api/index/v1/task/project.relman.bugbug.train_{model_name}.{version}/artifacts/public/{path}.zst"
|
||||
|
|
|
@ -16,6 +16,9 @@ WORKDIR /code/
|
|||
ARG CHECK_MODELS
|
||||
ENV CHECK_MODELS="${CHECK_MODELS}"
|
||||
|
||||
ARG TAG
|
||||
ENV TAG="${TAG}"
|
||||
|
||||
RUN bash /code/http_service/ensure_models.sh
|
||||
|
||||
CMD bugbug-http-worker high default low
|
||||
|
|
Загрузка…
Ссылка в новой задаче