Skip to content

Commit 52ed0bc

Browse files
committed
Add more caching
Signed-off-by: Raghu Raja <[email protected]>
1 parent 2c3f245 commit 52ed0bc

File tree

1 file changed

+46
-6
lines changed

1 file changed

+46
-6
lines changed

.github/workflows/tunercheck.yaml

Lines changed: 46 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,32 +15,72 @@ jobs:
1515
strategy:
1616
matrix:
1717
platform: [p5en.48xlarge, p5.48xlarge]
18-
# Add fail-fast: false to continue with other platforms if one fails
1918
fail-fast: false
2019

2120
runs-on: ubuntu-22.04
2221

2322
steps:
24-
- name: Cache Dependencies
23+
# Cache APT packages
24+
- name: Cache APT packages
25+
id: cache-apt
26+
uses: actions/cache@v3
27+
with:
28+
path: |
29+
/var/cache/apt/archives
30+
/var/lib/apt/lists
31+
key: apt-${{ runner.os }}-${{ hashFiles('**/workflow.yml') }}
32+
33+
# Cache CUDA installation
34+
- name: Cache CUDA
35+
id: cache-cuda
2536
uses: actions/cache@v3
2637
with:
2738
path: |
2839
/usr/local/cuda
40+
key: cuda-${{ runner.os }}-${{ hashFiles('**/cuda-keyring_1.1-1_all.deb') }}
41+
42+
# Cache EFA installation
43+
- name: Cache EFA
44+
id: cache-efa
45+
uses: actions/cache@v3
46+
with:
47+
path: |
2948
/opt/amazon
30-
key: ${{ runner.os }}-deps-${{ hashFiles('**/configure.ac') }}
49+
key: efa-${{ runner.os }}-${{ hashFiles('**/aws-efa-installer-latest.tar.gz') }}
3150

32-
- name: Install System Dependencies
33-
if: steps.cache-deps.outputs.cache-hit != 'true'
51+
# Cache pip packages
52+
- name: Cache pip packages
53+
id: cache-pip
54+
uses: actions/cache@v3
55+
with:
56+
path: ~/.cache/pip
57+
key: pip-${{ runner.os }}-${{ hashFiles('**/requirements.txt', '**/setup.py') }}
58+
59+
- name: Setup APT
3460
run: |
3561
sudo apt-key del 7fa2af80
3662
wget ${{ env.CUDA_KEYRING_URL }}
3763
sudo dpkg -i cuda-keyring_1.1-1_all.deb
3864
sudo apt-get update
65+
66+
- name: Install System Dependencies
67+
run: |
68+
# Only download without installing if we have cache
69+
if [ "${{ steps.cache-apt.outputs.cache-hit }}" = "true" ]; then
70+
sudo apt-get install -y --download-only cuda-toolkit libhwloc-dev
71+
else
72+
sudo apt-get install -y cuda-toolkit libhwloc-dev
73+
fi
74+
75+
# Install from cache if available
3976
sudo apt-get install -y cuda-toolkit libhwloc-dev
77+
78+
- name: Install Python Dependencies
79+
run: |
4080
pip install uv
4181
4282
- name: Install EFA
43-
if: steps.cache-deps.outputs.cache-hit != 'true'
83+
if: steps.cache-efa.outputs.cache-hit != 'true'
4484
run: |
4585
curl -O ${{ env.EFA_INSTALLER_URL }}
4686
tar -xf aws-efa-installer-*.tar.gz

0 commit comments

Comments
 (0)