Skip to content

Commit 6cedea3

Browse files
committed
UV_TORCH_BACKEND
1 parent 8ff14cc commit 6cedea3

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

.lightning/workflows/fabric.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ run: |
6565
nvidia-smi
6666
python --version
6767
uv --version
68-
uv pip install fire wget packaging
6968
uv pip list
7069
set -ex
7170
@@ -75,15 +74,14 @@ run: |
7574
echo "Using CUDA version: ${CUDA_VERSION}"
7675
CUDA_VERSION_M_M="${CUDA_VERSION%.*}" # "12.6"
7776
CUDA_VERSION_MM="${CUDA_VERSION_M_M//./}" # "126"
78-
TORCH_URL="https://download.pytorch.org/whl/cu${CUDA_VERSION_MM}/torch_stable.html"
79-
echo "Torch URL: ${TORCH_URL}"
77+
export UV_TORCH_BACKEND=cu${CUDA_VERSION_MM}
8078
COVERAGE_SOURCE=$(python -c 'n = "$(PACKAGE_NAME)" ; print(dict(fabric="lightning_fabric").get(n, n))')
8179
echo "collecting coverage for: ${COVERAGE_SOURCE}"
8280
81+
uv pip install fire wget packaging "lightning-utilities[cli]"
8382
if [ "${python_version}" == "3.10" ]; then
8483
echo "Set oldest versions"
8584
uv pip uninstall -y deepspeed
86-
uv pip install --upgrade "lightning-utilities[cli]"
8785
cd requirements/fabric
8886
python -m lightning_utilities.cli requirements set-oldest --req_files "['base.txt', 'strategies.txt']"
8987
python -m lightning_utilities.cli requirements prune-pkgs --packages deepspeed --req_files strategies.txt
@@ -92,7 +90,7 @@ run: |
9290
fi
9391
9492
# install the base so we can adjust other packages
95-
uv pip install . --extra-index-url="${TORCH_URL}"
93+
uv pip install .
9694
echo "Adjust torch versions in requirements files"
9795
PYTORCH_VERSION=$(python -c "import torch; print(torch.__version__.split('+')[0])")
9896
uv pip install wget packaging
@@ -113,7 +111,7 @@ run: |
113111
fi
114112
115113
extra=$(python -c "print({'lightning': 'fabric-'}.get('$(PACKAGE_NAME)', ''))")
116-
uv pip install ".[${extra}dev]" --upgrade --extra-index-url="${TORCH_URL}"
114+
uv pip install ".[${extra}dev]" --upgrade
117115
118116
python requirements/collect_env_details.py
119117
python -c "import torch ; mgpu = torch.cuda.device_count() ; assert mgpu >= 2, f'GPU: {mgpu}'"

0 commit comments

Comments
 (0)