File tree Expand file tree Collapse file tree 2 files changed +13
-4
lines changed
packages/postgresml-python Expand file tree Collapse file tree 2 files changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -26,20 +26,24 @@ jobs:
2626 UBUNTU_VERSION : ${{ matrix.ubuntu_version }}
2727 run : |
2828 sudo apt update
29- sudo apt install -y python3-dev python3-pip python3-virtualenv
29+ sudo apt install -y python3-dev python3-pip python3-virtualenv software-properties-common python3-wheel-whl python3-pip-whl python3-setuptools-whl
30+
31+ # Add deadsnakes PPA for all Python versions
32+ sudo add-apt-repository -y ppa:deadsnakes/ppa
33+ sudo apt update
3034
3135 # Install specific Python versions based on Ubuntu target
3236 if [[ "$UBUNTU_VERSION" == "20.04" ]]; then
3337 sudo apt install -y python3.8 python3.8-dev python3.8-venv
3438 elif [[ "$UBUNTU_VERSION" == "22.04" ]]; then
3539 sudo apt install -y python3.10 python3.10-dev python3.10-venv
3640 elif [[ "$UBUNTU_VERSION" == "24.04" ]]; then
37- # Add deadsnakes PPA for Python 3.12 on Ubuntu 22.04
38- sudo add-apt-repository -y ppa:deadsnakes/ppa
39- sudo apt update
4041 sudo apt install -y python3.12 python3.12-dev python3.12-venv
4142 fi
4243
44+ # Install PyTorch before running the build script to satisfy auto_gptq's requirements
45+ pip install torch --user
46+
4347 bash packages/postgresml-python/release.sh ${{ inputs.packageVersion }} ${{ matrix.ubuntu_version }}
4448
4549 #
Original file line number Diff line number Diff line change 4949virtualenv --python=" python${PYTHON_VERSION} " " $deb_dir /var/lib/postgresml-python/pgml-venv"
5050source " $deb_dir /var/lib/postgresml-python/pgml-venv/bin/activate"
5151
52+ # For Python 3.12, ensure PyTorch is installed first
53+ if [[ " ${PYTHON_VERSION} " == " 3.12" ]]; then
54+ python -m pip install torch
55+ fi
56+
5257python -m pip install -r " ${deb_dir} /etc/postgresml-python/requirements.txt"
5358
5459deactivate
You can’t perform that action at this time.
0 commit comments