Files
Pygentic-AI/docker/pygentic_ai/python_build.sh
Francis Secada f9762093f8 feat: upgrade Docker image to Python 3.13
Upgrade from Python 3.12.3 to Python 3.13.3 using deadsnakes PPA.

Changes:
- Add build.sh execution in Dockerfile to install Python 3.13
- Install Python 3.13 from deadsnakes PPA with dev packages
- Set Python 3.13 as default via update-alternatives
- Create venv explicitly with Python 3.13
- Update pyproject.toml to require Python >= 3.13
- Fix line endings in shell scripts (CRLF → LF)

Build process:
1. Adds deadsnakes PPA repository
2. Installs python3.13, python3.13-dev, python3.13-venv, python3.13-distutils
3. Sets as system default Python
4. UV creates venv with Python 3.13
5. All packages install successfully

Tested with FastAPI 0.128.0 - all dependencies working correctly.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-04 11:17:53 -05:00

22 lines
440 B
Bash
Executable File

#!/bin/bash
curl -LsSf https://astral.sh/uv/install.sh | sh
PATH="/root/.local/bin/:$PATH"
cd /opt/pygentic_ai || exit
# Verify Python version
python3 --version
# Create venv with Python 3.13
uv venv .venv --python python3.13
source .venv/bin/activate
# Verify venv Python version
python --version
for FILE in core_requirements dev_requirements
do
uv pip compile --upgrade $FILE.in -o $FILE.txt
done
uv pip sync core_requirements.txt