-
Notifications
You must be signed in to change notification settings - Fork 3
/
Dockerfile
41 lines (35 loc) · 1.49 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
# Source of image: https://hub.docker.com/r/nvidia/cuda
# Discussion about CUDA vesrion https://discuss.pytorch.org/t/pytorch-with-cuda-11-compatibility/89254
FROM nvidia/cuda:10.2-cudnn7-devel-ubuntu18.04
# Install prerequested
RUN apt-get -y update && \
apt-get -y install vim \
htop \
git \
wget \
sudo \
software-properties-common \
unzip \
tmux \
tree \
bash-completion \
nano
# System requirements
RUN apt-get -y install libsndfile1
# Install anaconda from https://repo.anaconda.com/archive/
RUN . ~/.bashrc && \
wget https://repo.anaconda.com/archive/Anaconda3-2019.10-Linux-x86_64.sh -O ~/anaconda3.sh && \
bash ~/anaconda3.sh -b && \
echo 'export PATH="/root/anaconda3/bin:$PATH"' >> ~/.bashrc && \
rm ~/anaconda3.sh
# Set normal TZ (mostly for logs)
RUN ln -sf /usr/share/zoneinfo/Europe/Moscow /etc/localtime
# Pytorch
# By default install latest version:
# Version downgrading available via requirements.txt
RUN . ~/.bashrc && conda install pytorch torchvision cudatoolkit=10.2 -c pytorch
# Requirements
COPY requirements.txt /root/requirements.txt
# RUN pip install --upgrade pip
RUN . ~/.bashrc && pip install --upgrade pip && pip install -r /root/requirements.txt && \
pip install --ignore-installed ruamel.yaml