-
Notifications
You must be signed in to change notification settings - Fork 59
Expand file tree
/
Copy pathaction.yml
More file actions
63 lines (54 loc) · 2.1 KB
/
action.yml
File metadata and controls
63 lines (54 loc) · 2.1 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
name: Setup
inputs:
python-version:
required: false
default: '3.10'
torch-version:
required: false
default: '2.11.0'
cuda-version:
required: false
default: cpu
runs:
using: composite
steps:
- name: Set up uv with Python ${{ inputs.python-version }}
uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7.6.0
with:
python-version: ${{ inputs.python-version }}
activate-environment: true
- name: Free up disk space
if: ${{ runner.os == 'Linux' }}
run: |
sudo rm -rf /usr/share/dotnet
sudo rm -rf /usr/local/lib/android
sudo rm -rf /opt/hostedtoolcache/Android
shell: bash
- name: Set up Windows developer command prompt
uses: ilammy/msvc-dev-cmd@v1
- name: Install CUDA ${{ inputs.cuda-version }}
if: ${{ inputs.cuda-version != 'cpu' }}
run: |
bash ./.github/workflows/cuda/${{ runner.os }}.sh ${{ inputs.cuda-version }}
shell: bash
- name: Install PyTorch ${{ inputs.torch-version }}+${{ inputs.cuda-version }}
run: |
if [ ${{ inputs.torch-version }} == '2.12.0' ]; then
uv pip install --pre torch --torch-backend ${{ inputs.cuda-version }}
else
uv pip install torch==${{ inputs.torch-version }} --torch-backend ${{ inputs.cuda-version }}
fi
python -c "import torch; print('PyTorch:', torch.__version__)"
python -c "import torch; print('CUDA:', torch.version.cuda)"
python -c "import torch; print('CXX11 ABI:', torch.compiled_with_cxx11_abi())"
shell: bash
- name: Downgrade GLIBC
if: ${{ runner.os == 'Linux' }}
run: |
sed -i '1s/^/#if defined(__linux__) \&\& defined(__x86_64__)\n__asm__(".symver log,log@GLIBC_2.2.5");\n#endif\n/' third_party/METIS/GKlib/gk_proto.h
sed -i '1s/^/#if defined(__linux__) \&\& defined(__x86_64__)\n__asm__(".symver pow,pow@GLIBC_2.2.5");\n#endif\n/' third_party/METIS/libmetis/metislib.h
shell: bash
- name: Install additional dependencies
run: |
uv pip install setuptools ninja wheel
shell: bash