Skip to content

Commit 87c2ec9

Browse files
committed
cuda version
1 parent 2b2be40 commit 87c2ec9

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

.lightning/workflows/fabric.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,12 @@ run: |
6868
uv pip list
6969
set -ex
7070
71-
CUDA_VERSION="${image##*cuda}" # Remove everything up to and including "cuda"
71+
# Parse CUDA version from image tag, e.g., "nvidia/cuda:12.6.3-devel-ubuntu22.04"
72+
IMAGE_TAG="${image##*:}" # "12.6.3-devel-ubuntu22.04"
73+
CUDA_VERSION="${IMAGE_TAG%%-*}" # "12.6.3"
7274
echo "Using CUDA version: ${CUDA_VERSION}"
73-
CUDA_VERSION_M_M="${cuda_version%.*}" # Get major.minor by removing the last dot and everything after
74-
CUDA_VERSION_MM="${CUDA_VERSION_M_M//'.'/''}"
75+
CUDA_VERSION_M_M="${CUDA_VERSION%.*}" # "12.6"
76+
CUDA_VERSION_MM="${CUDA_VERSION_M_M//./}" # "126"
7577
TORCH_URL="https://download.pytorch.org/whl/cu${CUDA_VERSION_MM}/torch_stable.html"
7678
echo "Torch URL: ${TORCH_URL}"
7779
COVERAGE_SOURCE=$(python -c 'n = "$(PACKAGE_NAME)" ; print(dict(fabric="lightning_fabric").get(n, n))')

0 commit comments

Comments
 (0)