Fixed gpu+cpu-based installation requirements #586
Fixed gpu+cpu-based installation requirements #586tesfaldet wants to merge 1 commit intoashleve:mainfrom
Conversation
… requirements.txt.
|
Tests can be fixed from this PR #585 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #586 +/- ##
=======================================
Coverage 83.66% 83.66%
=======================================
Files 11 11
Lines 355 355
=======================================
Hits 297 297
Misses 58 58 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| --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) |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
What does this PR do?
Fixes gpu+cpu-based installation requirements in environment.yaml (conda-based install) and requirements.txt (pip-based install). Specifically, a gpu+cpu-based installation is assumed as the default method, and so for environment.yaml the necessary channels are added as well as the
pytorch-cudapackage. There's also an option for a cpu-only install. Similarly for a pip-based install, requirements.txt has the--extra-index-urlspecifier for specifying a gpu+cpu-based install or a cpu-only install, as taken from https://pytorch.org/get-started/locally/.Before submitting
pytestcommand?pre-commit run -acommand?Did you have fun?
yus