-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
50 lines (37 loc) · 1.62 KB
/
Dockerfile
File metadata and controls
50 lines (37 loc) · 1.62 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
# Use HippUnfold v1.1.0 docker as base
FROM khanlab/hippunfold:v1.1.0
USER root
# Remove hippunfold model not used
RUN rm /opt/hippunfold_cache/trained_model.3d_fullres.Task102_hcp1200_T2w.nnUNetTrainerV2.model_best.tar && \
rm /opt/hippunfold_cache/trained_model.3d_fullres.Task110_hcp1200_b1000crop.nnUNetTrainerV2.model_best.tar && \
rm /opt/hippunfold_cache/trained_model.3d_fullres.Task205_hcp1200_b1000_finetuneround2_dhcp_T1w.nnUNetTrainerV2.model_best.tar
# Update OS and install prerequisite
ENV DEBIAN_FRONTEND="noninteractive"
# Use archived repositories for Debian Buster (since it's EOL)
RUN sed -i 's|http://deb.debian.org/debian|http://archive.debian.org/debian|g' /etc/apt/sources.list && \
sed -i 's|http://security.debian.org/debian-security|http://archive.debian.org/debian-security|g' /etc/apt/sources.list && \
sed -i '/buster-updates/d' /etc/apt/sources.list
RUN apt-get --allow-releaseinfo-change update
RUN apt-get install -y python3-pip \
time \
csh \
vim \
tcsh
# Define working directory
RUN mkdir /app
WORKDIR /app
COPY . .
# create cache
RUN mkdir /.cache
RUN chmod -R 777 /.cache
# Add data folder to docker
RUN mkdir /data
# upate conda environment with aidhs package
RUN conda run -n base /bin/bash -c "pip install matplotlib==3.5.1 h5py==3.9.0 potpourri3d==0.0.7 neuroCombat==0.2.12 fpdf==1.7.2 joblib==1.2.0 scikit-learn==1.2.2 numpy==1.22.4 pybids==0.16.4 pytest==8.3.2"
# install aidhs package
RUN cd /app/ && conda run -n base /bin/bash -c "pip install -e ."
# Set permissions for the entrypoint
RUN chmod +x entrypoint.sh
ENV KEEP_DATA_PATH=1
ENV SILENT=1
ENTRYPOINT ["/bin/bash","entrypoint.sh"]