@@ -99,12 +99,24 @@ RUN conda config --add channels nvidia && \
99
99
mamba install -y mkl cartopy imagemagick pyproj "shapely<2" && \
100
100
/tmp/clean-layer.sh
101
101
102
+ # Install spacy
103
+ {{ if eq .Accelerator "gpu" }}
104
+ RUN mamba install -y -c conda-forge spacy cupy cuda-version=$CUDA_MAJOR_VERSION.$CUDA_MINOR_VERSION && \
105
+ /tmp/clean-layer.sh
106
+ {{ else }}
107
+ RUN pip install spacy && \
108
+ /tmp/clean-layer.sh
109
+ {{ end}}
102
110
{{ if eq .Accelerator "gpu" }}
103
111
104
112
# b/232247930: uninstall pyarrow to avoid double installation with the GPU specific version.
105
113
RUN pip uninstall -y pyarrow && \
106
114
mamba install -y cudf cuml && \
107
115
/tmp/clean-layer.sh
116
+
117
+ # TODO: b/296444923 - Resolve pandas dependency another way
118
+ RUN sed -i 's/^is_extension_type/# is_extension_type/g' /opt/conda/lib/python3.10/site-packages/cudf/api/types.py \
119
+ && sed -i 's/^is_categorical/# is_categorical/g' /opt/conda/lib/python3.10/site-packages/cudf/api/types.py
108
120
{{ end }}
109
121
110
122
# Install PyTorch
@@ -150,14 +162,6 @@ RUN pip install jax[cpu] && \
150
162
/tmp/clean-layer.sh
151
163
{{ end }}
152
164
153
- # Install spacy
154
- {{ if eq .Accelerator "gpu" }}
155
- RUN mamba install -y -c conda-forge spacy cupy && \
156
- /tmp/clean-layer.sh
157
- {{ else }}
158
- RUN pip install spacy && \
159
- /tmp/clean-layer.sh
160
- {{ end}}
161
165
162
166
# Install GPU specific packages
163
167
{{ if eq .Accelerator "gpu" }}
@@ -177,12 +181,13 @@ RUN JAXVER=$(pip freeze | grep -e "^jax==") && \
177
181
pandas \
178
182
polars \
179
183
flax \
180
- "${JAXVER}" && \
184
+ "${JAXVER}"
185
+
186
+ RUN apt-get install -y default-jre
181
187
182
- # Install h2o from source.
183
- # Use `conda install -c h2oai h2o` once Python 3.7 version is released to conda.
184
- apt-get install -y default-jre-headless && \
185
- pip install -f https://h2o-release.s3.amazonaws.com/h2o/latest_stable_Py.html h2o \
188
+ RUN pip install -f http://h2o-release.s3.amazonaws.com/h2o/latest_stable_Py.html h2o && /tmp/clean-layer.sh
189
+
190
+ RUN pip install \
186
191
"tensorflow-gcs-config<=${TENSORFLOW_VERSION}" \
187
192
"tensorflow==${TENSORFLOW_VERSION}" \
188
193
tensorflow-addons \
@@ -248,7 +253,6 @@ RUN pip install scipy \
248
253
datashader \
249
254
# Boruta (python implementation)
250
255
Boruta && \
251
-
252
256
apt-get install -y graphviz && pip install graphviz && \
253
257
# Pandoc is a dependency of deap
254
258
apt-get install -y pandoc && \
@@ -470,6 +474,7 @@ RUN pip install bleach \
470
474
pyarrow \
471
475
feather-format \
472
476
fastai
477
+
473
478
RUN python -m spacy download en_core_web_sm && python -m spacy download en_core_web_lg && \
474
479
apt-get update && apt-get install -y ffmpeg && \
475
480
/tmp/clean-layer.sh
@@ -678,4 +683,4 @@ RUN echo "$GIT_COMMIT" > /etc/git_commit && echo "$BUILD_DATE" > /etc/build_date
678
683
{{ if eq .Accelerator "gpu" }}
679
684
# Remove the CUDA stubs.
680
685
ENV LD_LIBRARY_PATH="$LD_LIBRARY_PATH_NO_STUBS"
681
- {{ end }}
686
+ {{ end }}
0 commit comments