Dockerfile 542 Bytes
Newer Older
1
# Base image must at least have pytorch and CUDA installed.
mcarilli's avatar
mcarilli committed
2
ARG BASE_IMAGE=nvcr.io/nvidia/pytorch:18.12-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
13
14
WORKDIR /workspace/apex
RUN python setup.py install
WORKDIR /workspace