From f91399cea27a70b9e570e1d8a98c1e1eaae12410 Mon Sep 17 00:00:00 2001 From: Jai Ram Rideout Date: Thu, 11 Dec 2025 14:08:45 -0700 Subject: [PATCH] Upgrade to Python 3.13 Closes DEV-11114 --- Dockerfile | 16 ++++++++-------- requirements.txt | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Dockerfile b/Dockerfile index cba2ce4..4f02ef3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,7 +3,7 @@ # Extended from github.com/jupyter/docker-stacks # See also http://blog.dscpl.com.au/2016/01/roundup-of-docker-issues-when-hosting.html -FROM python:3.9-slim-bullseye +FROM python:3.13-slim-bullseye LABEL maintainer="Nick Greenfield " @@ -92,7 +92,7 @@ RUN wget https://ftp.samba.org/pub/cwrap/nss_wrapper-1.1.2.tar.gz && \ rm -rf nss_wrapper # Copy `onecodex` installed fonts to local directory -RUN cp /usr/local/lib/python3.9/site-packages/onecodex/assets/fonts/*.otf /usr/local/share/fonts && fc-cache +RUN cp /usr/local/lib/python3.13/site-packages/onecodex/assets/fonts/*.otf /usr/local/share/fonts && fc-cache # Configure container startup EXPOSE 8888 @@ -103,8 +103,8 @@ CMD ["jupyter", "notebook"] # Add assets RUN mkdir /opt/onecodex/ -COPY notebook/notebook.html /usr/local/lib/python3.9/site-packages/notebook/templates -COPY notebook/override.css /usr/local/lib/python3.9/site-packages/notebook/static/notebook/css +COPY notebook/notebook.html /usr/local/lib/python3.13/site-packages/notebook/templates +COPY notebook/override.css /usr/local/lib/python3.13/site-packages/notebook/static/notebook/css COPY notebook/onecodex.js /home/$NB_USER/.jupyter/custom/ COPY notebook/one-codex-spinner.svg /home/$NB_USER/.jupyter/custom/ COPY notebook/override.css /home/$NB_USER/.jupyter/custom/custom.css @@ -118,8 +118,8 @@ RUN jupyter nbextension install /usr/local/share/jupyter/customextensions/ \ RUN chmod +x /usr/local/bin/token_notebook.py # Add patch to jupyter notebook for export to One Codex document portal -COPY notebook/notebook.patch /usr/local/lib/python3.9/site-packages/notebook -RUN cd /usr/local/lib/python3.9/site-packages/notebook \ +COPY notebook/notebook.patch /usr/local/lib/python3.13/site-packages/notebook +RUN cd /usr/local/lib/python3.13/site-packages/notebook \ && patch -p0 < notebook.patch # Finally fix permissions on everything @@ -127,10 +127,10 @@ RUN cd /usr/local/lib/python3.9/site-packages/notebook \ # RUN chown -R $NB_USER:root /home/$NB_USER && chmod -R u+rw,g+rw /home/$NB_USER RUN chown -R $NB_USER:root /home/$NB_USER && find /home/$NB_USER -type d -exec chmod 775 {} \; -ENV PYTHONPATH "/home/jovyan/.local/lib/python3.9" +ENV PYTHONPATH "/home/jovyan/.local/lib/python3.13" # Provide full access to the Python directory to allow for pip installs -RUN chown -R $NB_USER:root /usr/local/lib/python3.9 +RUN chown -R $NB_USER:root /usr/local/lib/python3.13 # Switch to unprivileged user, jovyan USER $NB_USER diff --git a/requirements.txt b/requirements.txt index 946b919..299c688 100644 --- a/requirements.txt +++ b/requirements.txt @@ -7,5 +7,5 @@ openpyxl xlrd statsmodels onecodex[all,reports]==0.19.1 -taxonomy==0.10.0 +taxonomy widgetsnbextension