[a2a3e7]: / .github / actions / setup / action.yaml

Download this file

44 lines (38 with data), 1.3 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
name: Setup
inputs:
python-version:
required: false
default: '3.9'
torch-version:
required: false
default: '2.0.0'
cuda-version:
required: false
default: cpu
full_install:
required: false
default: true
runs:
using: composite
steps:
- name: Set up Python ${{ inputs.python-version }}
uses: actions/setup-python@v4.3.0
with:
python-version: ${{ inputs.python-version }}
check-latest: true
cache: pip
cache-dependency-path: |
pyproject.toml
- name: Install PyTorch ${{ inputs.torch-version }}+${{ inputs.cuda-version }}
run: |
pip install torch==${{ inputs.torch-version }} --extra-index-url https://download.pytorch.org/whl/${{ inputs.cuda-version }}
python -c "import torch; print('PyTorch:', torch.__version__)"
python -c "import torch; print('CUDA available:', torch.cuda.is_available())"
python -c "import torch; print('CUDA:', torch.version.cuda)"
shell: bash
- name: Install extension packages
if: ${{ inputs.full_install == 'true' }}
run: |
pip install scipy
pip install --no-index --upgrade torch-scatter torch-sparse -f https://data.pyg.org/whl/torch-${{ inputs.torch-version }}+${{ inputs.cuda-version }}.html
shell: bash