-
Notifications
You must be signed in to change notification settings - Fork 1
/
bionic-gpu.Dockerfile
128 lines (99 loc) · 4.82 KB
/
bionic-gpu.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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
FROM nvidia/cuda:10.1-cudnn7-devel-ubuntu18.04
# ------ PART 0: set environment variables ------
# set up environment:
ENV DEBIAN_FRONTEND noninteractive
ENV PATH /opt/conda/bin:$PATH
ENV LANG=C.UTF-8 LC_ALL=C.UTF-8
ENV HOME=/root SHELL=/bin/bash
USER root
# ------ PART 1: set up sources & downloader ------
# remove default NVIDIA sources
# otherwise CUDA iwould be upgraded, which breaks the dependency of DL libs like Tensorflow and PyTorch:
RUN rm -f /etc/apt/sources.list.d/*
# use Ubuntu CN sources:
COPY ${PWD}/image/etc/apt/sources.list /etc/apt/sources.list
# use Python CN sources:
COPY ${PWD}/image/etc/pip.conf /root/.pip/pip.conf
# install apt-fast:
RUN apt-get update --fix-missing && \
apt-get install -y --no-install-recommends --allow-unauthenticated dirmngr gnupg2 software-properties-common axel aria2 && \
apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-keys 1EE2FF37CA8DA16B && \
add-apt-repository ppa:apt-fast/stable && \
apt-get update --fix-missing && \
apt-get install -y --no-install-recommends --allow-unauthenticated apt-fast && \
rm -rf /var/lib/apt/lists/*
# ------ PART 2: install Ubuntu packages ------
# use apt-fast CN sources:
COPY ${PWD}/image/etc/apt-fast.conf /etc/apt-fast.conf
# install packages:
RUN apt-fast update --fix-missing && \
apt-fast install -y --no-install-recommends --allow-downgrades --allow-change-held-packages --allow-unauthenticated \
curl grep sed dpkg wget bzip2 ca-certificates \
git mercurial subversion \
supervisor \
openssh-server pwgen sudo vim-tiny \
net-tools \
lxde x11vnc xvfb \
xorg-dev \
mesa-utils libgl1-mesa-dri libglu1-mesa-dev \
gtk2-engines-murrine ttf-ubuntu-font-family \
firefox \
nginx \
python3-pip python3-dev \
cmake build-essential libboost-all-dev \
gnome-themes-standard gtk2-engines-pixbuf gtk2-engines-murrine pinta \
libglib2.0-0 libxext6 libsm6 libxrender1 \
dbus-x11 x11-utils \
terminator \
# KITTI evaluation toolkit:
gnuplot ghostscript \
# latex:
texlive-extra-utils texlive-latex-extra \
cmake libgoogle-glog-dev libatlas-base-dev libeigen3-dev libdw-dev \
libpcl-dev && \
apt-fast autoclean && \
apt-fast autoremove && \
rm -rf /var/lib/apt/lists/*
# ------ PART 3: offline installs ------
COPY ${PWD}/installers /tmp/installers
WORKDIR /tmp/installers
# install tini:
#RUN dpkg -i tini.deb && \
# apt-get clean
RUN wget https://github.com/krallin/tini/releases/download/v0.19.0/tini_0.19.0.deb && \
dpkg -i tini_0.19.0.deb && \
apt-get clean
# install anaconda
#RUN wget -q --show-progress https://mirrors.tuna.tsinghua.edu.cn/anaconda/archive/Anaconda3-5.3.1-Linux-x86_64.sh -O anaconda.sh && \
#RUN wget -q --show-progress https://repo.anaconda.com/archive/Anaconda3-2021.05-Linux-x86_64.sh -O anaconda.sh && \
RUN wget -q --show-progress https://mirrors.tuna.tsinghua.edu.cn/anaconda/archive/Anaconda3-5.3.1-Linux-x86_64.sh -O anaconda.sh && \
/bin/bash anaconda.sh -b -p /opt/conda && \
ln -s /opt/conda/etc/profile.d/conda.sh /etc/profile.d/conda.sh && \
echo ". /opt/conda/etc/profile.d/conda.sh" >> ~/.bashrc
RUN rm -rf /tmp/installers
# ------ PART 4: set up VNC servers ------
# config desktop & VNC servers:
COPY image /
EXPOSE 80 5900 9001
# ------ PART 5: set up conda environments ------
WORKDIR /workspace
# keep conda updated to the latest version:
RUN conda config --add channels http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/ && \
conda config --add channels http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/msys2/ && \
conda config --add channels http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/ && \
conda config --append channels http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/fastai/ && \
conda config --append channels http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/ && \
conda config --append channels http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/bioconda/ && \
conda config --set show_channel_urls yes && \
conda update conda
#RUN conda update conda
# create environments for assignments:
COPY ${PWD}/environment environment
# the common package will be shared. no duplicated installation at all.
RUN conda env create -f environment/01-introduction.yaml && \
conda env create -f environment/02-nearest-neighbor.yaml && \
conda env create -f environment/03-clustering.yaml && \
conda env create -f environment/07-feature-detection.yaml && \
conda env create -f environment/08-feature-description.yaml && \
conda env create -f environment/09-point-cloud-registration.yaml
ENTRYPOINT ["/startup.sh"]