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 11ARG BASE_TAG=latest
22ARG TENSORFLOW_VERSION=2.2.0
33
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
55FROM gcr.io/deeplearning-platform-release/base-cpu:${BASE_TAG}
66
77ADD clean-layer.sh /tmp/clean-layer.sh
@@ -66,8 +66,9 @@ RUN pip install /tmp/tensorflow_gcs_config/tensorflow*.whl && \
6666 /tmp/clean-layer.sh
6767
6868# 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/ && \
7172 /tmp/clean-layer.sh
7273
7374RUN apt-get install -y libfreetype6-dev && \
Original file line number Diff line number Diff line change 11ARG BASE_TAG=staging
22
33FROM 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
55FROM gcr.io/kaggle-images/python:${BASE_TAG}
66
77ADD clean-layer.sh /tmp/clean-layer.sh
@@ -102,6 +102,12 @@ RUN pip uninstall -y tensorflow && \
102102 pip install --no-deps mxnet-cu$CUDA_MAJOR_VERSION$CUDA_MINOR_VERSION && \
103103 /tmp/clean-layer.sh
104104
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+
105111# Install GPU-only packages
106112RUN pip install pycuda && \
107113 pip install cupy-cuda$CUDA_MAJOR_VERSION$CUDA_MINOR_VERSION && \
You can’t perform that action at this time.
0 commit comments