-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
executable file
·66 lines (52 loc) · 2.37 KB
/
Copy pathDockerfile
File metadata and controls
executable file
·66 lines (52 loc) · 2.37 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
FROM pytorch/pytorch:1.13.1-cuda11.6-cudnn8-devel
#anibali/pytorch:1.13.1-cuda11.7-ubuntu22.04
# docker pull anibali/pytorch:1.13.0-cuda11.8-ubuntu22.04
#FROM pytorch/pytorch:1.13.1-cuda11.6-cudnn8-devel
ENV TZ=US/Eastern
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
RUN apt update && apt install -y tzdata
RUN apt update && \
apt install --no-install-recommends -y build-essential software-properties-common && \
add-apt-repository -y ppa:deadsnakes/ppa && \
apt install --no-install-recommends -y python3.10 python3-pip python3-setuptools python3-distutils && \
apt-get install -y wget && \
apt clean && rm -rf /var/lib/apt/lists/*
RUN python3.10 -m pip install --upgrade pip
RUN apt-get update && apt-get install ffmpeg libsm6 libxext6 -y
RUN wget \
https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh \
&& mkdir /root/.conda \
&& bash Miniconda3-latest-Linux-x86_64.sh -b \
&& rm -f Miniconda3-latest-Linux-x86_64.sh
# Put conda in path so we can use conda activate
ENV PATH=$CONDA_DIR/bin:$PATH
RUN conda update -n base -c defaults conda
COPY environment.yml /environment.yml
RUN conda env create -f /environment.yml
## Create /entry.sh which will be our new shell entry point. This performs actions to configure the environment
## before starting a new shell (which inherits the env).
## The exec is important! This allows signals to pass
RUN (echo '#!/bin/bash' \
&& echo '__conda_setup="$(/opt/conda/bin/conda shell.bash hook 2> /dev/null)"' \
&& echo 'eval "$__conda_setup"' \
&& echo 'conda activate "${CONDA_TARGET_ENV:-base}"' \
&& echo '>&2 echo "ENTRYPOINT: CONDA_DEFAULT_ENV=${CONDA_DEFAULT_ENV}"' \
&& echo 'exec "$@"'\
) >> /entry.sh && chmod +x /entry.sh
SHELL ["/entry.sh", "/bin/bash", "-c"]
ENV CONDA_TARGET_ENV=bwh_plgg
RUN conda init && echo 'conda activate "${CONDA_TARGET_ENV:-base}"' >> ~/.bashrc
#ENTRYPOINT ["/entry.sh"]
COPY nnUnet/ /nnUnet/
COPY run.py /run.py
COPY HDBET_Code/ /HDBET_Code/
COPY example_input/ /example_input/
COPY temp_dir/ /temp_dir/
COPY reload_bash /reload_bash
RUN chmod +x /reload_bash
ENV RESULTS_FOLDER=/nnUnet/nnUnet_trained_models/
WORKDIR /nnUnet
RUN ["conda", "run", "-n", "bwh_plgg", "pip", "install", "-e", "."]
WORKDIR /
ENV MKL_SERVICE_FORCE_INTEL=1
ENTRYPOINT ["conda", "run", "-n", "bwh_plgg", "python", "/run.py"]