From 3745cd65579a62f8ffa2c8d248380023e608d606 Mon Sep 17 00:00:00 2001 From: Rongxin Liu Date: Sat, 21 Dec 2024 20:34:14 -0500 Subject: [PATCH] update Dockerfile to install Python 3.13.x --- Dockerfile | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index 67455d7..f184def 100644 --- a/Dockerfile +++ b/Dockerfile @@ -61,19 +61,19 @@ RUN apt update && \ make tk-dev unzip wget xz-utils zlib1g-dev -# Install Python 3.12.x +# Install Python 3.13.x # https://www.python.org/downloads/ RUN cd /tmp && \ - curl --remote-name https://www.python.org/ftp/python/3.12.8/Python-3.12.8.tgz && \ - tar xzf Python-3.12.8.tgz && \ - rm --force Python-3.12.8.tgz && \ - cd Python-3.12.8 && \ + curl --remote-name https://www.python.org/ftp/python/3.13.1/Python-3.13.1.tgz && \ + tar xzf Python-3.13.1.tgz && \ + rm --force Python-3.13.1.tgz && \ + cd Python-3.13.1 && \ CFLAGS="-Os" ./configure --disable-static --enable-optimizations --enable-shared --with-lto --without-tests && \ ./configure && \ make && \ make install && \ cd .. && \ - rm --force --recursive Python-3.12.8 && \ + rm --force --recursive Python-3.13.1 && \ ln --relative --symbolic /usr/local/bin/pip3 /usr/local/bin/pip && \ ln --relative --symbolic /usr/local/bin/python3 /usr/local/bin/python && \ pip3 install --no-cache-dir --upgrade pip @@ -243,6 +243,17 @@ RUN apt update && \ groupadd docker +# Install Rust +RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y +ENV PATH="/root/.cargo/bin:${PATH}" + + +# Temporarily install msgspec from GitHub until it's officially compatible with Python 3.13 +# https://github.com/jcrist/msgspec/issues/698 +# https://github.com/jcrist/msgspec/issues/777 +RUN pip install git+https://github.com/jcrist/msgspec.git@main + + # Install Python packages RUN pip3 install --no-cache-dir \ autopep8 \