-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathDockerfile
34 lines (27 loc) · 940 Bytes
/
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
FROM nvidia/cuda:11.4.0-devel-ubuntu20.04
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update &&\
apt-get -y install \
build-essential yasm nasm cmake \
git htop tmux \
python3 python3-pip python3-dev python3-setuptools python3-opencv &&\
ln -s /usr/bin/python3 /usr/bin/python &&\
ln -sf /usr/bin/pip3 /usr/bin/pip &&\
apt-get clean &&\
apt-get autoremove &&\
rm -rf /var/lib/apt/lists/* &&\
rm -rf /var/cache/apt/archives/*
# Upgrade pip for cv package instalation
RUN pip3 install --upgrade pip==21.0.1
# Install PyTorch
RUN pip3 install --no-cache-dir \
torch==1.9.0+cu111 \
torchvision==0.10.0+cu111 \
-f https://download.pytorch.org/whl/torch_stable.html
ENV PYTHONPATH $PYTHONPATH:/workdir
ENV TORCH_HOME=/workdir/data/.torch
ENV LANG C.UTF-8
WORKDIR /workdir
# Install python ML packages
COPY requirements.txt /workdir
RUN pip3 install --no-cache-dir -r requirements.txt