Skip to content

Commit

Permalink
pdm install with cpu torch
Browse files Browse the repository at this point in the history
  • Loading branch information
leifdenby committed Jun 3, 2024
1 parent 2f6a87a commit 143cf2a
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 2,019 deletions.
13 changes: 9 additions & 4 deletions .github/workflows/ci-pdm-install-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,19 @@ jobs:
uses: actions/checkout@v2

- name: Install pdm
uses: pdm-project/setup-pdm@v4
with:
python-version: "3.10"
cache: true
run: |
python -m pip install pdm
- name: Create venv
run: |
pdm venv create --with-pip
pdm use --venv in-project
- name: Install torch (CPU)
run: |
python -m pip install torch --index-url https://download.pytorch.org/whl/cpu
# check that the CPU version is installed
python -c "import torch; assert torch.__version__.endswith('+gpu')"
- name: Install package (including dev dependencies)
run: |
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -76,3 +76,5 @@ tags

# pdm (https://pdm-project.org/en/stable/)
.pdm-python
# exclude pdm.lock file so that both cpu and gpu versions of torch will be accepted by pdm
pdm.lock
Loading

0 comments on commit 143cf2a

Please sign in to comment.