-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
43 lines (37 loc) · 1.46 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
# syntax=docker/dockerfile:1
# Use Ubuntu 20.04
FROM ubuntu:20.04
# Install Ubuntu packages
RUN apt-get update && \
apt-get install --yes \
curl \
git
# Installing and SetUp MiniConda latest
RUN curl -sSLO https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh && \
bash Miniconda3-latest-Linux-x86_64.sh -b -p /opt/miniconda && \
rm Miniconda3-latest-Linux-x86_64.sh
ENV PATH="/opt/miniconda/bin:$PATH"
# Install conda environment
RUN conda install --yes -c conda-forge tensorflow \
scipy \
keras \
numpy \
nibabel \
nipype \
simpleitk && \
chmod -R a+rX /opt/miniconda; sync && \
chmod +x /opt/miniconda/bin/*; sync && \
conda build purge-all; sync && \
conda clean -tipsy && sync
# NiPype environmental variables
ENV MKL_NUM_THREADS=1
ENV OMP_NUM_THREADS=1
# Create home directory
RUN useradd -m -s /bin/bash -G users wmhpypes
ENV HOME="/home/wmhpypes"
# Install WMHpypes
RUN git clone https://github.com/0rC0/WMHpypes.git /home/wmhpypes/wmhpypes && \
cd /home/wmhpypes/wmhpypes && \
pip install .
ENV PATH="/home/wmhpypes/wmhpypes/scripts":$PATH
ENTRYPOINT ["/opt/miniconda/bin/python", "/home/wmhpypes/wmhpypes/scripts/segment_wmh.py"]