-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
126 lines (118 loc) · 4.18 KB
/
Dockerfile
File metadata and controls
126 lines (118 loc) · 4.18 KB
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
FROM pytorch/pytorch:1.8.1-cuda11.1-cudnn8-devel
# FROM bit:5000/qic_emseg_torch1.8_v1.1
# FROM bit:5000/zhm-py36-torch12
MAINTAINER zenghuimin ([email protected])
WORKDIR /ghome/zenghm
ENV LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu:/usr/local/cuda-11.1/lib64:$LD_LIBRARY_PATH
ENV LD_LIBRARY_PATH=/usr/local/cuda/extras/CUPTI/lib64:/usr/local/cuda/compat/lib:/usr/local/nvidia/lib:/usr/local/nvidia/lib64
ENV DEBIAN_FRONTEND=noninteractive
RUN sed -i 's/archive.ubuntu.com/mirrors.ustc.edu.cn/g' /etc/apt/sources.list && \
# RUN sed -i 's/archive.ubuntu.com/mirrors.ustc.edu.cn/g'/etc/apt/sources.list > /tmp/tmpfile420 && \
# cat /tmp/tmpfile420 > /etc/apt/sources.list\
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
# ------------------------------------------------------------------
apt-get install -y --no-install-recommends \
apt-utils \
build-essential \
ca-certificates \
cmake \
wget \
ffmpeg \
git \
vim \
htop \
tmux \
openssh-client \
openssh-server \
libboost-dev \
libboost-thread-dev \
libboost-filesystem-dev \
libglib2.0-0 \
libsm6 \
libxext6 \
libxrender-dev \
python3-dev openslide-tools python3-openslide imagemagick screen zip psmisc \
libgl1-mesa-glx libgl1-mesa-dev
RUN useradd -m zenghm -u 1722 -s /bin/bash && \
echo "zenghm:admin!" | chpasswd && \
echo "zenghm ALL=(ALL) ALL" >> /etc/sudoers
USER zenghm
COPY miniconda.sh /home/zenghm/
# ==================================================================
# Miniconda3
# ------------------------------------------------------------------
RUN /bin/bash /home/zenghm/miniconda.sh -b -p /home/zenghm/anaconda3 && \
rm /home/zenghm/miniconda.sh
#echo "export PATH=/opt/conda/bin:$PATH" >> ~/.bashrc && \
ENV PATH=/home/zenghm/anaconda3/bin:$PATH
# ==================================================================
# conda
# ------------------------------------------------------------------
RUN conda config --set show_channel_urls yes && \
conda config --add channels conda-forge && \
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/ && \
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/ && \
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/ && \
conda install -y \
python=3.7 \
cudatoolkit=11.1 \
cudnn
RUN mkdir /home/zenghm/.pip && \
echo "[global]" > /home/zenghm/.pip/pip.conf && \
# sed -i -e "\$atrusted-host=mirrors.aliyun.com" /home/zenghm/.pip/pip.conf && \
# sed -i -e "\$aindex-url=http://mirrors.aliyun.com/pypi/simple/" /home/zenghm/.pip/pip.conf && \
sed -i -e "\$atrusted-host=pypi.doubanio.com/" /home/zenghm/.pip/pip.conf && \
sed -i -e "\$aindex-url=https://pypi.doubanio.com/simple/" /home/zenghm/.pip/pip.conf && \
pip install --upgrade pip && \
pip install pip install torch==1.8.0+cu111 torchvision==0.9.0+cu111 torchaudio==0.8.0 -f https://download.pytorch.org/whl/torch_stable.html \
# pip install pip install torch==1.8.0 torchvision==0.9.0 torchaudio==0.8.0 \
numpy \
cupy-cuda111 \
imageio \
matplotlib \
scikit-image \
easydict \
Pillow \
opencv-python \
opencv-contrib-python \
tensorboardX \
tensorboard \
future \
lmdb \
pyarrow \
thop \
scipy \
plyfile \
yacs \
tqdm \
argparse \
sacred \
progressbar2 \
path.py \
h5py \
pyyaml \
cython \
progressbar \
torchsummary waterz malis \
wandb lmdb pynvml einops \
omegaconf==2.1.0 \
torch-fidelity==0.3.0 \
pytorch-lightning==1.4.4 \
torchmetrics==0.5.0 \
av==8.0.3 \
facexlib \
mmcv-full -f https://download.openmmlab.com/mmcv/dist/cu111/torch1.8.0/index.html \
codecov \
flake8 \
interrogate \
isort==5.10.1 \
onnxruntime \
pytest \
pytest-runner \
yapf
EXPOSE 6006