Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions Dockerfile.tmpl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{{ if eq .Accelerator "gpu" }}
FROM us-docker.pkg.dev/colab-images/public/runtime:release-colab-external-images_20260716-060051_RC00
FROM us-docker.pkg.dev/colab-images/public/runtime:release-colab-external-images_20260917-060051_RC00
{{ else }}
FROM us-docker.pkg.dev/colab-images/public/cpu-runtime:release-colab-external-images_20260716-060051_RC00
FROM us-docker.pkg.dev/colab-images/public/cpu-runtime:release-colab-external-images_20260917-060051_RC00
{{ end}}

ADD kaggle_requirements.txt /kaggle_requirements.txt
Expand Down Expand Up @@ -36,7 +36,7 @@ ADD clean-layer.sh /tmp/clean-layer.sh
ADD patches/nbconvert-extensions.tpl /opt/kaggle/nbconvert-extensions.tpl
ADD patches/template_conf.json /opt/kaggle/conf.json

ARG PACKAGE_PATH=/usr/local/lib/python3.12/dist-packages
ARG PACKAGE_PATH=/usr/local/lib/python3.13/dist-packages

# Install GPU-specific non-pip packages.
{{ if eq .Accelerator "gpu" }}
Expand All @@ -56,9 +56,9 @@ RUN sed -i "s/httpredir.debian.org/debian.uchicago.edu/" /etc/apt/sources.list &
apt-get install -y graphviz && pip install graphviz && \
/tmp/clean-layer.sh

ADD patches/keras_internal.py \
patches/keras_internal_test.py \
$PACKAGE_PATH/tensorflow_decision_forests/keras/
# patches/keras_internal.py is not installed right now. tensorflow_decision_forests
# is no longer in the base image and its latest release (1.12.0) ships no cp313
# wheel, so there is no tensorflow_decision_forests/keras/ to patch.

RUN apt-get install -y libfreetype6-dev && \
apt-get install -y libglib2.0-0 libxext6 libsm6 libxrender1 libfontconfig1 --fix-missing && \
Expand Down Expand Up @@ -86,7 +86,7 @@ RUN mkdir -p /usr/share/nltk_data && \
# git-lfs 3.7.1 built with Go 1.26, and Ubuntu's git-lfs 3.0.2 package
# overwrites it with an older build from Go 1.18.
# vtk dependencies
RUN apt-get install -y libgl1-mesa-glx && \
RUN apt-get install -y libgl1 libglx-mesa0 && \
# xvfbwrapper dependencies
apt-get install -y xvfb && \
/tmp/clean-layer.sh
Expand Down Expand Up @@ -147,7 +147,7 @@ ADD patches/kaggle_gcp.py \

# Figure out why this is in a different place?
# Found by doing a export PYTHONVERBOSE=1 and then running python and checking for where it looked for it.
ADD patches/sitecustomize.py /usr/lib/python3.12/sitecustomize.py
ADD patches/sitecustomize.py /usr/lib/python3.13/sitecustomize.py

ARG GIT_COMMIT=unknown \
BUILD_DATE=unknown
Expand Down
34 changes: 19 additions & 15 deletions kaggle_requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,10 @@ dipy
docker
easyocr
emoji
# TODO: b/545164527 - unpin once fastai supports fastcore v2.
# fastcore v2 removed L.starmap, breaking fastai's Optimizer.set_hypers:
# https://github.com/fastai/fastai/issues/4154
# Pinned here rather than on a direct dep because nbdev, execnb, ghapi, fastgit
# and fastspec all pull fastcore uncapped; only constraining fastcore itself
# makes the resolver backtrack all of them.
fastcore<2
fasttext
featuretools
fiona
flax
flax>=0.12
# TODO: b/545164527 - unpin once dipy ships its fury<2.0 cap.
# fury 2.0 swapped VTK for pygfx/wgpu, breaking `from dipy.viz import window`.
# dipy requires fury uncapped; fix is merged upstream but unreleased:
Expand All @@ -62,8 +55,11 @@ isoweek
jedi
# jitler 0.11.1 breaks simulation image
jiter==0.10.0
# b/276358430: fix Jupyter lsp freezing up the jupyter server

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

jupyter-lsp==1.5.1
# b/276358430: jupyter-lsp was pinned to 1.5.1 to stop Jupyter lsp freezing up
# the jupyter server. That pin is unusable on Python 3.13: it holds jupyterlab
# back to the 3.x line, which pulls jupyter-ydoc 0.2.5 -> y-py 0.6.2, and y-py
# publishes no cp313 wheel and its sdist no longer builds. jupyterlab 4.x
# replaced y-py with pycrdt, so leave jupyter-lsp unpinned.
# b/333854354: pin jupyter-server to version 2.12.5; later versions break LSP (b/333854354)
jupyter_server==2.12.5
jupyter_server_proxy
Expand Down Expand Up @@ -91,6 +87,15 @@ nbdev
nilearn
olefile
onnx
# The base image ships an inconsistent OpenCV set: opencv-python and
# opencv-python-headless at 5.0.0.93 but opencv-contrib-python at 4.14.0.94.
# They all install into the same cv2/ package and clobber each other, and
# OpenCV 5.0 dropped long-standing APIs (e.g. cv2.CascadeClassifier). Hold the
# whole set on the last 4.x release so cv2 stays consistent and notebooks that
# use the 4.x API keep working.
opencv-contrib-python<5
opencv-python<5
opencv-python-headless<5
openslide-bin
openslide-python
optuna
Expand All @@ -113,10 +118,6 @@ pyexcel-ods
pymongo
pypdf
pytesseract
# fastprogress pulls in python-fasthtml uncapped, and 0.14.6 raised its
# floor to fastcore v2, which conflicts with the fastcore<2 pin above.
# Remove once fastcore can be unpinned.
python-fasthtml<0.14.6
python-lsp-server
pytorch-ignite
pytorch-lightning
Expand All @@ -132,7 +133,9 @@ scikit-plot
scikit-surprise
git+https://github.com/facebookresearch/segment-anything.git
squarify
tensorflow-io
# tensorflow-io was dropped when the base image moved to Python 3.13. Its last
# release (0.37.1, 2024-07-01) declares requires_python <3.13 and ships no cp313
# wheels, and the project is unmaintained.
# Must be compatible with torch version: https://github.com/meta-pytorch/torchcodec?tab=readme-ov-file#installing-torchcodec
torchcodec==0.11.0
torchinfo
Expand All @@ -142,6 +145,7 @@ transformers>=5.0.0
# The base image ships urllib3 2.5; pin up to a newer release.
# Remove once the base image ships >=2.7 itself.
urllib3>=2.7
universal-pathlib
vtk
wavio
xvfbwrapper
Expand Down
Loading