Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR updates the GPU container by switching its base from a CUDA container to a PyTorch container to better manage CUDA dependencies and adjusts the UID to 1000 to prevent permission issues.
- Updated sample_main.py to print additional CUDA and cuDNN version info for debugging purposes.
- Changed the target Python version from 3.9 to 3.11 in pyproject.toml for improved compatibility.
Reviewed Changes
Copilot reviewed 2 out of 5 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/sample_pytorch_gpu_project/sample_main.py | Added print statements to output CUDA and cuDNN version details. |
| pyproject.toml | Updated target-version from py39 to py311. |
Files not reviewed (3)
- notebooks/.devcontainer/Dockerfile: Language not supported
- src/sample_cpu_project/.devcontainer/Dockerfile: Language not supported
- src/sample_pytorch_gpu_project/.devcontainer/Dockerfile: Language not supported
bhavikm
reviewed
Mar 31, 2025
bhavikm
approved these changes
Mar 31, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
This PR updates base container of sample_pytorch_gpu_project from cuda container to pytorch container.
As discussed in this thread (https://discuss.pytorch.org/t/cannot-for-the-life-of-me-get-pytorch-and-cuda-to-install-work/197088/5?utm_source=chatgpt.com), when you install gpu version of pytorch wheel, it installs necessary cuda dependencies and even if local environment has another cuda installed, it won't be used. That means using cuda container as base doesn't have any benefits.
In addition to that, across all containers in this repo, UID will be switched back to 1000. Using 1010 was causing permission issues for linux as covered in this page
https://code.visualstudio.com/remote/advancedcontainers/add-nonroot-user
Tests
New GPU container was tested on linux GPU machine
both
nvidia-smiandpython sample_main.pyworkedDoes this introduce a breaking change?
Author pre-publish checklist
Pull Request Type
What kind of change does this Pull Request introduce?