Skip to content

Commit

Permalink
Add tag for images from PrebuiltWorkerConfig
Browse files Browse the repository at this point in the history
  • Loading branch information
kiendang committed May 16, 2024
1 parent 749bc1e commit f2c4d5c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions packages/syft/src/syft/service/worker/worker_image_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import pydantic

# relative
from ...custom_worker.config import PrebuiltWorkerConfig
from ...custom_worker.config import WorkerConfig
from ...custom_worker.k8s import IN_KUBERNETES
from ...serde.serializable import serializable
Expand Down Expand Up @@ -49,6 +50,11 @@ def submit_container_image(
worker_image = SyftWorkerImage(
config=worker_config,
created_by=context.credentials,
image_identifier=(
SyftWorkerImageIdentifier.from_str(worker_config.tag)
if isinstance(worker_config, PrebuiltWorkerConfig)
else None
),
)
res = self.stash.set(context.credentials, worker_image)

Expand Down
2 changes: 1 addition & 1 deletion tests/integration/container_workload/pool_image_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ def test_pool_launch(

# Submit Worker Image
worker_config, docker_tag = (
(PrebuiltWorkerConfig(tag=(_tag := "docker.io/python:3-slim")), _tag)
(PrebuiltWorkerConfig(tag=(_tag := "docker.io/library/python:3-slim")), _tag)
if prebuilt
else make_docker_config_test_case("opendp")
)
Expand Down

0 comments on commit f2c4d5c

Please sign in to comment.