Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 14 additions & 5 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"contributors": [
{
"login": "OliColli",
"name": "OliColli",
"name": "Olivier Collignon",
"avatar_url": "https://avatars0.githubusercontent.com/u/55407947?v=4",
"profile": "https://cpplab.be",
"contributions": [
Expand All @@ -19,7 +19,7 @@
},
{
"login": "anege",
"name": "anege",
"name": "Ane Gurtubay",
"avatar_url": "https://avatars0.githubusercontent.com/u/50317099?v=4",
"profile": "https://github.com/anege",
"contributions": [
Expand All @@ -40,7 +40,7 @@
},
{
"login": "marcobarilari",
"name": "marcobarilari",
"name": "Marco Barilari",
"avatar_url": "https://avatars3.githubusercontent.com/u/38101692?v=4",
"profile": "https://github.com/marcobarilari",
"contributions": [
Expand Down Expand Up @@ -70,7 +70,7 @@
},
{
"login": "fedefalag",
"name": "Fede F.",
"name": "Federica Falagiarda",
"avatar_url": "https://avatars2.githubusercontent.com/u/50373329?v=4",
"profile": "https://github.com/fedefalag",
"contributions": [
Expand All @@ -80,7 +80,7 @@
},
{
"login": "CerenB",
"name": "CerenB",
"name": "Ceren Battal",
"avatar_url": "https://avatars1.githubusercontent.com/u/10451654?v=4",
"profile": "https://github.com/CerenB",
"contributions": [
Expand Down Expand Up @@ -126,6 +126,15 @@
"review",
"userTesting"
]
},
{
"login": "mcgnunes",
"name": "Márcia Nunes",
"avatar_url": "https://avatars.githubusercontent.com/u/98760858?v=4",
"profile": "https://github.com/mcgnunes",
"contributions": [
"bug"
]
}
],
"contributorsPerLine": 7,
Expand Down
11 changes: 6 additions & 5 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# ignoring this might speed up build
# by preventing passing extra content to the docker daemon

.vscode
.git
.github
Expand All @@ -6,10 +9,8 @@ coverage_html
demos/*/outputs/
demos/*/inputs/
demos/*/cfg/
docs
env
manualTests
templates
tests

# ignoring this might speed up build
# by preventing passing extra content to the docker daemon

# lib
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@ models/*
# jupyter notebooks
.ipynb_checkpoints

# node stuff

node_modules
package*
yarn.lock

## MATLAB / OCTAVE gitignore template

# From : https://github.com/github/gitignore/blob/master/Global/MATLAB.gitignore
Expand Down
3 changes: 3 additions & 0 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,9 @@ authors:
orcid: "https://orcid.org/0000-0002-8724-7668"
affiliation: "Université catholique de Louvain"

- family-names: "Nunes"
given-names: "Márcia"

license: GPL-3.0

keywords:
Expand Down
65 changes: 45 additions & 20 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,44 +1,69 @@
# Creates a docker image of the default branch of CPP_SPM
# Creates a docker image of CPP_SPM with

# this is mostly taken from the spm docker files: https://github.com/spm/spm-docker
FROM ubuntu:focal
FROM ubuntu:22.04

USER root

ENV LANG="en_US.UTF-8" \
LC_ALL="en_US.UTF-8"

#TODO how to update this with the content of the current version
LABEL version="1.1.2"
LABEL version="1.1.5dev"

LABEL maintainer="Rémi Gau <remi.gau@gmail.com>"

## Install SPM
# basic OS tools install and also octave
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get -y install \
build-essential \
curl \
git \
octave \
liboctave-dev \
apt-get clean
&& apt-get clean \
&& rm -rf \
/tmp/hsperfdata* \
/var/*/apt/*/partial \
/var/lib/apt/lists/* \
/var/log/apt/term*

RUN mkdir /opt/spm12 \
&& curl -SL https://github.com/spm/spm12/archive/r7771.tar.gz \
| tar -xzC /opt/spm12 --strip-components 1 \
&& curl -SL https://raw.githubusercontent.com/spm/spm-docker/main/octave/spm12_r7771.patch \
| patch -p0 \
&& make -C /opt/spm12/src PLATFORM=octave distclean \
&& make -C /opt/spm12/src PLATFORM=octave \
&& make -C /opt/spm12/src PLATFORM=octave install \
&& ln -s /opt/spm12/bin/spm12-octave /usr/local/bin/spm12

RUN octave --no-gui --eval "addpath('/opt/spm12/'); savepath ();"

RUN rm -rf \
## Install nods and bids validator
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get -y install \
nodejs npm \
&& apt-get clean \
&& rm -rf \
/tmp/hsperfdata* \
/var/*/apt/*/partial \
/var/lib/apt/lists/* \
/var/log/apt/term*

RUN mkdir /opt/spm12 && \
curl -SL https://github.com/spm/spm12/archive/r7487.tar.gz | \
tar -xzC /opt/spm12 --strip-components 1 && \
curl -SL https://raw.githubusercontent.com/spm/spm-docker/master/octave/spm12_r7487.patch | \
patch -p0 && \
make -C /opt/spm12/src PLATFORM=octave distclean && \
make -C /opt/spm12/src PLATFORM=octave && \
make -C /opt/spm12/src PLATFORM=octave install && \
ln -s /opt/spm12/bin/spm12-octave /usr/local/bin/spm12
RUN node -v && npm -v && npm install -g bids-validator

## Install CPP SPM in user folder
RUN test "$(getent passwd neuro)" || useradd --no-user-group --create-home --shell /bin/bash neuro

USER neuro

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

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

RUN mkdir code output
WORKDIR /home/neuro/

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

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

ENTRYPOINT ["octave"]
53 changes: 0 additions & 53 deletions Dockerfile_dev

This file was deleted.

139 changes: 139 additions & 0 deletions Dockerfile_matlab
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
# Generated by: Neurodocker version 0.7.0+0.gdc97516.dirty
# Latest release: Neurodocker version 0.8.0
# Timestamp: 2022/05/17 15:29:06 UTC
#
# Thank you for using Neurodocker. If you discover any issues
# or ways to improve this software, please submit an issue or
# pull request on our GitHub repository:
#
# https://github.com/ReproNim/neurodocker

FROM debian:stretch-slim

USER root

ARG DEBIAN_FRONTEND="noninteractive"

ENV LANG="en_US.UTF-8" \
LC_ALL="en_US.UTF-8" \
ND_ENTRYPOINT="/neurodocker/startup.sh"
RUN export ND_ENTRYPOINT="/neurodocker/startup.sh" \
&& apt-get update -qq \
&& apt-get install -y -q --no-install-recommends \
apt-utils \
bzip2 \
ca-certificates \
curl \
locales \
unzip \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* \
&& sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen \
&& dpkg-reconfigure --frontend=noninteractive locales \
&& update-locale LANG="en_US.UTF-8" \
&& chmod 777 /opt && chmod a+s /opt \
&& mkdir -p /neurodocker \
&& if [ ! -f "$ND_ENTRYPOINT" ]; then \
echo '#!/usr/bin/env bash' >> "$ND_ENTRYPOINT" \
&& echo 'set -e' >> "$ND_ENTRYPOINT" \
&& echo 'export USER="${USER:=`whoami`}"' >> "$ND_ENTRYPOINT" \
&& echo 'if [ -n "$1" ]; then "$@"; else /usr/bin/env bash; fi' >> "$ND_ENTRYPOINT"; \
fi \
&& chmod -R 777 /neurodocker && chmod a+s /neurodocker

ENTRYPOINT ["/neurodocker/startup.sh"]

ENV FORCE_SPMMCR="1" \
SPM_HTML_BROWSER="0" \
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" \
MATLABCMD="/opt/matlabmcr-2010a/v713/toolbox/matlab"
RUN export TMPDIR="$(mktemp -d)" \
&& apt-get update -qq \
&& apt-get install -y -q --no-install-recommends \
bc \
libncurses5 \
libxext6 \
libxmu6 \
libxpm-dev \
libxt6 \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* \
&& echo "Downloading MATLAB Compiler Runtime ..." \
&& curl -sSL --retry 5 -o /tmp/toinstall.deb http://mirrors.kernel.org/debian/pool/main/libx/libxp/libxp6_1.0.2-2_amd64.deb \
&& dpkg -i /tmp/toinstall.deb \
&& rm /tmp/toinstall.deb \
&& apt-get install -f \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* \
&& curl -fsSL --retry 5 -o "$TMPDIR/MCRInstaller.bin" https://dl.dropbox.com/s/zz6me0c3v4yq5fd/MCR_R2010a_glnxa64_installer.bin \
&& chmod +x "$TMPDIR/MCRInstaller.bin" \
&& "$TMPDIR/MCRInstaller.bin" -silent -P installLocation="/opt/matlabmcr-2010a" \
&& rm -rf "$TMPDIR" \
&& unset TMPDIR \
&& echo "Downloading standalone SPM ..." \
&& curl -fsSL --retry 5 -o /tmp/spm12.zip https://www.fil.ion.ucl.ac.uk/spm/download/restricted/utopia/previous/spm12_r7771_R2010a.zip \
&& unzip -q /tmp/spm12.zip -d /tmp \
&& mkdir -p /opt/spm12-r7771 \
&& mv /tmp/spm12/* /opt/spm12-r7771/ \
&& chmod -R 777 /opt/spm12-r7771 \
&& rm -rf /tmp/spm* \
&& /opt/spm12-r7771/run_spm12.sh /opt/matlabmcr-2010a/v713 quit \
&& sed -i '$iexport SPMMCRCMD=\"/opt/spm12-r7771/run_spm12.sh /opt/matlabmcr-2010a/v713 script\"' $ND_ENTRYPOINT

RUN apt-get update -qq \
&& apt-get install -y -q --no-install-recommends \
nodejs \
npm \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

RUN node -v && npm -v && npm install -g bids-validator

RUN test "$(getent passwd neuro)" || useradd --no-user-group --create-home --shell /bin/bash neuro
USER neuro

RUN mkdir code output cpp_spm

COPY [".,", "/home/neuro/cpp_spm/"]

RUN echo '{ \
\n "pkg_manager": "apt", \
\n "instructions": [ \
\n [ \
\n "base", \
\n "debian:stretch-slim" \
\n ], \
\n [ \
\n "spm12", \
\n { \
\n "version": "r7771" \
\n } \
\n ], \
\n [ \
\n "install", \
\n [ \
\n "nodejs", \
\n "npm" \
\n ] \
\n ], \
\n [ \
\n "run", \
\n "node -v && npm -v && npm install -g bids-validator" \
\n ], \
\n [ \
\n "user", \
\n "neuro" \
\n ], \
\n [ \
\n "run", \
\n "mkdir code output cpp_spm" \
\n ], \
\n [ \
\n "copy", \
\n [ \
\n ".,", \
\n "/home/neuro/cpp_spm/" \
\n ] \
\n ] \
\n ] \
\n}' > /neurodocker/neurodocker_specs.json
Loading