-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
36 lines (31 loc) · 1.26 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
FROM nvidia/cuda:11.4.1-cudnn8-devel-ubuntu20.04
USER root
WORKDIR /home/root
RUN rm /etc/apt/sources.list.d/cuda.list
RUN apt update && apt-get update && \
apt install -y git wget curl vim unzip zip libgl1-mesa-dev
RUN chmod 777 /home/root
SHELL ["/bin/bash", "-c"]
ENV PATH=/home/root/miniconda3/bin:$PATH
RUN wget https://repo.anaconda.com/miniconda/Miniconda3-py38_4.11.0-Linux-x86_64.sh
RUN bash ./Miniconda3-py38_4.11.0-Linux-x86_64.sh -b && rm ./Miniconda3-py38_4.11.0-Linux-x86_64.sh && \
source $HOME/miniconda3/bin/activate && \
conda init bash && \
conda config --set auto_activate_base false && \
. $HOME/.bashrc && \
conda update conda && \
conda create -n cv python=3.8 && \
conda activate cv && \
conda install pytorch torchvision torchaudio cudatoolkit=11.3 -c pytorch && \
pip install pytorch-lightning==1.2.3 &&\
pip install segmentation-models-pytorch==0.2.0 &&\
pip install mmcv==1.3.17 && \
pip install timm==0.4.12 && \
conda clean -ay
RUN source $HOME/miniconda3/bin/activate && \
. $HOME/.bashrc && \
conda activate cv && \
pip install opencv-python opencv-python-headless randaugment ptflops && \
conda install pandas && \
conda clean -ay
RUN echo "conda activate cv" >> ~/.bashrc