Skip to content

Commit

Permalink
test: Non-regression test for mamba-org#3699
Browse files Browse the repository at this point in the history
Signed-off-by: Julien Jerphanion <[email protected]>
  • Loading branch information
jjerphan committed Jan 8, 2025
1 parent 799506c commit 126d52d
Showing 1 changed file with 66 additions and 0 deletions.
66 changes: 66 additions & 0 deletions micromamba/tests/test_create.py
Original file line number Diff line number Diff line change
Expand Up @@ -1575,3 +1575,69 @@ def test_update_spec_list(tmp_path):
out = helpers.create("-p", env_prefix, "-f", env_spec_file, "--dry-run")

assert update_specs_list in out.replace("\r", "")


def test_glob_in_build_string(tmp_path):
# Non-regression test for https://github.com/mamba-org/mamba/issues/3699
env_prefix = tmp_path / "test_glob_in_build_string"

# Export CONDA_OVERRIDE_GLIBC=2.17 to force the solver to use the glibc 2.17 package
os.environ["CONDA_OVERRIDE_GLIBC"] = "2.17"

pytorch_match_spec = "pytorch=2.3.1=py3.10_cuda11.8*"

pytorch_build_package_info = {
"build": "py3.10_cuda11.8_cudnn8.7.0_0",
"build_number": 0,
"build_string": "py3.10_cuda11.8_cudnn8.7.0_0",
"channel": "pytorch",
"constrains": ["cpuonly <0"],
"depends": [
"typing_extensions",
"filelock",
"jinja2",
"networkx",
"sympy",
"pyyaml",
"pytorch-mutex 1.0 cuda",
"mkl >=2018",
"blas * mkl",
"python >=3.10,<3.11.0a0",
"llvm-openmp <16",
"pytorch-cuda >=11.8,<11.9",
"torchtriton 2.3.1",
],
"fn": "pytorch-2.3.1-py3.10_cuda11.8_cudnn8.7.0_0.tar.bz2",
"license": "BSD 3-Clause",
"md5": "eb00b4790822b082179cc5cee67d934f",
"name": "pytorch",
"sha256": "3b49061de3e481fc684d463d68aae93d87aff35e715730c72431249d877c1ec9",
"size": 1673590592,
"subdir": "linux-64",
"timestamp": 1716914789,
"track_features": "",
"url": "https://conda.anaconda.org/pytorch/linux-64/pytorch-2.3.1-py3.10_cuda11.8_cudnn8.7.0_0.tar.bz2",
"version": "2.3.1",
}

# Should run without error
out = helpers.create(
"-p",
env_prefix,
pytorch_match_spec,
"-c",
"pytorch",
"-c",
"nvidia/label/cuda-11.8.0",
"-c",
"nvidia",
"-c",
"conda-forge",
"--platform",
"linux-64",
"--dry-run",
"--json",
)

# Check that python 2.3.1 py3.10_cuda11.8_cudnn8.7.0_0 is in the package list
assert pytorch_build_package_info in out["actions"]["FETCH"]

0 comments on commit 126d52d

Please sign in to comment.