-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
86 additions
and
187 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Changelog | ||
|
||
All notable changes to this project will be documented in this file. | ||
|
||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), | ||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). | ||
|
||
<!-- | ||
### Added | ||
### Changed | ||
### Deprecated | ||
### Removed | ||
### Fixed | ||
### Security | ||
--> | ||
|
||
## [Unreleased] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,58 +1,72 @@ | ||
FROM debian:bookworm-slim@sha256:5f7d5664eae4a192c2d2d6cb67fc3f3c7891a8722cd2903cc35aa649a12b0c8d | ||
FROM ubuntu:22.04@sha256:340d9b015b194dc6e2a13938944e0d016e57b9679963fdeb9ce021daac430221 | ||
|
||
LABEL org.opencontainers.image.authors="[email protected], Malgorzata Wierzba ([email protected]), Felix Hoffstaedter ([email protected])" | ||
LABEL org.opencontainers.image.authors="[email protected], Malgorzata Wierzba ([email protected]), Felix Hoffstaedter ([email protected]), Remi Gau ([email protected])" | ||
LABEL org.opencontainers.image.source="https://gin.g-node.org/felixh/cat12-container" | ||
LABEL org.opencontainers.image.version="v1.1" | ||
|
||
ARG DEBIAN_FRONTEND="noninteractive" | ||
|
||
ENV CATversion="r2560" | ||
ENV STANDALONE="/opt/spm12/toolbox/cat12/standalone" | ||
|
||
RUN apt-get update -qq && \ | ||
apt-get -qq -y --no-install-recommends install \ | ||
build-essential \ | ||
ca-certificates \ | ||
curl \ | ||
unzip \ | ||
liboctave-dev \ | ||
libxext6 \ | ||
libxt6 \ | ||
moreutils \ | ||
octave \ | ||
wget \ | ||
&& apt-get clean \ | ||
&& rm -rf \ | ||
/tmp/hsperfdata* \ | ||
/var/*/apt/*/partial \ | ||
/var/lib/apt/lists/* \ | ||
/var/log/apt/term* | ||
|
||
# install SPM12 | ||
RUN mkdir /opt/spm12 \ | ||
&& curl -fsSL --retry 5 https://github.com/spm/spm12/archive/r7771.tar.gz | tar -xzC /opt/spm12 --strip-components 1 \ | ||
&& curl -fsSL --retry 5 https://raw.githubusercontent.com/spm/spm-octave/main/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 | ||
LABEL org.opencontainers.image.version="v1.1dev" | ||
LABEL org.opencontainers.image.licenses="MIT" | ||
LABEL org.opencontainers.image.title="cat12-container" | ||
|
||
ENV LANG="en_US.UTF-8" \ | ||
LC_ALL="en_US.UTF-8" \ | ||
FORCE_SPMMCR="1" \ | ||
SPM_HTML_BROWSER="0" \ | ||
MCR_INHIBIT_CTF_LOCK="1" \ | ||
MCR_VERSION="2017b" | ||
ENV LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/lib/x86_64-linux-gnu:/opt/MCR-${MCR_VERSION}/v93/runtime/glnxa64:/opt/MCR-${MCR_VERSION}/v93/bin/glnxa64:/opt/MCR-${MCR_VERSION}/v93/sys/os/glnxa64:/opt/MCR-${MCR_VERSION}/v93/extern/bin/glnxa64" \ | ||
MATLABCMD="/opt/MCR-${MCR_VERSION}/v93/toolbox/matlab" \ | ||
XAPPLRESDIR="/opt//opt/MCR-${MCR_VERSION}/v93/x11/app-defaults" \ | ||
MCRROOT="/opt/MCR-${MCR_VERSION}/v93" \ | ||
CAT_VERSION=".8.1_r2042_R${MCR_VERSION}" | ||
ENV SPMROOT="/opt/CAT12${CAT_VERSION}" \ | ||
PATH="/opt/CAT12${CAT_VERSION}:$PATH" \ | ||
STANDALONE="/opt/CAT12${CAT_VERSION}/standalone" | ||
|
||
RUN export ND_ENTRYPOINT="/neurodocker/startup.sh" \ | ||
&& apt-get update -qq \ | ||
&& apt-get install -y -q --no-install-recommends \ | ||
apt-utils \ | ||
bc \ | ||
bzip2 \ | ||
ca-certificates \ | ||
curl \ | ||
dbus-x11 \ | ||
libncurses5 \ | ||
libxext6 \ | ||
libxmu6 \ | ||
libxpm-dev \ | ||
libxt6 \ | ||
locales \ | ||
openjdk-8-jre \ | ||
unzip \ | ||
&& 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 | ||
|
||
RUN echo "Downloading MATLAB Compiler Runtime ..." \ | ||
&& export TMPDIR="$(mktemp -d)" \ | ||
&& curl -o "$TMPDIR/mcr.zip" https://ssd.mathworks.com/supportfiles/downloads/R${MCR_VERSION}/deployment_files/R${MCR_VERSION}/installers/glnxa64/MCR_R${MCR_VERSION}_glnxa64_installer.zip \ | ||
&& unzip -q "$TMPDIR/mcr.zip" -d "$TMPDIR/mcrtmp" \ | ||
&& "$TMPDIR/mcrtmp/install" -destinationFolder /opt/MCR-${MCR_VERSION} -mode silent -agreeToLicense yes \ | ||
&& rm -rf "$TMPDIR" \ | ||
&& unset TMPDIR | ||
|
||
RUN echo "Downloading standalone CAT12 ..." \ | ||
&& curl -fL -o /tmp/cat12.zip http://www.neuro.uni-jena.de/cat12/CAT12${CAT_VERSION}_MCR_Linux.zip \ | ||
&& unzip -q /tmp/cat12.zip -d /tmp \ | ||
&& rm -rf /tmp/cat12.zip \ | ||
&& mkdir -p /opt/CAT12${CAT_VERSION} \ | ||
&& mv /tmp/*${CAT_VERSION}*/* /opt/CAT12${CAT_VERSION}/ \ | ||
&& chmod -R 777 /opt/CAT12${CAT_VERSION} \ | ||
# Test | ||
&& /opt/CAT12${CAT_VERSION}/spm12 function exit | ||
|
||
# transfer code and set permission | ||
RUN mkdir -p /code | ||
COPY ./code /code | ||
RUN ls /code && find /code -type f -print0 | xargs -0 chmod +r | ||
|
||
# install CAT12 | ||
RUN mkdir -p /batch \ | ||
&& mkdir -p /downloads \ | ||
&& cd /downloads \ | ||
&& wget http://www.neuro.uni-jena.de/cat12/cat12_${CATversion}.zip && unzip -d /opt/spm12/toolbox/ cat12_${CATversion}.zip \ | ||
&& rm -fr /downloads \ | ||
&& cd ${STANDALONE} && chmod +rx *.sh \ | ||
&& cd /code && ln -s ${STANDALONE}/*.sh . \ | ||
&& cd /batch && ln -s ${STANDALONE}/*.m . | ||
|
||
# clean | ||
RUN rm -f /opt/spm12/src/*.{mex,o,a} | ||
WORKDIR ${STANDALONE} | ||
|
||
ENTRYPOINT ['/code/main "$@"'] | ||
ENTRYPOINT ["/code/main"] |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.