-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
161 lines (143 loc) · 4.47 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
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
FROM pytorch/pytorch:1.8.1-cuda11.1-cudnn8-devel
ENV TORCH_CUDA_ARCH_LIST="3.5 3.7 5.2 6.0 6.1 7.0+PTX"
ENV PATH /opt/conda/bin:$PATH
ENV LD_LIBRARY_PATH /usr/lib/x86_64-linux-gnu:/usr/local/cuda-11.1/lib64:$LD_LIBRARY_PATH
RUN sed -i 's/archive.ubuntu.com/mirrors.ustc.edu.cn/g' /etc/apt/sources.list && \
APT_INSTALL="apt-get install -y --no-install-recommends" && \
PIP_INSTALL="python -m pip --no-cache-dir install --upgrade -i https://pypi.tuna.tsinghua.edu.cn/simple" && \
GIT_CLONE="git clone --depth 10" && \
CONDA_INSTALL="conda install -y" && \
rm -rf /var/lib/apt/lists/* \
/etc/apt/sources.list.d/cuda.list \
/etc/apt/sources.list.d/nvidia-ml.list && \
apt-get update && \
# ==================================================================
# tools
# ------------------------------------------------------------------
DEBIAN_FRONTEND=noninteractive $APT_INSTALL \
apt-utils \
build-essential \
ca-certificates \
cmake \
wget \
git \
vim \
htop \
tmux \
openssh-client \
openssh-server \
libboost-dev \
libjpeg-dev \
zlib1g-dev \
libboost-thread-dev \
libboost-filesystem-dev \
libglib2.0-0 \
libsm6 \
libxext6 \
libxrender-dev \
zip \
unzip \
rsync \
&& \
# ==================================================================
# conda
# ------------------------------------------------------------------
# conda config --set show_channel_urls yes && \
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/ && \
conda config --set show_channel_urls yes && \
$CONDA_INSTALL \
python=3.8.8 && \
pip install torch==1.9.1+cu111 torchvision==0.10.1+cu111 torchaudio==0.9.1 -f https://download.pytorch.org/whl/torch_stable.html && \
pip install --upgrade pip && \
$PIP_INSTALL \
attr \
DALL-E \
timm \
numpy \
opencv_python \
scikit-learn \
scipy \
matplotlib \
plyfile \
nvidia-ml-py \
yacs \
tqdm \
tensorflow \
tensorflow_datasets \
tensorboardX \
argparse \
sacred \
progressbar2 \
path.py \
h5py \
blessings \
scikit-image \
lz4 \
lmdb\
fitlog\
appdirs\
cachetools\
certifi\
cffi\
chardet\
cycler\
Cython\
decorator\
easydict\
fire\
google-auth\
google-auth-oauthlib\
termcolor\
got10k\
grpcio\
idna\
imgaug\
resnest\
wandb \
imageio\
einops\
protobuf==3.19.* \
fire\
pytorch-lightning==1.7.0 \
tensorflow-graphics \
seaborn \
mediapy \
terminaltables \
&& \
conda clean -y --all && \
# ==================================================================
# Pillow-SIMD
# ------------------------------------------------------------------
pip uninstall -y pillow && \
pip install pillow-simd && \
# ==================================================================
# A bug about cv2
# ------------------------------------------------------------------
apt-get update &&\
apt-get install -y libgl1-mesa-dev &&\
# ==================================================================
# mmcv installtion
# ------------------------------------------------------------------
pip install mmcv-full==1.5.2 -f https://download.openmmlab.com/mmcv/dist/cu111/torch1.9.0/index.html &&\
pip install future tensorboard &&\
# ==================================================================
# config & cleanup
# ------------------------------------------------------------------
ldconfig && \
apt-get clean && \
apt-get autoremove && \
rm -rf /var/lib/apt/lists/* /tmp/* ~/* &&\
# ==================================================================
# video loader
# ------------------------------------------------------------------
pip install pytorchvideo &&\
pip install decord &&\
pip install pims &&\
pip install moviepy &&\
# ==================================================================
# davis
# ------------------------------------------------------------------
git clone https://github.com/davisvideochallenge/davis2017-evaluation.git &&\
cd davis2017-evaluation &&\
python setup.py develop
EXPOSE 6006