diff --git a/modal/image.py b/modal/image.py index fe2b95734..6113bd8d3 100644 --- a/modal/image.py +++ b/modal/image.py @@ -1082,7 +1082,7 @@ def build_dockerfile(version: ImageBuilderVersion) -> DockerfileSpec: space = " " if package_args else "" remote_spec_file = "" if spec_file is None else f"/{os.path.basename(spec_file)}" - file_arg = "" if spec_file is None else f"{space}-f {remote_spec_file}" + file_arg = "" if spec_file is None else f"{space}-f {remote_spec_file} -n base" copy_commands = [] if spec_file is None else [f"COPY {remote_spec_file} {remote_spec_file}"] commands = [ diff --git a/test/image_test.py b/test/image_test.py index cda12eeb1..983954d45 100644 --- a/test/image_test.py +++ b/test/image_test.py @@ -932,7 +932,7 @@ def get_hash(img: Image) -> str: spec_file=test_dir / "supports" / "test-conda-environment.yml", channels=["conda-forge", "my-channel"], ) - assert get_hash(img) == "cf6c956e7639afb51dcc46d98eb9aabb6472c0751ada28f41d2e7ad88275b9a0" + assert get_hash(img) == "d9d4c9fe24769ce587877b9752a64486e8f7d8520731110bd2fa666de82f43fd" img = base.poetry_install_from_file( test_dir / "supports" / "test-pyproject.toml",