From d7745a107ac407df22150e950ef289c05d2dc364 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 9 Feb 2026 12:30:45 +0000 Subject: [PATCH 1/3] Remove python3.10-distutils and python3.10-venv from Dockerfile These packages have been removed from the deadsnakes PPA for Ubuntu Focal and are no longer available, causing the Docker build to fail. Neither package is needed: - pip is installed via get-pip.py which doesn't require distutils - virtualenv is installed via pip, replacing the need for the venv package Also fix legacy ENV format warning (ENV key value -> ENV key=value). https://claude.ai/code/session_01UWALAV2tXVZ3pDtg88Npo9 --- Dockerfile | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 2771a7925..ceeac4a80 100644 --- a/Dockerfile +++ b/Dockerfile @@ -54,8 +54,6 @@ RUN \ xdg-utils \ cmake \ 'python3\.10' \ - 'python3\.10-distutils' \ - 'python3\.10-venv' \ nodejs \ npm \ tar \ @@ -146,7 +144,7 @@ RUN \ && \ echo "make xvfb daemon script executable" -ENV DISPLAY :99 +ENV DISPLAY=:99 # magic from https://github.com/puppeteer/puppeteer/issues/3451#issuecomment-523961368 RUN echo 'kernel.unprivileged_userns_clone=1' > /etc/sysctl.d/userns.conf From ea4d2c7b4fad8fd406e50577321c0c143c6e4748 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 9 Feb 2026 13:24:47 +0000 Subject: [PATCH 2/3] Upgrade from Python 3.10 to 3.12 in Dockerfile MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Python 3.10 is no longer available in the deadsnakes PPA for Ubuntu Focal — the package installs but provides no binary, causing the Docker build to fail at the update-alternatives step. Switch all python3.10 references to python3.12, which is actively maintained in the deadsnakes PPA. https://claude.ai/code/session_01UWALAV2tXVZ3pDtg88Npo9 --- Dockerfile | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/Dockerfile b/Dockerfile index ceeac4a80..6dea1d1ff 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,7 +8,7 @@ SHELL ["/bin/bash", "-c"] # Prevent interactive time zone config. # adapted from https://askubuntu.com/a/1013396 ENV DEBIAN_FRONTEND=noninteractive -ENV SPHINXBUILD="python3.10 -m sphinx" +ENV SPHINXBUILD="python3.12 -m sphinx" RUN \ echo 'Acquire::http::Timeout "60";' >> "/etc/apt/apt.conf.d/99timeout" \ @@ -53,7 +53,7 @@ RUN \ lsb-release \ xdg-utils \ cmake \ - 'python3\.10' \ + 'python3\.12' \ nodejs \ npm \ tar \ @@ -84,13 +84,13 @@ RUN \ && \ echo "installed apt packages" -# Set Python 3.10 as the default version of Python 3 +# Set Python 3.12 as the default version of Python 3 RUN \ - update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.10 1 \ + update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.12 1 \ && \ - update-alternatives --set python3 /usr/bin/python3.10 \ + update-alternatives --set python3 /usr/bin/python3.12 \ && \ - ln -s /usr/bin/python3.10 /usr/bin/python + ln -s /usr/bin/python3.12 /usr/bin/python RUN \ echo $' \n\ @@ -165,19 +165,19 @@ RUN \ echo "finalized set up dependency versions" RUN \ - python3.10 --version \ + python3.12 --version \ && \ python3 --version \ && \ - curl -sS https://bootstrap.pypa.io/get-pip.py | python3.10 \ + curl -sS https://bootstrap.pypa.io/get-pip.py | python3.12 \ && \ - python3.10 -m pip install --upgrade --force-reinstall pip virtualenv \ + python3.12 -m pip install --upgrade --force-reinstall pip virtualenv \ && \ - python3.10 -m pip install wheel==0.45.1 setuptools==78.1.0 six==1.16.0 \ + python3.12 -m pip install wheel==0.45.1 setuptools==78.1.0 six==1.16.0 \ && \ - python3.10 -m pip install -r /opt/Empirical/third-party/requirements.txt \ + python3.12 -m pip install -r /opt/Empirical/third-party/requirements.txt \ && \ - python3.10 -m pip install -r /opt/Empirical/doc/requirements.txt \ + python3.12 -m pip install -r /opt/Empirical/doc/requirements.txt \ && \ echo "installed documentation build requirements" From b2059136de375dc42020c39ca19b52ca052fdf3a Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 9 Feb 2026 13:31:50 +0000 Subject: [PATCH 3/3] Switch base image from Ubuntu Focal to Jammy (22.04) The deadsnakes PPA has dropped Ubuntu Focal (20.04) support entirely, making it impossible to install Python 3.10 (or any other version) from the PPA. Ubuntu Jammy ships with Python 3.10 natively, removing the need for the deadsnakes PPA altogether. Changes: - Base image: ubuntu:focal-20230412 -> ubuntu:jammy - Replace deadsnakes PPA with Mozilla Team PPA (Firefox is snap-only in Jammy by default, need the PPA for deb-based install in Docker) - Add apt pinning to prefer Firefox from Mozilla PPA - Use native python3.10 package (no regex escaping needed) - Revert python3.12 references back to python3.10 https://claude.ai/code/session_01UWALAV2tXVZ3pDtg88Npo9 --- Dockerfile | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/Dockerfile b/Dockerfile index 6dea1d1ff..cd1c8a974 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # Pull base image. -FROM ubuntu:focal-20230412 +FROM ubuntu:jammy COPY . /opt/Empirical @@ -8,7 +8,7 @@ SHELL ["/bin/bash", "-c"] # Prevent interactive time zone config. # adapted from https://askubuntu.com/a/1013396 ENV DEBIAN_FRONTEND=noninteractive -ENV SPHINXBUILD="python3.12 -m sphinx" +ENV SPHINXBUILD="python3.10 -m sphinx" RUN \ echo 'Acquire::http::Timeout "60";' >> "/etc/apt/apt.conf.d/99timeout" \ @@ -30,7 +30,9 @@ RUN \ && \ for n in $(seq 1 5); do add-apt-repository -y ppa:ubuntu-toolchain-r/test && sleep 5 && break; done \ && \ - for n in $(seq 1 5); do add-apt-repository -y ppa:deadsnakes/ppa && sleep 5 && break; done \ + for n in $(seq 1 5); do add-apt-repository -y ppa:mozillateam/ppa && sleep 5 && break; done \ + && \ + printf 'Package: firefox*\nPin: release o=LP-PPA-mozillateam\nPin-Priority: 1001\n' > /etc/apt/preferences.d/mozilla-firefox \ && \ for n in $(seq 1 5); do apt-get update -y && sleep 5 && break; done \ && \ @@ -53,7 +55,7 @@ RUN \ lsb-release \ xdg-utils \ cmake \ - 'python3\.12' \ + python3.10 \ nodejs \ npm \ tar \ @@ -84,13 +86,13 @@ RUN \ && \ echo "installed apt packages" -# Set Python 3.12 as the default version of Python 3 +# Set Python 3.10 as the default version of Python 3 RUN \ - update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.12 1 \ + update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.10 1 \ && \ - update-alternatives --set python3 /usr/bin/python3.12 \ + update-alternatives --set python3 /usr/bin/python3.10 \ && \ - ln -s /usr/bin/python3.12 /usr/bin/python + ln -s /usr/bin/python3.10 /usr/bin/python RUN \ echo $' \n\ @@ -165,19 +167,19 @@ RUN \ echo "finalized set up dependency versions" RUN \ - python3.12 --version \ + python3.10 --version \ && \ python3 --version \ && \ - curl -sS https://bootstrap.pypa.io/get-pip.py | python3.12 \ + curl -sS https://bootstrap.pypa.io/get-pip.py | python3.10 \ && \ - python3.12 -m pip install --upgrade --force-reinstall pip virtualenv \ + python3.10 -m pip install --upgrade --force-reinstall pip virtualenv \ && \ - python3.12 -m pip install wheel==0.45.1 setuptools==78.1.0 six==1.16.0 \ + python3.10 -m pip install wheel==0.45.1 setuptools==78.1.0 six==1.16.0 \ && \ - python3.12 -m pip install -r /opt/Empirical/third-party/requirements.txt \ + python3.10 -m pip install -r /opt/Empirical/third-party/requirements.txt \ && \ - python3.12 -m pip install -r /opt/Empirical/doc/requirements.txt \ + python3.10 -m pip install -r /opt/Empirical/doc/requirements.txt \ && \ echo "installed documentation build requirements"