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

Update Dockerfile to enable CUDA pytorch #760

Merged
merged 1 commit into from
May 9, 2024

Conversation

Fmstrat
Copy link
Contributor

@Fmstrat Fmstrat commented Apr 12, 2024

With the current Docker build, conda defaults to installing pytorch in CPU mode despite the use of pytorch and nvidia channels. This may be a change in how conda handles package relationships. The below command adjustment passes in the specific version numbers, which ensures that conda recognizes the use of pytorch-cuda as related, and properly installs the CUDA version of pytorch.

This can be validated after-the-fact with starting the container and running:

cd /app
conda activate tortoise
python -c "import torch; print(torch.cuda.is_available());torch.zeros(1).cuda()"

The current image returns an error, while after this PR, returns "True".

Note: This also updates CUDA in pytorch to 12.1 to better align to the CUDA docker image being used as the base.

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

Successfully merging this pull request may close these issues.

2 participants