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:
26
26
UBUNTU_VERSION : ${{ matrix.ubuntu_version }}
27
27
run : |
28
28
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
30
34
31
35
# Install specific Python versions based on Ubuntu target
32
36
if [[ "$UBUNTU_VERSION" == "20.04" ]]; then
33
37
sudo apt install -y python3.8 python3.8-dev python3.8-venv
34
38
elif [[ "$UBUNTU_VERSION" == "22.04" ]]; then
35
39
sudo apt install -y python3.10 python3.10-dev python3.10-venv
36
40
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
40
41
sudo apt install -y python3.12 python3.12-dev python3.12-venv
41
42
fi
42
43
44
+ # Install PyTorch before running the build script to satisfy auto_gptq's requirements
45
+ pip install torch --user
46
+
43
47
bash packages/postgresml-python/release.sh ${{ inputs.packageVersion }} ${{ matrix.ubuntu_version }}
44
48
45
49
#
Original file line number Diff line number Diff line change 49
49
virtualenv --python=" python${PYTHON_VERSION} " " $deb_dir /var/lib/postgresml-python/pgml-venv"
50
50
source " $deb_dir /var/lib/postgresml-python/pgml-venv/bin/activate"
51
51
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
+
52
57
python -m pip install -r " ${deb_dir} /etc/postgresml-python/requirements.txt"
53
58
54
59
deactivate
You can’t perform that action at this time.
0 commit comments