-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaction.yml
30 lines (29 loc) · 1.38 KB
/
action.yml
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
name: 'syntaxdot-libtorch'
description: "Download libtorch"
inputs:
device:
description: "Device build"
default: "cpu"
runs:
using: "composite"
steps:
- name: Download libtorch
run: |
wget "https://download.pytorch.org/libtorch/cpu/libtorch-cxx11-abi-shared-with-deps-2.1.0%2Bcpu.zip"
echo "04f699d5181048b0062ef52de1df44b46859b8fbeeee12abdbcb9aac63e2a14b libtorch-cxx11-abi-shared-with-deps-2.1.0+cpu.zip" | sha256sum -c -
unzip libtorch-cxx11-abi-shared-with-deps-2.1.0+cpu.zip
echo "LIBTORCH=$(realpath libtorch)" >> $GITHUB_ENV
echo "LD_LIBRARY_PATH=$(realpath libtorch)/lib" >> $GITHUB_ENV
rm libtorch-cxx11-abi-shared-with-deps-2.1.0+cpu.zip
shell: bash
if: ${{ inputs.device == 'cpu' }}
- name: Download libtorch (CUDA)
run: |
wget "https://download.pytorch.org/libtorch/cu121/libtorch-cxx11-abi-shared-with-deps-2.1.0%2Bcu121.zip"
echo "fc1afc2fb28e2ab7b526df04c574c173fc6f068b5fbca831734607ef39fd6893 libtorch-cxx11-abi-shared-with-deps-2.1.0%2Bcu121.zip" | sha256sum -c -
unzip libtorch-cxx11-abi-shared-with-deps-2.1.0%2Bcu121.zip
echo "LIBTORCH=$(realpath libtorch)" >> $GITHUB_ENV
echo "LD_LIBRARY_PATH=$(realpath libtorch)/lib" >> $GITHUB_ENV
rm libtorch-cxx11-abi-shared-with-deps-2.1.0%2Bcu121.zip
shell: bash
if: ${{ inputs.device == 'cuda' }}