@@ -31,29 +31,41 @@ RUN uv pip uninstall --system google-cloud-bigquery-storage
31
31
# b/394382016: sigstore (dependency of kagglehub) requires a prerelease packages, installing separate.
32
32
RUN uv pip install --system --force-reinstall --prerelease=allow kagglehub[pandas-datasets,hf-datasets,signing]>=0.3.9
33
33
34
+ # b/408284143: google-cloud-automl 2.0.0 introduced incompatible API changes, need to pin to 1.0.1
35
+
36
+ # b/408284435: Keras 3.6 broke test_keras.py > test_train > keras.datasets.mnist.load_data()
37
+ # See https://github.com/keras-team/keras/commit/dcefb139863505d166dd1325066f329b3033d45a
38
+ # Colab base is on Keras 3.8, we have to install the package separately
39
+ RUN uv pip install --system google-cloud-automl==1.0.1 google-cloud-aiplatform google-cloud-translate==3.12.1 \
40
+ google-cloud-videointelligence google-cloud-vision google-genai "keras<3.6"
41
+
34
42
# uv cannot install this in requirements.txt without --no-build-isolation
35
43
# to avoid affecting the larger build, we'll post-install it.
36
44
RUN uv pip install --no-build-isolation --system "git+https://github.com/Kaggle/learntools"
37
45
38
- # b/385161357 Latest Colab uses tf 2.17.1, but tf decision forests only has a version for 2.17.0.
39
- # Instead, we'll install tfdf with its deps and hope that 2.17.0 compat tfdf works with tf 2.17.1.
40
- RUN uv pip install --system --no-deps tensorflow-decision-forests==1.10.0 wurlitzer==3.1.1 ydf==0.9.0
46
+ # b/408281617: Torch is adamant that it can not install cudnn 9.3.x, only 9.1.x, but Tensorflow can only support 9.3.x.
47
+ # This conflict causes a number of package downgrades, which are handled in this command
48
+ RUN uv pip install --system --force-reinstall --extra-index-url https://pypi.nvidia.com pynvjitlink-cu12 cuml-cu12==25.2.1 \
49
+ nvidia-cudnn-cu12==9.3.0.75 scipy tsfresh
50
+ RUN uv pip install --system --force-reinstall pynvjitlink-cu12==0.5.2
41
51
42
52
# b/385145217 Latest Colab lacks mkl numpy, install it.
43
53
RUN uv pip install --system --force-reinstall -i https://pypi.anaconda.org/intel/simple numpy
44
54
45
- # b/328788268 We install an incompatible pair of libs (shapely<2, libpysal==4.9.2) so we can't put this one in the requirements.txt
46
55
# newer daal4py requires tbb>=2022, but libpysal is downgrading it for some reason
47
56
RUN uv pip install --system "tbb>=2022" "libpysal==4.9.2"
48
57
58
+ # b/404590350: Ray and torchtune have conflicting tune cli, we will prioritize torchtune.
59
+ RUN uv pip install --system --force-reinstall --no-deps torchtune
60
+
49
61
# Adding non-package dependencies:
50
62
51
63
ADD clean-layer.sh /tmp/clean-layer.sh
52
64
ADD patches/nbconvert-extensions.tpl /opt/kaggle/nbconvert-extensions.tpl
53
65
ADD patches/template_conf.json /opt/kaggle/conf.json
54
66
55
- # /opt/conda/lib/python3.10 /site-packages
56
- ARG PACKAGE_PATH=/usr/local/lib/python3.10 /dist-packages
67
+ # /opt/conda/lib/python3.11 /site-packages
68
+ ARG PACKAGE_PATH=/usr/local/lib/python3.11 /dist-packages
57
69
58
70
# Install GPU-specific non-pip packages.
59
71
{{ if eq .Accelerator "gpu" }}
@@ -108,6 +120,9 @@ RUN apt-get install -y libfreetype6-dev && \
108
120
apt-get install -y libglib2.0-0 libxext6 libsm6 libxrender1 libfontconfig1 --fix-missing
109
121
110
122
# NLTK Project datasets
123
+ # b/408298750: We currently reinstall the package, because we get the following error:
124
+ # `AttributeError: module 'inspect' has no attribute 'formatargspec'. Did you mean: 'formatargvalues'?`
125
+ RUN uv pip install --system --force-reinstall "nltk>=3.9.1"
111
126
RUN mkdir -p /usr/share/nltk_data && \
112
127
# NLTK Downloader no longer continues smoothly after an error, so we explicitly list
113
128
# the corpuses that work
@@ -120,7 +135,7 @@ RUN mkdir -p /usr/share/nltk_data && \
120
135
masc_tagged maxent_ne_chunker maxent_treebank_pos_tagger moses_sample movie_reviews \
121
136
mte_teip5 names nps_chat omw opinion_lexicon paradigms \
122
137
pil pl196x porter_test ppattach problem_reports product_reviews_1 product_reviews_2 propbank \
123
- pros_cons ptb punkt qc reuters rslp rte sample_grammars semcor senseval sentence_polarity \
138
+ pros_cons ptb punkt punkt_tab qc reuters rslp rte sample_grammars semcor senseval sentence_polarity \
124
139
sentiwordnet shakespeare sinica_treebank smultron snowball_data spanish_grammars \
125
140
state_union stopwords subjectivity swadesh switchboard tagsets timit toolbox treebank \
126
141
twitter_samples udhr2 udhr unicode_samples universal_tagset universal_treebanks_v20 \
@@ -198,7 +213,7 @@ ADD patches/kaggle_gcp.py \
198
213
199
214
# Figure out why this is in a different place?
200
215
# Found by doing a export PYTHONVERBOSE=1 and then running python and checking for where it looked for it.
201
- ADD patches/sitecustomize.py /usr/lib/python3.10 /sitecustomize.py
216
+ ADD patches/sitecustomize.py /usr/lib/python3.11 /sitecustomize.py
202
217
203
218
ARG GIT_COMMIT=unknown \
204
219
BUILD_DATE=unknown
0 commit comments