-
Notifications
You must be signed in to change notification settings - Fork 55
/
Copy pathDockerfile
41 lines (33 loc) · 1.23 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
FROM nvidia/cuda:10.2-cudnn7-devel-ubuntu18.04
ENV LANG C.UTF-8
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update &&\
apt-get -y install build-essential yasm nasm \
cmake unzip git wget tmux nano \
sysstat libtcmalloc-minimal4 pkgconf autoconf libtool \
python3 python3-pip python3-dev python3-setuptools \
libsm6 libxext6 libxrender-dev \
python3-tk libasound-dev libportaudio2 &&\
ln -s /usr/bin/python3 /usr/bin/python &&\
ln -s /usr/bin/pip3 /usr/bin/pip &&\
apt-get clean &&\
apt-get autoremove &&\
rm -rf /var/lib/apt/lists/* &&\
rm -rf /var/cache/apt/archives/*
RUN pip3 install --upgrade pip==20.2.3
RUN pip3 install --no-cache-dir numpy==1.18.4
# Install PyTorch
RUN pip3 install --no-cache-dir \
torch==1.5.1 \
torchvision==0.6.0
RUN git clone https://github.com/NVIDIA/apex &&\
cd apex &&\
git checkout 3bae8c83494184673f01f3867fa051518e930895 &&\
pip install -v --no-cache-dir --global-option="--cpp_ext" --global-option="--cuda_ext" . &&\
cd .. && rm -rf apex
# Install python packages
COPY requirements.txt requirements.txt
RUN pip install --no-cache-dir -r requirements.txt
ENV PYTHONPATH $PYTHONPATH:/workdir
ENV TORCH_HOME=/workdir/data/.torch
WORKDIR /workdir