Skip to content

Commit

Permalink
resolve
Browse files Browse the repository at this point in the history
  • Loading branch information
kramstrom committed Nov 28, 2024
1 parent fca511b commit 7cbd0e1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions modal/image.py
Original file line number Diff line number Diff line change
Expand Up @@ -465,8 +465,6 @@ def _from_args(
_namespace: "api_pb2.DeploymentNamespace.ValueType" = api_pb2.DEPLOYMENT_NAMESPACE_WORKSPACE,
_do_assert_no_mount_layers: bool = True,
):
context_mount = context_mount_function() if modal.is_local() and context_mount_function else None

if base_images is None:
base_images = {}

Expand All @@ -488,13 +486,15 @@ def _deps() -> Sequence[_Object]:
deps = tuple(base_images.values()) + tuple(secrets)
if build_function:
deps += (build_function,)
if context_mount:
deps += (context_mount,)
if image_registry_config and image_registry_config.secret:
deps += (image_registry_config.secret,)
return deps

async def _load(self: _Image, resolver: Resolver, existing_object_id: Optional[str]):
context_mount = context_mount_function() if context_mount_function else None
if context_mount:
await resolver.load(context_mount)

if _do_assert_no_mount_layers:
for image in base_images.values():
# base images can't have
Expand Down

0 comments on commit 7cbd0e1

Please sign in to comment.