-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
65 lines (54 loc) · 1.83 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#flywheel/fmriprep
############################
# Get the image from DockerHub
FROM cookpa/antsct-aging:0.2.0
MAINTAINER Will Tackett <William.Tackett@pennmedicine.upenn.edu>
############################
# Install basic dependencies
RUN apt-get update && apt-get -y install \
jq \
tar \
zip \
curl \
nano \
build-essential
#RUN rm -f /usr/bin/python && ln -s /usr/bin/python /usr/bin/python3
############################
# Install conda environment
RUN curl -sSLO https://repo.continuum.io/miniconda/Miniconda3-4.5.11-Linux-x86_64.sh && \
bash Miniconda3-4.5.11-Linux-x86_64.sh -b -p /usr/local/miniconda && \
rm Miniconda3-4.5.11-Linux-x86_64.sh
ENV PATH=/usr/local/miniconda/bin:$PATH \
LANG=C.UTF-8 \
LC_ALL=C.UTF-8 \
PYTHONNOUSERSITE=1
RUN conda install -y python=3.7.1 \
chmod -R a+rX /usr/local/miniconda; sync && \
chmod +x /usr/local/miniconda/bin/*; sync && \
conda build purge-all; sync && \
conda clean -tipsy && sync
############################
# Install the Flywheel SDK
RUN pip install flywheel-sdk
RUN pip install heudiconv
RUN pip install --upgrade fw-heudiconv ipython
RUN pip install pybids
RUN pip install -U templateflow
ENV TEMPLATEFLOW_HOME /flywheel/v0/.templateflow
############################
# Make directory for flywheel spec (v0)
ENV FLYWHEEL /flywheel/v0
RUN mkdir -p ${FLYWHEEL}
COPY run ${FLYWHEEL}/run
COPY prepare_run.py ${FLYWHEEL}/prepare_run.py
COPY manifest.json ${FLYWHEEL}/manifest.json
COPY BIDsDerivative.sh ${FLYWHEEL}/BIDsDerivative.sh
COPY .templateflow ${FLYWHEEL}/.templateflow
RUN chmod a+rx ${FLYWHEEL}/*
# Set the entrypoint
ENTRYPOINT ["/flywheel/v0/run"]
############################
# ENV preservation for Flywheel Engine
RUN env -u HOSTNAME -u PWD | \
awk -F = '{ print "export " $1 "=\"" $2 "\"" }' > ${FLYWHEEL}/docker-env.sh
WORKDIR /flywheel/v0