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

Fixed gpu+cpu-based installation requirements #586

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions environment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ name: myenv

channels:
- pytorch
- nvidia # comment this out if using cpuonly
- conda-forge
- defaults

Expand All @@ -20,8 +21,12 @@ channels:
# users, but allows for different minor and patch versions of packages where backwards
# compatibility is usually guaranteed

# Note: this is assuming a Linux-based installation, for other platforms see https://pytorch.org/get-started/locally/

dependencies:
- pytorch=2.*
- pytorch-cuda=11.8 # comment this out if using cpuonly
# - cpuonly # uncomment if you want a cpu-only installation
- torchvision=0.*
- lightning=2.*
- torchmetrics=0.*
Expand Down
4 changes: 4 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# Note: this is assuming a Linux-based installation, for other platforms see https://pytorch.org/get-started/locally/

# --------- pytorch --------- #
--extra-index-url https://download.pytorch.org/whl/cu118 # gpu+cpu installation (comment this line if doing cpu-only)
# --extra-index-url https://download.pytorch.org/whl/cpu # cpu-only installation (uncomment line if doing cpu-only)
Comment on lines +4 to +5
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking at the https://pytorch.org/get-started/locally/, only cuda 11.8 requires those lines, while 11.7 doesn't, and 11.7 is set as default when installing through normal pip install torch.

I think there's not much point in trying to maintain those instructions for requirements.txt as they seem to regulary change every couple of weeks/months. I would rather just leave this file simple and let people figure out what they need by themselves

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah you're right. Perhaps I can add a comment that at least notifies the user of this, so it's not too painful for them to modify requirements.txt or environment.yaml

torch>=2.0.0
torchvision>=0.15.0
lightning>=2.0.0
Expand Down
Loading