Skip to content

Commit

Permalink
update Dockerfile to install Python 3.13.x
Browse files Browse the repository at this point in the history
  • Loading branch information
rongxin-liu committed Dec 22, 2024
1 parent 6117790 commit 3745cd6
Showing 1 changed file with 17 additions and 6 deletions.
23 changes: 17 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 \
Expand Down

0 comments on commit 3745cd6

Please sign in to comment.