Skip to content

Commit 5f5c141

Browse files
authored
Merge pull request #573 from Remi-Gau/infra
[INFRA] misc
2 parents f8da99c + 303f868 commit 5f5c141

File tree

15 files changed

+436
-141
lines changed

15 files changed

+436
-141
lines changed

.all-contributorsrc

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"contributors": [
99
{
1010
"login": "OliColli",
11-
"name": "OliColli",
11+
"name": "Olivier Collignon",
1212
"avatar_url": "https://avatars0.githubusercontent.com/u/55407947?v=4",
1313
"profile": "https://cpplab.be",
1414
"contributions": [
@@ -19,7 +19,7 @@
1919
},
2020
{
2121
"login": "anege",
22-
"name": "anege",
22+
"name": "Ane Gurtubay",
2323
"avatar_url": "https://avatars0.githubusercontent.com/u/50317099?v=4",
2424
"profile": "https://github.com/anege",
2525
"contributions": [
@@ -40,7 +40,7 @@
4040
},
4141
{
4242
"login": "marcobarilari",
43-
"name": "marcobarilari",
43+
"name": "Marco Barilari",
4444
"avatar_url": "https://avatars3.githubusercontent.com/u/38101692?v=4",
4545
"profile": "https://github.com/marcobarilari",
4646
"contributions": [
@@ -70,7 +70,7 @@
7070
},
7171
{
7272
"login": "fedefalag",
73-
"name": "Fede F.",
73+
"name": "Federica Falagiarda",
7474
"avatar_url": "https://avatars2.githubusercontent.com/u/50373329?v=4",
7575
"profile": "https://github.com/fedefalag",
7676
"contributions": [
@@ -80,7 +80,7 @@
8080
},
8181
{
8282
"login": "CerenB",
83-
"name": "CerenB",
83+
"name": "Ceren Battal",
8484
"avatar_url": "https://avatars1.githubusercontent.com/u/10451654?v=4",
8585
"profile": "https://github.com/CerenB",
8686
"contributions": [
@@ -126,6 +126,15 @@
126126
"review",
127127
"userTesting"
128128
]
129+
},
130+
{
131+
"login": "mcgnunes",
132+
"name": "Márcia Nunes",
133+
"avatar_url": "https://avatars.githubusercontent.com/u/98760858?v=4",
134+
"profile": "https://github.com/mcgnunes",
135+
"contributions": [
136+
"bug"
137+
]
129138
}
130139
],
131140
"contributorsPerLine": 7,

.dockerignore

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# ignoring this might speed up build
2+
# by preventing passing extra content to the docker daemon
3+
14
.vscode
25
.git
36
.github
@@ -6,10 +9,8 @@ coverage_html
69
demos/*/outputs/
710
demos/*/inputs/
811
demos/*/cfg/
12+
docs
913
env
14+
manualTests
15+
templates
1016
tests
11-
12-
# ignoring this might speed up build
13-
# by preventing passing extra content to the docker daemon
14-
15-
# lib

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,12 @@ models/*
3030
# jupyter notebooks
3131
.ipynb_checkpoints
3232

33+
# node stuff
34+
35+
node_modules
36+
package*
37+
yarn.lock
38+
3339
## MATLAB / OCTAVE gitignore template
3440

3541
# From : https://github.com/github/gitignore/blob/master/Global/MATLAB.gitignore

CITATION.cff

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,9 @@ authors:
7272
orcid: "https://orcid.org/0000-0002-8724-7668"
7373
affiliation: "Université catholique de Louvain"
7474

75+
- family-names: "Nunes"
76+
given-names: "Márcia"
77+
7578
license: GPL-3.0
7679

7780
keywords:

Dockerfile

Lines changed: 45 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,69 @@
1-
# Creates a docker image of the default branch of CPP_SPM
1+
# Creates a docker image of CPP_SPM with
22

33
# this is mostly taken from the spm docker files: https://github.com/spm/spm-docker
4-
FROM ubuntu:focal
4+
FROM ubuntu:22.04
5+
6+
USER root
7+
8+
ENV LANG="en_US.UTF-8" \
9+
LC_ALL="en_US.UTF-8"
510

611
#TODO how to update this with the content of the current version
7-
LABEL version="1.1.2"
12+
LABEL version="1.1.5dev"
13+
14+
LABEL maintainer="Rémi Gau <remi.gau@gmail.com>"
815

16+
## Install SPM
917
# basic OS tools install and also octave
1018
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get -y install \
1119
build-essential \
1220
curl \
13-
git \
1421
octave \
1522
liboctave-dev \
16-
apt-get clean
23+
&& apt-get clean \
24+
&& rm -rf \
25+
/tmp/hsperfdata* \
26+
/var/*/apt/*/partial \
27+
/var/lib/apt/lists/* \
28+
/var/log/apt/term*
29+
30+
RUN mkdir /opt/spm12 \
31+
&& curl -SL https://github.com/spm/spm12/archive/r7771.tar.gz \
32+
| tar -xzC /opt/spm12 --strip-components 1 \
33+
&& curl -SL https://raw.githubusercontent.com/spm/spm-docker/main/octave/spm12_r7771.patch \
34+
| patch -p0 \
35+
&& make -C /opt/spm12/src PLATFORM=octave distclean \
36+
&& make -C /opt/spm12/src PLATFORM=octave \
37+
&& make -C /opt/spm12/src PLATFORM=octave install \
38+
&& ln -s /opt/spm12/bin/spm12-octave /usr/local/bin/spm12
39+
40+
RUN octave --no-gui --eval "addpath('/opt/spm12/'); savepath ();"
1741

18-
RUN rm -rf \
42+
## Install nods and bids validator
43+
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get -y install \
44+
nodejs npm \
45+
&& apt-get clean \
46+
&& rm -rf \
1947
/tmp/hsperfdata* \
2048
/var/*/apt/*/partial \
2149
/var/lib/apt/lists/* \
2250
/var/log/apt/term*
2351

24-
RUN mkdir /opt/spm12 && \
25-
curl -SL https://github.com/spm/spm12/archive/r7487.tar.gz | \
26-
tar -xzC /opt/spm12 --strip-components 1 && \
27-
curl -SL https://raw.githubusercontent.com/spm/spm-docker/master/octave/spm12_r7487.patch | \
28-
patch -p0 && \
29-
make -C /opt/spm12/src PLATFORM=octave distclean && \
30-
make -C /opt/spm12/src PLATFORM=octave && \
31-
make -C /opt/spm12/src PLATFORM=octave install && \
32-
ln -s /opt/spm12/bin/spm12-octave /usr/local/bin/spm12
52+
RUN node -v && npm -v && npm install -g bids-validator
53+
54+
## Install CPP SPM in user folder
55+
RUN test "$(getent passwd neuro)" || useradd --no-user-group --create-home --shell /bin/bash neuro
56+
57+
USER neuro
3358

34-
RUN octave --no-gui --eval "addpath(\"/opt/spm12\"); savepath ();"
59+
WORKDIR /home/neuro
3560

36-
RUN git clone --depth 1 --recurse-submodule https://github.com/cpp-lln-lab/CPP_SPM.git
61+
RUN mkdir code output cpp_spm
3762

38-
RUN mkdir code output
63+
WORKDIR /home/neuro/
3964

40-
RUN cd CPP_SPM && octave --no-gui --eval "initCppSpm(); savepath();"
65+
COPY [".", "/home/neuro/cpp_spm/"]
4166

42-
WORKDIR /code
67+
RUN cd cpp_spm && octave --no-gui --eval "initCppSpm(false); savepath();"
4368

4469
ENTRYPOINT ["octave"]

Dockerfile_dev

Lines changed: 0 additions & 53 deletions
This file was deleted.

Dockerfile_matlab

Lines changed: 139 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,139 @@
1+
# Generated by: Neurodocker version 0.7.0+0.gdc97516.dirty
2+
# Latest release: Neurodocker version 0.8.0
3+
# Timestamp: 2022/05/17 15:29:06 UTC
4+
#
5+
# Thank you for using Neurodocker. If you discover any issues
6+
# or ways to improve this software, please submit an issue or
7+
# pull request on our GitHub repository:
8+
#
9+
# https://github.com/ReproNim/neurodocker
10+
11+
FROM debian:stretch-slim
12+
13+
USER root
14+
15+
ARG DEBIAN_FRONTEND="noninteractive"
16+
17+
ENV LANG="en_US.UTF-8" \
18+
LC_ALL="en_US.UTF-8" \
19+
ND_ENTRYPOINT="/neurodocker/startup.sh"
20+
RUN export ND_ENTRYPOINT="/neurodocker/startup.sh" \
21+
&& apt-get update -qq \
22+
&& apt-get install -y -q --no-install-recommends \
23+
apt-utils \
24+
bzip2 \
25+
ca-certificates \
26+
curl \
27+
locales \
28+
unzip \
29+
&& apt-get clean \
30+
&& rm -rf /var/lib/apt/lists/* \
31+
&& sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen \
32+
&& dpkg-reconfigure --frontend=noninteractive locales \
33+
&& update-locale LANG="en_US.UTF-8" \
34+
&& chmod 777 /opt && chmod a+s /opt \
35+
&& mkdir -p /neurodocker \
36+
&& if [ ! -f "$ND_ENTRYPOINT" ]; then \
37+
echo '#!/usr/bin/env bash' >> "$ND_ENTRYPOINT" \
38+
&& echo 'set -e' >> "$ND_ENTRYPOINT" \
39+
&& echo 'export USER="${USER:=`whoami`}"' >> "$ND_ENTRYPOINT" \
40+
&& echo 'if [ -n "$1" ]; then "$@"; else /usr/bin/env bash; fi' >> "$ND_ENTRYPOINT"; \
41+
fi \
42+
&& chmod -R 777 /neurodocker && chmod a+s /neurodocker
43+
44+
ENTRYPOINT ["/neurodocker/startup.sh"]
45+
46+
ENV FORCE_SPMMCR="1" \
47+
SPM_HTML_BROWSER="0" \
48+
LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/lib/x86_64-linux-gnu:/opt/matlabmcr-2010a/v713/runtime/glnxa64:/opt/matlabmcr-2010a/v713/bin/glnxa64:/opt/matlabmcr-2010a/v713/sys/os/glnxa64:/opt/matlabmcr-2010a/v713/extern/bin/glnxa64" \
49+
MATLABCMD="/opt/matlabmcr-2010a/v713/toolbox/matlab"
50+
RUN export TMPDIR="$(mktemp -d)" \
51+
&& apt-get update -qq \
52+
&& apt-get install -y -q --no-install-recommends \
53+
bc \
54+
libncurses5 \
55+
libxext6 \
56+
libxmu6 \
57+
libxpm-dev \
58+
libxt6 \
59+
&& apt-get clean \
60+
&& rm -rf /var/lib/apt/lists/* \
61+
&& echo "Downloading MATLAB Compiler Runtime ..." \
62+
&& curl -sSL --retry 5 -o /tmp/toinstall.deb http://mirrors.kernel.org/debian/pool/main/libx/libxp/libxp6_1.0.2-2_amd64.deb \
63+
&& dpkg -i /tmp/toinstall.deb \
64+
&& rm /tmp/toinstall.deb \
65+
&& apt-get install -f \
66+
&& apt-get clean \
67+
&& rm -rf /var/lib/apt/lists/* \
68+
&& curl -fsSL --retry 5 -o "$TMPDIR/MCRInstaller.bin" https://dl.dropbox.com/s/zz6me0c3v4yq5fd/MCR_R2010a_glnxa64_installer.bin \
69+
&& chmod +x "$TMPDIR/MCRInstaller.bin" \
70+
&& "$TMPDIR/MCRInstaller.bin" -silent -P installLocation="/opt/matlabmcr-2010a" \
71+
&& rm -rf "$TMPDIR" \
72+
&& unset TMPDIR \
73+
&& echo "Downloading standalone SPM ..." \
74+
&& curl -fsSL --retry 5 -o /tmp/spm12.zip https://www.fil.ion.ucl.ac.uk/spm/download/restricted/utopia/previous/spm12_r7771_R2010a.zip \
75+
&& unzip -q /tmp/spm12.zip -d /tmp \
76+
&& mkdir -p /opt/spm12-r7771 \
77+
&& mv /tmp/spm12/* /opt/spm12-r7771/ \
78+
&& chmod -R 777 /opt/spm12-r7771 \
79+
&& rm -rf /tmp/spm* \
80+
&& /opt/spm12-r7771/run_spm12.sh /opt/matlabmcr-2010a/v713 quit \
81+
&& sed -i '$iexport SPMMCRCMD=\"/opt/spm12-r7771/run_spm12.sh /opt/matlabmcr-2010a/v713 script\"' $ND_ENTRYPOINT
82+
83+
RUN apt-get update -qq \
84+
&& apt-get install -y -q --no-install-recommends \
85+
nodejs \
86+
npm \
87+
&& apt-get clean \
88+
&& rm -rf /var/lib/apt/lists/*
89+
90+
RUN node -v && npm -v && npm install -g bids-validator
91+
92+
RUN test "$(getent passwd neuro)" || useradd --no-user-group --create-home --shell /bin/bash neuro
93+
USER neuro
94+
95+
RUN mkdir code output cpp_spm
96+
97+
COPY [".,", "/home/neuro/cpp_spm/"]
98+
99+
RUN echo '{ \
100+
\n "pkg_manager": "apt", \
101+
\n "instructions": [ \
102+
\n [ \
103+
\n "base", \
104+
\n "debian:stretch-slim" \
105+
\n ], \
106+
\n [ \
107+
\n "spm12", \
108+
\n { \
109+
\n "version": "r7771" \
110+
\n } \
111+
\n ], \
112+
\n [ \
113+
\n "install", \
114+
\n [ \
115+
\n "nodejs", \
116+
\n "npm" \
117+
\n ] \
118+
\n ], \
119+
\n [ \
120+
\n "run", \
121+
\n "node -v && npm -v && npm install -g bids-validator" \
122+
\n ], \
123+
\n [ \
124+
\n "user", \
125+
\n "neuro" \
126+
\n ], \
127+
\n [ \
128+
\n "run", \
129+
\n "mkdir code output cpp_spm" \
130+
\n ], \
131+
\n [ \
132+
\n "copy", \
133+
\n [ \
134+
\n ".,", \
135+
\n "/home/neuro/cpp_spm/" \
136+
\n ] \
137+
\n ] \
138+
\n ] \
139+
\n}' > /neurodocker/neurodocker_specs.json

0 commit comments

Comments
 (0)