Skip to content

Commit

Permalink
Force environment name when installing from spec file (#1809)
Browse files Browse the repository at this point in the history
* Force environment name when installing from spec file

* Update expected image hash
  • Loading branch information
mwaskom authored May 9, 2024
1 parent 36b4a67 commit d6d1c39
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion modal/image.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
Expand Down
2 changes: 1 addition & 1 deletion test/image_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit d6d1c39

Please sign in to comment.