@@ -12,7 +12,7 @@ parametrize:
1212 - image : " nvidia/cuda:12.1.1-runtime-ubuntu22.04"
1313 PACKAGE_NAME : " pytorch"
1414 python_version : " 3.10"
15- machine : " A100_X_2 "
15+ machine : " L4_X_2 "
1616 - image : " nvidia/cuda:12.6.3-runtime-ubuntu22.04"
1717 PACKAGE_NAME : " pytorch"
1818 python_version : " 3.12"
3737 RUN_ONLY_CUDA_TESTS : " 1"
3838
3939run : |
40- # Install Python and UV
41- apt-get update -qq --fix-missing
40+ echo "Installing dependencies"
41+ apt-get update -qq --fix-missing -o=Dpkg::Use-Pty=0 &> /dev/null
4242 apt-get install -q -y software-properties-common curl
43- # Add deadsnakes PPA for newer Python versions if needed
43+ echo " Add deadsnakes PPA for newer Python versions if needed"
4444 add-apt-repository ppa:deadsnakes/ppa -y
45- apt-get update -qq --fix-missing
45+ apt-get update -qq --fix-missing -o=Dpkg::Use-Pty=0 &> /dev/null
46+ echo "Install Python ${python_version} and other dependencies"
4647 apt-get install -q -y --no-install-recommends --allow-downgrades --allow-change-held-packages \
4748 build-essential \
4849 pkg-config \
@@ -54,23 +55,25 @@ run: |
5455 libnccl2 \
5556 libnccl-dev
5657
58+ echo "Install Python ${python_version} and UV"
5759 apt-get install -y python${python_version} python${python_version}-venv python${python_version}-dev
5860 ln -sf /usr/bin/python${python_version} /usr/bin/python
5961 curl -LsSf https://astral.sh/uv/install.sh | sh
6062
61- # Source the environment and ensure UV is in PATH
63+ echo " Source the environment and ensure UV is in PATH"
6264 [ -f "$HOME/.local/bin/env" ] && . "$HOME/.local/bin/env"
6365 export PATH="$HOME/.local/bin:$PATH"
6466 source $HOME/.cargo/env 2>/dev/null || true
6567 export PATH="$HOME/.cargo/bin:$PATH"
6668
67- # Verify UV installation
69+ echo " Verify UV installation"
6870 command -v uv || (echo "UV not found in PATH" && exit 1)
6971 # Create and activate a local uv virtual environment
7072 uv venv .venv -p "/usr/bin/python${python_version}" || uv venv .venv -p "python${python_version}" || uv venv .venv
7173 . .venv/bin/activate
7274 hash -r
7375
76+ echo "Show system information"
7477 whereis nvidia
7578 nvidia-smi
7679 python --version
@@ -98,7 +101,7 @@ run: |
98101 uv pip install "cython<3.0" wheel # for compatibility
99102 fi
100103
101- # install the base so we can adjust other packages
104+ echo "Install the base so we can adjust other packages"
102105 uv pip install .
103106 echo "Adjust torch versions in requirements files"
104107 PYTORCH_VERSION=$(python -c "import torch; print(torch.__version__.split('+')[0])")
@@ -119,9 +122,11 @@ run: |
119122 --target_import="lightning_fabric,pytorch_lightning"
120123 fi
121124
125+ echo "Install package"
122126 extra=$(python -c "print({'lightning': 'pytorch-'}.get('$(PACKAGE_NAME)', ''))")
123127 uv pip install -e ".[${extra}dev]" --upgrade
124128
129+ echo "Ensure only a single package is installed"
125130 if [ "${PACKAGE_NAME}" == "pytorch" ]; then
126131 echo "uninstall lightning to have just single package"
127132 uv pip uninstall lightning
0 commit comments