Skip to content

Commit 3cbacc0

Browse files
authored
Fix spacy by pinning mlk version (#1126)
Also install the GPU version of spacy. http://b/216162758
1 parent 9e8db9d commit 3cbacc0

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

Dockerfile.tmpl

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,8 @@ RUN conda config --add channels nvidia && \
6969
conda config --add channels rapidsai && \
7070
# Base image channel order: conda-forge (highest priority), defaults.
7171
# End state: rapidsai (highest priority), nvidia, conda-forge, defaults.
72-
conda install mkl cartopy=0.19 imagemagick=7.1 pyproj==3.1.0 && \
72+
# b/216162758 Pin mkl which last version breaks spacy.
73+
conda install mkl=2021.4.0 cartopy=0.19 imagemagick=7.1 pyproj==3.1.0 && \
7374
/tmp/clean-layer.sh
7475

7576
{{ if eq .Accelerator "gpu" }}
@@ -130,6 +131,15 @@ RUN pip install mxnet && \
130131
/tmp/clean-layer.sh
131132
{{ end}}
132133

134+
# Install spacy
135+
{{ if eq .Accelerator "gpu" }}
136+
RUN pip install spacy[cuda$CUDA_MAJOR_VERSION$CUDA_MINOR_VERSION] && \
137+
/tmp/clean-layer.sh
138+
{{ else }}
139+
RUN pip install spacy && \
140+
/tmp/clean-layer.sh
141+
{{ end}}
142+
133143
# Install GPU specific packages
134144
{{ if eq .Accelerator "gpu" }}
135145
# Install GPU-only packages

0 commit comments

Comments
 (0)