diff --git a/Dockerfile b/Dockerfile index bd0a4ab..5cca530 100644 --- a/Dockerfile +++ b/Dockerfile @@ -27,5 +27,6 @@ RUN mkdir -p /tmp/log/celery && \ chown celery:celery celerybeat-schedule RUN find . -name "*.sh" -exec chmod +x {} \; RUN echo $WORKDIR +RUN /bin/bash -c 'source $WORKDIR/docker/pygentic_ai/build.sh' RUN /bin/bash -c 'source $WORKDIR/docker/pygentic_ai/python_build.sh' CMD /bin/bash -c 'source $WORKDIR/docker/pygentic_ai/python_start.sh' diff --git a/docker/pygentic_ai/build.sh b/docker/pygentic_ai/build.sh index c238eae..bc8d1c6 100755 --- a/docker/pygentic_ai/build.sh +++ b/docker/pygentic_ai/build.sh @@ -3,15 +3,28 @@ export DEBIAN_FRONTEND=noninteractive export TZ='America/New York' +# Install software-properties-common for add-apt-repository apt-get update && apt-get upgrade -y -apt-get install openssh-client \ - python3-dev \ - python3-full \ - python3-venv \ - python3-pip \ +apt-get install -y software-properties-common + +# Add deadsnakes PPA for Python 3.13 +add-apt-repository -y ppa:deadsnakes/ppa +apt-get update + +# Install Python 3.13 and other dependencies +apt-get install -y \ + openssh-client \ + python3.13 \ + python3.13-dev \ + python3.13-venv \ + python3.13-distutils \ git \ postgresql \ supervisor \ g++ \ gcc \ - locales -y + locales + +# Set Python 3.13 as the default python3 +update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.13 1 +update-alternatives --set python3 /usr/bin/python3.13 diff --git a/docker/pygentic_ai/python_build.sh b/docker/pygentic_ai/python_build.sh index a03584f..907ffa7 100755 --- a/docker/pygentic_ai/python_build.sh +++ b/docker/pygentic_ai/python_build.sh @@ -3,8 +3,17 @@ curl -LsSf https://astral.sh/uv/install.sh | sh PATH="/root/.local/bin/:$PATH" cd /opt/pygentic_ai || exit -uv venv .venv + +# 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 diff --git a/pyproject.toml b/pyproject.toml index c3382f3..5e164c6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -74,7 +74,7 @@ classifiers = [ "Operating System :: OS Independent", ] version = "1.0.0b0" -requires-python = ">=3.12" +requires-python = ">=3.13" dependencies = [ "aiofiles>=24.1.0", "aiomysql>=0.2.0",