Skip to content

Commit 7495806

Browse files
ci: add HF_HOME cache + CUDA_VISIBLE_DEVICES at workflow level
Following the transformers quantization-CI pattern: - HF_HOME=/mnt/cache: if the runner has persistent storage at this path, model downloads are cached across runs. If not, HF hub falls back to the default ~/.cache/huggingface. - CUDA_VISIBLE_DEVICES=0,1 at workflow level: on single-GPU runners, device 1 simply doesn't exist so only GPU 0 is used. On multi-GPU runners (g6.12xlarge), both are visible. This eliminates per-step env overrides. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 185a127 commit 7495806

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

.github/workflows/tests-integration-nightly.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ env:
2727
TORCH_VERSION: "2.9.1"
2828
PYPI_INDEX: "https://download.pytorch.org/whl/cu128"
2929
BNB_WHEEL_URL: "https://github.com/bitsandbytes-foundation/bitsandbytes/releases/download/continuous-release_main/bitsandbytes-1.33.7.preview-py3-none-manylinux_2_24_x86_64.whl"
30+
CUDA_VISIBLE_DEVICES: "0,1"
31+
HF_HOME: /mnt/cache
3032

3133
jobs:
3234
# ─── Downstream test jobs ─────────────────────────────────────────────────
@@ -79,7 +81,6 @@ jobs:
7981
working-directory: /tmp/transformers
8082
env:
8183
RUN_SLOW: "1"
82-
CUDA_VISIBLE_DEVICES: "0"
8384
shell: bash -o pipefail {0}
8485
run: |
8586
mkdir -p ${GITHUB_WORKSPACE}/reports
@@ -135,7 +136,6 @@ jobs:
135136
working-directory: /tmp/transformers
136137
env:
137138
RUN_SLOW: "1"
138-
CUDA_VISIBLE_DEVICES: "0,1"
139139
shell: bash -o pipefail {0}
140140
run: |
141141
mkdir -p ${GITHUB_WORKSPACE}/reports
@@ -191,7 +191,6 @@ jobs:
191191
working-directory: /tmp/accelerate
192192
env:
193193
RUN_SLOW: "1"
194-
CUDA_VISIBLE_DEVICES: "0"
195194
shell: bash -o pipefail {0}
196195
run: |
197196
mkdir -p ${GITHUB_WORKSPACE}/reports
@@ -247,7 +246,6 @@ jobs:
247246
working-directory: /tmp/peft
248247
env:
249248
IS_GITHUB_CI: "1"
250-
CUDA_VISIBLE_DEVICES: "0"
251249
shell: bash -o pipefail {0}
252250
run: |
253251
mkdir -p ${GITHUB_WORKSPACE}/reports
@@ -305,7 +303,6 @@ jobs:
305303
working-directory: /tmp/peft
306304
env:
307305
IS_GITHUB_CI: "1"
308-
CUDA_VISIBLE_DEVICES: "0,1"
309306
shell: bash -o pipefail {0}
310307
run: |
311308
mkdir -p ${GITHUB_WORKSPACE}/reports

0 commit comments

Comments
 (0)