Skip to content

Commit

Permalink
Custom docker registry only for supervisely images (#89)
Browse files Browse the repository at this point in the history
  • Loading branch information
NikolaiPetukhov authored Sep 24, 2024
1 parent 0162624 commit 197ae30
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion agent/worker/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -646,7 +646,9 @@ def update_base_layers(self):
pulled = []
for image in constants.BASE_IMAGES():
try:
if constants.SLY_APPS_DOCKER_REGISTRY() is not None:
if constants.SLY_APPS_DOCKER_REGISTRY() is not None and image.startswith(
"supervisely/"
):
self.logger.info(
"NON DEFAULT DOCKER REGISTRY: docker image {!r} is replaced with {!r}".format(
image,
Expand Down
4 changes: 3 additions & 1 deletion agent/worker/task_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,9 @@ def read_dockerimage_from_config(self):
f'Dockerimage not found in config.json, so it is set to default: {self.info["docker_image"]}'
)

if constants.SLY_APPS_DOCKER_REGISTRY() is not None:
if constants.SLY_APPS_DOCKER_REGISTRY() is not None and self.info[
"docker_image"
].startswith("supervisely/"):
self.logger.info(
"NON DEFAULT DOCKER REGISTRY: docker image {!r} is replaced with {!r}".format(
self.info["docker_image"],
Expand Down

0 comments on commit 197ae30

Please sign in to comment.