diff options
| author | 2025-05-22 21:55:36 +0100 | |
|---|---|---|
| committer | 2025-05-22 21:55:36 +0100 | |
| commit | c825ae4e36f5380c9fca325a99884513c8c701cc (patch) | |
| tree | 20c13e7c93fbbe8d8f83b78196527e617345bd3c /Dockerfile | |
| parent | Bump SciPy in eval deps to get Python 3.13 support (#235) (diff) | |
| parent | Only test on ubuntu-latest (diff) | |
Python 3.14 (#236)
* Consistent capitalisation in dockerfile
* Bump 3.13 to 3.13.2 and make the default
3.13.3 has a bug with tests.
This is fixed on the 3.13 dev branch, so will likely be part of 3.13.4
See this commit for more info https://github.com/python/cpython/commit/cc39b19f0fca8db0f881ecaf02f88d72d9f93776
* Remove 3.12 in favour of 3.14-dev
* Bump numpy version installed in dev to one that works for 3.13
* Bump eval deps to latest versions
This commit also updates which dependencies are installed in each verison of Python, according to what works where.
* update tests to use new default python version
* Replace deprecated ubuntu 20.04 CI runner with 24.04
* Only test on ubuntu-latest
We previously used a matrixc to test cgroups v1 & v2. Now that ubuntu 20.04 is no longer supported by GitHub, we not longer have access to a runner with v1 cgroups.
Diffstat (limited to 'Dockerfile')
| -rw-r--r-- | Dockerfile | 28 | 
1 files changed, 14 insertions, 14 deletions
| @@ -1,5 +1,5 @@  # syntax=docker/dockerfile:1.4 -FROM buildpack-deps:bookworm as builder-nsjail +FROM buildpack-deps:bookworm AS builder-nsjail  WORKDIR /nsjail @@ -17,7 +17,7 @@ RUN git clone -b master --single-branch https://github.com/google/nsjail.git . \  RUN make  # ------------------------------------------------------------------------------ -FROM buildpack-deps:bookworm as builder-py-base +FROM buildpack-deps:bookworm AS builder-py-base  ENV PYENV_ROOT=/pyenv \      PYTHON_CONFIGURE_OPTS='--disable-test-modules --enable-optimizations \ @@ -29,21 +29,21 @@ RUN apt-get -y update \          tk-dev \      && rm -rf /var/lib/apt/lists/* -RUN git clone -b v2.4.23 --depth 1 https://github.com/pyenv/pyenv.git $PYENV_ROOT +RUN git clone -b v2.5.7 --depth 1 https://github.com/pyenv/pyenv.git $PYENV_ROOT  COPY --link scripts/build_python.sh /  # ------------------------------------------------------------------------------ -FROM builder-py-base as builder-py-3_12 -RUN /build_python.sh 3.12.8 +FROM builder-py-base AS builder-py-3_13 +RUN /build_python.sh 3.13.2  # ------------------------------------------------------------------------------ -FROM builder-py-base as builder-py-3_13 -RUN /build_python.sh 3.13.1 +FROM builder-py-base AS builder-py-3_13t +RUN /build_python.sh 3.13.2t  # ------------------------------------------------------------------------------ -FROM builder-py-base as builder-py-3_13t -RUN /build_python.sh 3.13.1t +FROM builder-py-base AS builder-py-3_14 +RUN /build_python.sh 3.14-dev  # ------------------------------------------------------------------------------ -FROM python:3.13-slim-bookworm as base +FROM python:3.13-slim-bookworm AS base  ENV PIP_DISABLE_PIP_VERSION_CHECK=1 \      PIP_NO_CACHE_DIR=false @@ -57,15 +57,15 @@ RUN apt-get -y update \      && rm -rf /var/lib/apt/lists/*  COPY --link --from=builder-nsjail /nsjail/nsjail /usr/sbin/ -COPY --link --from=builder-py-3_12 /snekbin/ /snekbin/  COPY --link --from=builder-py-3_13 /snekbin/ /snekbin/  COPY --link --from=builder-py-3_13t /snekbin/ /snekbin/ +COPY --link --from=builder-py-3_14 /snekbin/ /snekbin/  RUN chmod +x /usr/sbin/nsjail \ -    && ln -s /snekbin/python/3.12/ /snekbin/python/default +    && ln -s /snekbin/python/3.13/ /snekbin/python/default  # ------------------------------------------------------------------------------ -FROM base as venv +FROM base AS venv  COPY --link requirements/ /snekbox/requirements/  COPY --link scripts/install_eval_deps.sh /snekbox/scripts/install_eval_deps.sh @@ -83,7 +83,7 @@ RUN if [ -n "${DEV}" ]; \      then \          pip install -U -r requirements/coverage.pip \          && export PYTHONUSERBASE=/snekbox/user_base \ -        && /snekbin/python/default/bin/python -m pip install --user numpy~=1.19; \ +        && /snekbin/python/default/bin/python -m pip install --user numpy~=2.2.5; \      fi  # At the end to avoid re-installing dependencies when only a config changes. | 
