forked from glatard/hws
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
65 lines (55 loc) · 1.72 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
FROM ubuntu:focal
LABEL maintainer="[email protected]"
# Install Python and other required packages
RUN : \
&& apt-get -yq update \
&& apt-get install -yq --no-install-recommends \
python3-dev \
python3-pip \
curl \
openssh-client \
netbase \
g++ \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* \
&& ln -s /usr/bin/python3 /usr/bin/python \
&& ln -s /usr/bin/pip3 /usr/bin/pip \
&& :
# Retrieve the binaries for the latest version of git-annex.
RUN : \
&& curl \
https://downloads.kitenet.net/git-annex/linux/current/git-annex-standalone-amd64.tar.gz \
| tar -zxvf - \
&& sh /git-annex.linux/runshell \
&& :
# Install Python dependencies
RUN pip install datalad==0.13.1 boutiques notebook==5.* RISE nilearn matplotlib
# Install fslstats
ADD fslstats /bin
# Create Binder user, see https://mybinder.readthedocs.io/en/latest/tutorials/dockerfile.html
ARG NB_USER=jovyan
ARG NB_UID=1000
ENV USER ${NB_USER}
ENV NB_UID ${NB_UID}
ENV HOME /home/${NB_USER}
RUN adduser --disabled-password \
--gecos "Default user" \
--uid ${NB_UID} \
${NB_USER}
# Make sure the contents of our repo are in ${HOME}
COPY . ${HOME}
USER root
RUN chown -R ${NB_UID} ${HOME}
USER ${NB_USER}
# Configure Git
ENV PATH="/git-annex.linux:${PATH}"
RUN : \
&& git config --global user.email "[email protected]" \
&& git config --global user.name "HIBALL Winter School container" \
&& :
# disinherit previous entrypoints
ENTRYPOINT []
# Hack Boutiques descriptor to run on baremetal rather than in container
RUN mkdir -p ${HOME}/.cache/boutiques/production
ADD zenodo-4472771.json /${HOME}/.cache/boutiques/production
ENV FSLOUTPUTTYPE=NIFTI_GZ