Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Specifying conda channels for matching / CUDA torch versions #223

Open
asarnow opened this issue Jan 29, 2025 · 2 comments
Open

Specifying conda channels for matching / CUDA torch versions #223

asarnow opened this issue Jan 29, 2025 · 2 comments

Comments

@asarnow
Copy link

asarnow commented Jan 29, 2025

I'm creating environments for several different versions of topaz (including 0.3.7) and I've noticed that with a command like:

mamba create -n topaz python=3.11 topaz fsspec pytorch-cuda=11.8 -c tbepler -c pytorch -c nvidia

then some packages like torchvision are installed from conda base or conda-forge and not pytorch. I used the pytorch::package syntax to make sure the pytorch version with the matching CUDA are installed. I've seen it for torchvision and the base pytorch package (even though the correct pytorch-cuda from pytorch was installed).

Something like the command below seem to correct it. I'm not sure if this is my mistake, the environment solver, or the way the dependencies are listed in the topaz meta.yaml, but perhaps this will help others if they run into the issue.

mamba install python=3.11 topaz=0.2.5 'pytorch::pytorch<=2.3.1' 'pytorch::pytorch-cuda=11.8' 'pytorch::torchvision' -c tbepler -c pytorch -c nvidia

The cuda-version metapackage seems to end up at 12.8 but correcting that seems unimportant so far.

@DarnellGranberry
Copy link
Collaborator

Is this using fresh environments that have never used conda-forge? I think if you've installed something from there, the channel remains on your list channels to search from.

@asarnow
Copy link
Author

asarnow commented Jan 29, 2025

Ah, I see. It's caused by using miniforge, then: conda-forge is always on the list.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants