Dockerfile 563 Bytes
Newer Older
1
# Base image must at least have pytorch and CUDA installed.
2
ARG BASE_IMAGE=nvcr.io/nvidia/pytorch:19.01-py3
Michael Carilli's avatar
Michael Carilli committed
3
4
5
FROM $BASE_IMAGE
ARG BASE_IMAGE
RUN echo "Installing Apex on top of ${BASE_IMAGE}"
6
7
8
WORKDIR /workspace
# uninstall Apex if present
RUN pip uninstall -y apex || :
9
10
11
# 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
12
WORKDIR /workspace/apex
13
RUN python setup.py install --cuda_ext --cpp_ext
14
WORKDIR /workspace