File tree Expand file tree Collapse file tree 1 file changed +11
-4
lines changed
Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Original file line number Diff line number Diff line change 3434 - name : Run GPU Test
3535 run : |
3636 echo "NVIDIA_VISIBLE_DEVICES from K8s: ${NVIDIA_VISIBLE_DEVICES:-not set}"
37- docker run --rm --gpus=all \
37+ docker run --rm \
38+ -e NVIDIA_VISIBLE_DEVICES="${NVIDIA_VISIBLE_DEVICES:-all}" \
39+ --runtime=nvidia \
3840 nvidia/cuda:12.2.0-runtime-ubuntu22.04 \
3941 bash -c "
4042 echo '=== 1-GPU Test ==='
7779 - name : Run GPU Test
7880 run : |
7981 echo "NVIDIA_VISIBLE_DEVICES from K8s: ${NVIDIA_VISIBLE_DEVICES:-not set}"
80- docker run --rm --gpus=all \
82+ # Use Kubernetes GPU allocation instead of --gpus=all
83+ docker run --rm \
84+ -e NVIDIA_VISIBLE_DEVICES="${NVIDIA_VISIBLE_DEVICES:-all}" \
85+ --runtime=nvidia \
8186 nvidia/cuda:12.2.0-runtime-ubuntu22.04 \
8287 bash -c "
8388 echo '=== 2-GPU Test ==='
@@ -120,9 +125,11 @@ jobs:
120125 - name : Run Parallel GPU Test
121126 run : |
122127 echo "NVIDIA_VISIBLE_DEVICES from K8s: ${NVIDIA_VISIBLE_DEVICES:-not set}"
123- echo "Testing ${{ matrix.runner }} with --gpus=all "
128+ echo "Testing ${{ matrix.runner }} with GPU isolation "
124129
125- docker run --rm --gpus=all \
130+ docker run --rm \
131+ -e NVIDIA_VISIBLE_DEVICES="${NVIDIA_VISIBLE_DEVICES:-all}" \
132+ --runtime=nvidia \
126133 nvidia/cuda:12.2.0-runtime-ubuntu22.04 \
127134 bash -c "
128135 echo '=== Parallel Test Job ${{ matrix.job_id }} ==='
You can’t perform that action at this time.
0 commit comments