From 378d31029d5f3c01332b7b8356e28f7d3a064c53 Mon Sep 17 00:00:00 2001 From: Yuwen Heng <15895948+123mutourener@users.noreply.github.com> Date: Wed, 6 Jul 2022 19:03:33 +0800 Subject: [PATCH] Add files via upload Add Dockerfile --- Dockerfile | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..976ac6b --- /dev/null +++ b/Dockerfile @@ -0,0 +1,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 + -- GitLab