File tree Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Original file line number Diff line number Diff line change 1
1
ARG BASE_TAG=latest
2
2
ARG TENSORFLOW_VERSION=2.2.0
3
3
4
- FROM gcr.io/kaggle-images/python-tensorflow-whl:${TENSORFLOW_VERSION}-py37 as tensorflow_whl
4
+ FROM gcr.io/kaggle-images/python-tensorflow-whl:${TENSORFLOW_VERSION}-py37-2 as tensorflow_whl
5
5
FROM gcr.io/deeplearning-platform-release/base-cpu:${BASE_TAG}
6
6
7
7
ADD clean-layer.sh /tmp/clean-layer.sh
@@ -66,8 +66,9 @@ RUN pip install /tmp/tensorflow_gcs_config/tensorflow*.whl && \
66
66
/tmp/clean-layer.sh
67
67
68
68
# Install TensorFlow addons (TFA).
69
- # TFA functionnality relying on Custom Op won't work. See: https://github.com/tensorflow/addons/issues/987.
70
- RUN pip install tensorflow-addons==0.10.0 && \
69
+ COPY --from=tensorflow_whl /tmp/tfa_cpu/*.whl /tmp/tfa_cpu/
70
+ RUN pip install /tmp/tfa_cpu/tensorflow*.whl && \
71
+ rm -rf /tmp/tfa_cpu/ && \
71
72
/tmp/clean-layer.sh
72
73
73
74
RUN apt-get install -y libfreetype6-dev && \
Original file line number Diff line number Diff line change 1
1
ARG BASE_TAG=staging
2
2
3
3
FROM nvidia/cuda:10.1-cudnn7-devel-ubuntu18.04 AS nvidia
4
- FROM gcr.io/kaggle-images/python-tensorflow-whl:2.2.0-py37 as tensorflow_whl
4
+ FROM gcr.io/kaggle-images/python-tensorflow-whl:2.2.0-py37-2 as tensorflow_whl
5
5
FROM gcr.io/kaggle-images/python:${BASE_TAG}
6
6
7
7
ADD clean-layer.sh /tmp/clean-layer.sh
@@ -102,6 +102,12 @@ RUN pip uninstall -y tensorflow && \
102
102
pip install --no-deps mxnet-cu$CUDA_MAJOR_VERSION$CUDA_MINOR_VERSION && \
103
103
/tmp/clean-layer.sh
104
104
105
+ # Reinstall TensorFlow addons (TFA) with GPU support.
106
+ COPY --from=tensorflow_whl /tmp/tfa_gpu/*.whl /tmp/tfa_gpu/
107
+ RUN pip install /tmp/tfa_gpu/tensorflow*.whl && \
108
+ rm -rf /tmp/tfa_gpu/ && \
109
+ /tmp/clean-layer.sh
110
+
105
111
# Install GPU-only packages
106
112
RUN pip install pycuda && \
107
113
pip install cupy-cuda$CUDA_MAJOR_VERSION$CUDA_MINOR_VERSION && \
You can’t perform that action at this time.
0 commit comments