-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
145 lines (133 loc) · 3.78 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
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
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
# syntax=docker/dockerfile:experimental
# FROM ubuntu:16.04
FROM nvidia/cuda:11.2.0-devel-ubuntu16.04
ARG DEBIAN_FRONTEND=noninteractive
ENV TERM=xterm-256color
RUN echo "dash dash/sh boolean false" | debconf-set-selections && \
dpkg-reconfigure dash
RUN sed -i 's/archive.ubuntu.com/mirrors.aliyun.com/g' /etc/apt/sources.list
# RUN --mount=type=cache,sharing=locked,id=aptlib,target=/var/lib/apt \
# --mount=type=cache,sharing=locked,id=aptcache,target=/var/cache/apt \
RUN apt update && apt install -y --no-install-recommends \
autoconf \
automake \
autotools-dev \
bison \
build-essential \
ctags \
curl \
docker.io \
flex \
ffmpeg \
gdb \
global \
git \
htop \
iputils-ping \
less \
libboost-dev \
libcurl4-openssl-dev \
libeigen3-dev \
libevent-dev \
libgl1-mesa-glx \
liblua5.2-dev \
libncurses5 \
libncurses5-dev \
libopencv-dev \
libperl-dev \
libreadline-dev \
libssl1.0.0 \
libx11-dev libxtst-dev libxt-dev libsm-dev libxpm-dev \
locales \
lsb-release \
lua5.2 \
m4 \
man \
mpich \
nasm \
net-tools \
openssh-server \
openssl \
pkg-config \
psutils \
rsync \
silversearcher-ag \
software-properties-common \
sudo \
tree \
wget \
zip unzip \
zsh
# apt clean && rm -rf /var/lib/apt/lists/*
# python3.7
RUN add-apt-repository -y ppa:deadsnakes/nightly && \
apt update && \
apt install -y python3.7 python3.7-dev python3.7-venv python3.7-distutils && \
apt clean && rm -rf /var/lib/apt/lists/* && \
update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.5 35 && \
update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.7 37
# pip
RUN curl https://bootstrap.pypa.io/get-pip.py | python3
# vim & tmux
# RUN --mount=type=tmpfs,target=/tmp \
RUN \
# aws \
pushd /tmp && \
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o /tmp/awscliv2.zip && \
unzip awscliv2.zip && ./aws/install && \
# vim 8.2 \
git clone --depth 1 --branch v8.2.1862 https://github.com/vim/vim.git && \
pushd vim && \
./configure \
--prefix=/usr/local \
--enable-gui=auto \
--with-x \
--with-features=huge \
--enable-multibyte \
--enable-python3interp=yes \
--with-python3-config-dir='/usr/lib/python3.7/config-3.7m-x86_64-linux-gnu' \
--enable-perlinterp=yes \
--enable-luainterp=yes \
--enable-cscope && make -j$(nproc) install && \
popd && \
# tmux 2.6 \
git clone --depth 1 --branch 2.6 https://github.com/tmux/tmux.git && \
pushd tmux && \
bash ./autogen.sh && ./configure --prefix=/usr/local && make -j$(nproc) install && \
popd && \
# su-exec \
git clone https://github.com/ncopa/su-exec.git && \
pushd su-exec && \
make && cp su-exec /sbin && \
popd
# locales
ENV LANGUAGE=en_US.UTF-8
ENV LANG=en_US.UTF-8
ENV LC_ALL=en_US.UTF-8
RUN locale-gen en_US.UTF-8 && dpkg-reconfigure locales
RUN curl -sL https://deb.nodesource.com/setup_15.x | sudo -E bash - && \
sudo apt-get install -y nodejs
# RUN --mount=type=cache,id=custom-pip,target=/root/.cache/pip \
RUN pip3 install \
cmake \
ipdb \
ipympl \
jupyterlab==2.2.9 \
matplotlib \
numpy \
opencv-python \
pandas \
scipy \
six \
tqdm
RUN pip3 install \
plotly==4.14.3 \
qgrid && \
jupyter nbextension enable --py --sys-prefix widgetsnbextension && \
jupyter nbextension enable --py --sys-prefix qgrid && \
jupyter labextension install @jupyter-widgets/[email protected] && \
jupyter labextension install jupyter-matplotlib && \
jupyter labextension install qgrid2 && \
jupyter labextension install [email protected] && \
jupyter labextension install [email protected]
RUN npm install --global http-server