@@ -12,7 +12,7 @@ parametrize:
12
12
- image : " nvidia/cuda:12.1.1-runtime-ubuntu22.04"
13
13
PACKAGE_NAME : " pytorch"
14
14
python_version : " 3.10"
15
- machine : " A100_X_2 "
15
+ machine : " L4_X_2 "
16
16
- image : " nvidia/cuda:12.6.3-runtime-ubuntu22.04"
17
17
PACKAGE_NAME : " pytorch"
18
18
python_version : " 3.12"
37
37
RUN_ONLY_CUDA_TESTS : " 1"
38
38
39
39
run : |
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
42
42
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"
44
44
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"
46
47
apt-get install -q -y --no-install-recommends --allow-downgrades --allow-change-held-packages \
47
48
build-essential \
48
49
pkg-config \
@@ -54,23 +55,25 @@ run: |
54
55
libnccl2 \
55
56
libnccl-dev
56
57
58
+ echo "Install Python ${python_version} and UV"
57
59
apt-get install -y python${python_version} python${python_version}-venv python${python_version}-dev
58
60
ln -sf /usr/bin/python${python_version} /usr/bin/python
59
61
curl -LsSf https://astral.sh/uv/install.sh | sh
60
62
61
- # Source the environment and ensure UV is in PATH
63
+ echo " Source the environment and ensure UV is in PATH"
62
64
[ -f "$HOME/.local/bin/env" ] && . "$HOME/.local/bin/env"
63
65
export PATH="$HOME/.local/bin:$PATH"
64
66
source $HOME/.cargo/env 2>/dev/null || true
65
67
export PATH="$HOME/.cargo/bin:$PATH"
66
68
67
- # Verify UV installation
69
+ echo " Verify UV installation"
68
70
command -v uv || (echo "UV not found in PATH" && exit 1)
69
71
# Create and activate a local uv virtual environment
70
72
uv venv .venv -p "/usr/bin/python${python_version}" || uv venv .venv -p "python${python_version}" || uv venv .venv
71
73
. .venv/bin/activate
72
74
hash -r
73
75
76
+ echo "Show system information"
74
77
whereis nvidia
75
78
nvidia-smi
76
79
python --version
@@ -98,7 +101,7 @@ run: |
98
101
uv pip install "cython<3.0" wheel # for compatibility
99
102
fi
100
103
101
- # install the base so we can adjust other packages
104
+ echo "Install the base so we can adjust other packages"
102
105
uv pip install .
103
106
echo "Adjust torch versions in requirements files"
104
107
PYTORCH_VERSION=$(python -c "import torch; print(torch.__version__.split('+')[0])")
@@ -119,9 +122,11 @@ run: |
119
122
--target_import="lightning_fabric,pytorch_lightning"
120
123
fi
121
124
125
+ echo "Install package"
122
126
extra=$(python -c "print({'lightning': 'pytorch-'}.get('$(PACKAGE_NAME)', ''))")
123
127
uv pip install -e ".[${extra}dev]" --upgrade
124
128
129
+ echo "Ensure only a single package is installed"
125
130
if [ "${PACKAGE_NAME}" == "pytorch" ]; then
126
131
echo "uninstall lightning to have just single package"
127
132
uv pip uninstall lightning
0 commit comments