conda-forge / cuda-version-feedstock

A conda-smithy repository for cuda-version.
BSD 3-Clause "New" or "Revised" License
2 stars 6 forks source link

cuda-version>12 tries to pull cudatoolkit>12 #14

Closed RaulPPelaez closed 9 months ago

RaulPPelaez commented 10 months ago

Solution to issue cannot be found in the documentation.

Issue

I am trying to install CUDA 12 in an environment which has cudatoolkit (11.8) installed. In particular, I am expecting this sequence to work:

$ mamba create -n test cudatoolkit 

Looking for: ['cudatoolkit']

conda-forge/linux-64                                        Using cache
conda-forge/noarch                                          Using cache
Transaction

  Prefix: /home/raul/miniforge3/envs/test

  Updating specs:

   - cudatoolkit

  Package          Version  Build        Channel           Size
─────────────────────────────────────────────────────────────────
  Install:
─────────────────────────────────────────────────────────────────

  + _libgcc_mutex      0.1  conda_forge  conda-forge     Cached
  + libstdcxx-ng    13.2.0  h7e041cc_3   conda-forge     Cached
  + libgomp         13.2.0  h807b86a_3   conda-forge     Cached
  + _openmp_mutex      4.5  2_gnu        conda-forge     Cached
  + libgcc-ng       13.2.0  h807b86a_3   conda-forge     Cached
  + cudatoolkit     11.8.0  h4ba93d1_12  conda-forge     Cached

  Summary:

  Install: 6 packages

  Total download: 0 B

─────────────────────────────────────────────────────────────────

Confirm changes: [Y/n] y

Downloading and Extracting Packages:

Preparing transaction: done
Verifying transaction: done
Executing transaction: / By downloading and using the CUDA Toolkit conda packages, you accept the terms and conditions of the CUDA End User License Agreement (EULA): https://docs.nvidia.com/cuda/eula/index.html

done

To activate this environment, use

     $ mamba activate test

To deactivate an active environment, use

     $ mamba deactivate

$ mamba activate test
$ mamba install "cuda-version>12"

Looking for: ["cuda-version[version='>12']"]

conda-forge/linux-64                                        Using cache
conda-forge/noarch                                          Using cache
Could not solve for environment specs
The following packages are incompatible
├─ cuda-version >12  is installable with the potential options
│  ├─ cuda-version 12.1 would require
│  │  └─ cudatoolkit 12.1|12.1.* , which can be installed;
│  └─ cuda-version 12.2 would require
│     └─ cudatoolkit 12.2|12.2.* , which can be installed;
└─ cudatoolkit is not installable because it conflicts with any installable versions previously reported.

I would expect cudatoolkit>11.8 to be a metapackage depending on, for instance, the "cuda" package. Maybe this is intended behavior?

Installed packages

N/A

Environment info

N/A
leofang commented 10 months ago

For CUDA >= 12, there's no cudatoolkit. It was the mega package (containing only runtime libraries) that we used for CUDA <= 11. The meta package that you seek is now named as cuda-toolkit.

jakirkham commented 10 months ago

Would recommend not explicitly installing the cudatoolkit package for the reason Leo mentioned

Instead would explicitly install the cuda-version package with the intended version and any other packages that you would like. For example

conda create -n cupy python=3.10 cuda-version=11.8 cupy -y
conda activate cupy
conda install cuda-version=12.2 -y

This way Conda understands cudatoolkit is an implicit dependency (pulled in by other packages) and won't try to include cudatoolkit to satisfy the solve

Also as cuda-version is built for all CUDA versions conda-forge had supported. It can be used across the CUDA 11/12 divide easily

Hope that helps

RaulPPelaez commented 10 months ago

Thanks guys. Your commands do not work for me. I am trying to install a package that depends on cudatoolkit in its cuda 11.8 version, for instance:

mamba create -n test cupy cuda-version=11.8

Then, when I try to update cuda-version:

$ mamba install "cuda-version>12"

Looking for: ["cuda-version[version='>12']"]

conda-forge/linux-64                                        Using cache
conda-forge/noarch                                          Using cache

Pinned packages:
  - python 3.12.*

Could not solve for environment specs
The following packages are incompatible
├─ cuda-version >12  is installable with the potential options
│  ├─ cuda-version 12.1 would require
│  │  └─ cudatoolkit 12.1|12.1.* , which can be installed;
│  └─ cuda-version 12.2 would require
│     └─ cudatoolkit 12.2|12.2.* , which can be installed;
└─ cudatoolkit is not installable because it conflicts with any installable versions previously reported.
RaulPPelaez commented 10 months ago

Actually your commands work when using conda, the culprit is mamba.

RaulPPelaez commented 10 months ago

I opened an issue at mamba to address this https://github.com/mamba-org/mamba/issues/3120

jakirkham commented 9 months ago

Yep had tested these with Conda. Interesting to know Mamba has a bug. Let's follow up there

Will close this out as answered. We can track the upstream issue