diff --git a/gpu.Dockerfile b/gpu.Dockerfile index cd8051c3..63b429ba 100644 --- a/gpu.Dockerfile +++ b/gpu.Dockerfile @@ -63,5 +63,17 @@ RUN pip install pycuda && \ pip install pynvrtc && \ /tmp/clean-layer.sh +# Install NVIDA Apex +# Make sure we don't overwrite some existing directory called "apex" +WORKDIR /tmp/unique_for_apex +# uninstall Apex if present, twice to make absolutely sure :) +RUN pip uninstall -y apex || : +RUN pip uninstall -y apex || : +# SHA is something the user can touch to force recreation of this Docker layer, +# and therefore force cloning of the latest version of Apex +RUN SHA=ToUcHMe git clone https://github.com/NVIDIA/apex.git +WORKDIR /tmp/unique_for_apex/apex +RUN pip install -v --no-cache-dir --global-option="--cpp_ext" --global-option="--cuda_ext" . + # Re-add TensorBoard Jupyter extension patch ADD patches/tensorboard/notebook.py /opt/conda/lib/python3.6/site-packages/tensorboard/notebook.py