99 machine_gpu :
1010 type : string
1111 default : " 4-core-ubuntu-gpu-t4"
12- build_container :
13- required : true
14- type : string
1512 arch :
1613 type : string
1714 default : x86_64
4744jobs :
4845 build :
4946 runs-on : " ${{ inputs.machine }}"
50- container : " ${{ inputs.build_container }}"
47+ container : " quay.io/pypa/manylinux_2_28_ ${{ inputs.arch }}"
5148 steps :
5249 - uses : actions/checkout@v4
5350 with :
@@ -57,28 +54,42 @@ jobs:
5754 run : |
5855 set -ex
5956
60- # Quick sanity check
61- nvcc --version
57+ # Figure out versions
58+ py_ver="${{ inputs.python-version }}"
59+ if [[ "${{ inputs.free-threaded }}" == 'ft' ]]; then
60+ py_ver="${py_ver}t"
61+ fi
62+ cuda_ver="${{ inputs.cuda-version }}"
6263
63- wget -qO- https://astral.sh/uv/install.sh | sh
64- source $HOME/.local/bin/env
64+ # Setup Python
65+ # wget -qO- https://astral.sh/uv/install.sh | sh
6566 uv --version
66- uv python list --only-installed
6767
68- # note: 3.13t is in cp313-cp313t directory, others are in cp313-cp313 directory
69- v=${{ inputs.python-version }}
70- dir="cp${v//[.t]/}-cp${v//[.]/}"
71- if [[ "${{ inputs.free-threaded }}" == 'ft' ]]; then
72- dir="${dir}t"
73- fi
74- python_exe="/opt/python/${dir}/bin/python"
75- "${python_exe}" --version
76- uv venv --python "${python_exe}"
77- if [[ "${{ inputs.free-threaded }}" == 'ft' ]]; then
78- source .venv/bin/activate
68+ uv python pin "${py_ver}"
69+ uv python list --only-installed
70+ uv venv
71+ source .venv/bin/activate
72+
73+ which python
74+ python --version
75+
76+ # Install CUDA
77+ cuda_dir="/opt/cuda"
78+ .github/scripts/install_cuda_toolkit.py \
79+ --base-dir "${cuda_dir}" \
80+ --cuda-version "${cuda_ver}"
81+ if [ ! -d "${cuda_dir}/lib64" ]; then
82+ ln -s "${cuda_dir}/lib" "${cuda_dir}/lib64"
7983 fi
80- uv build --no-python-downloads --all-packages --wheel
8184
85+ export PATH="${PATH}:${cuda_dir}/bin"
86+ export CUDA_PATH="${cuda_dir}"
87+ # Sanity check
88+ set -e
89+ nvcc --version
90+
91+ # Build package
92+ uv build --no-python-downloads --all-packages --wheel
8293 ./packaging/repair_wheels.sh "manylinux_2_27_${{ inputs.arch }}" ./dist ~/package
8394
8495 - uses : actions/upload-artifact@v4
@@ -173,7 +184,8 @@ jobs:
173184 pip install pytest pytest-xdist parameterized
174185
175186 cu_ver="${{ inputs.cuda-version }}"
176- cu_ver="${cu_ver//[.]/}" # Remove dots
187+ cu_ver="${cu_ver//[.]/}" # Remove dots 12.4.1 -> 1241
188+ cu_ver="${cu_ver:0:3}" # Retain three chars 1241 -> 124
177189 pip install numpy torch --index-url "https://download.pytorch.org/whl/cu${cu_ver}"
178190
179191 # Install FFmpeg
0 commit comments