-
Notifications
You must be signed in to change notification settings - Fork 11
69 lines (55 loc) · 2.21 KB
/
Copy pathcuda_linux.yml
File metadata and controls
69 lines (55 loc) · 2.21 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
64
65
66
67
68
name: Linux Cuda
on:
workflow_dispatch:
workflow_call:
jobs:
build-linux:
runs-on: ubuntu-22.04
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
steps:
- name: Checkout
uses: actions/checkout@v4
# ===============================
# Restore CUDA cache
# ===============================
- name: Restore CUDA cache
id: cuda-cache
uses: actions/cache/restore@v4
with:
path: cuda-install
key: cuda-${{ runner.os }}-13.1.0
# ===============================
# Install dependencies
# ===============================
- name: Install build dependencies
if: steps.cuda-cache.outputs.cache-hit != 'true'
run: |
sudo apt-get update
sudo apt-get install -y build-essential wget tar
# ===============================
# Install CUDA 13.1
# ===============================
- name: Install CUDA
if: steps.cuda-cache.outputs.cache-hit != 'true'
run: |
wget --no-check-certificate https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-ubuntu2204.pin
sudo mv cuda-ubuntu2204.pin /etc/apt/preferences.d/cuda-repository-pin-600
wget --no-check-certificate https://developer.download.nvidia.com/compute/cuda/13.1.0/local_installers/cuda-repo-ubuntu2204-13-1-local_13.1.0-590.44.01-1_amd64.deb
sudo dpkg -i cuda-repo-ubuntu2204-13-1-local_13.1.0-590.44.01-1_amd64.deb
sudo cp /var/cuda-repo-ubuntu2204-13-1-local/cuda-*-keyring.gpg /usr/share/keyrings/
sudo apt-get update
sudo apt-get -y install cuda-toolkit-13-1
# Copy CUDA into workspace folder for cache/artifact
mkdir -p cuda-install
cp -r /usr/local/cuda-13.1/* cuda-install/
echo "✅ CUDA 13.1 installed successfully"
# ===============================
# Save CUDA cache (main branch and workflow_dispatch only)
# ===============================
- name: Save CUDA cache
if: steps.cuda-cache.outputs.cache-hit != 'true'
uses: actions/cache/save@v4
with:
path: cuda-install
key: cuda-${{ runner.os }}-13.1.0