Skip to content

Commit

Permalink
use more recent octave in containers
Browse files Browse the repository at this point in the history
  • Loading branch information
Remi-Gau committed Aug 17, 2024
1 parent e3261be commit 76cd413
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 22 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
* [REF] Refactor and update CLI in #1096 @Remi-Gau
* [ENH] {func}`getData` only loads anat data when requested #1257 @Remi-Gau
* [ENH] the python CLI now uses sub-commands instead of the named parameter `--action` #1292 @Remi-Gau
* [ENH] change base image in container to use Octave 9.2.0 #1292 @Remi-Gau

### Deprecated

Expand All @@ -73,6 +74,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
* [FIX] copy `RepetitionTime` in sidecar JSON after running smoothing in #1099 by @Remi-Gau
* [FIX] rename results files (csv, tsv, png, nii) of each contrasts #1104 by @Remi-Gau
* [FIX] reslice ROIS before running ROI based analysis to make sure they are at the resolution of the BOLD images in #1110 by @Remi-Gau
* [FIX] ensure that there is a clean version number in containers #1306 @Remi-Gau

### Security

Expand Down
22 changes: 11 additions & 11 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
FROM bids/base_validator:1.13.1
# FROM bids/base_validator:1.13.1
# https://github.com/gnu-octave/docker/tree/main
FROM gnuoctave/octave:9.2.0@sha256:b4cab2446a847530129fe8333a4b31eb046efb4b14bb3182e781fa2238116108

LABEL org.opencontainers.image.source="https://github.com/cpp-lln-lab/bidspm"
LABEL org.opencontainers.image.url="https://github.com/cpp-lln-lab/bidspm"
Expand All @@ -15,15 +17,10 @@ RUN apt-get update -qq && \
apt-utils \
build-essential \
ca-certificates \
curl \
default-jre \
fonts-freefont-otf \
ghostscript \
git \
gnuplot-x11 \
libcurl4-gnutls-dev \
liboctave-dev \
octave \
octave-common \
octave-io \
octave-image \
Expand All @@ -32,15 +29,19 @@ RUN apt-get update -qq && \
python3-pip \
python3 \
software-properties-common \
unzip \
zip && \
unzip && \
apt-get clean && \
rm -rf \
/tmp/hsperfdata* \
/var/*/apt/*/partial \
/var/lib/apt/lists/* \
/var/log/apt/term*

# install bids validator
# TODO find out how to pin version
RUN curl -fsSL https://deno.land/install.sh | sh && \
deno install -Agf https://github.com/bids-standard/bids-validator/raw/deno-build/bids-validator.js

## Install SPM
RUN mkdir /opt/spm12 && \
curl -SL https://github.com/spm/spm12/archive/r7771.tar.gz | \
Expand All @@ -57,9 +58,8 @@ WORKDIR /home/neuro
COPY . /home/neuro/bidspm
WORKDIR /home/neuro/bidspm
RUN git restore . && \
git -C lib/CPP_ROI/atlas/HCPex reset --hard && \
git -C lib/CPP_ROI/atlas/HCPex clean --force -dfx && \
git status && \
git submodule foreach --recursive 'git reset --hard' && \
git submodule foreach --recursive 'git clean --force -dfx' && \
pip install --no-cache-dir --upgrade pip && \
pip3 --no-cache-dir install -r requirements.txt && \
pip3 --no-cache-dir install . && \
Expand Down
18 changes: 7 additions & 11 deletions bidspm.def
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
BootStrap: docker
From: bids/base_validator:1.13.1
From: gnuoctave/octave:9.2.0

%files
pyproject.toml /opt/bidspm/pyproject.toml
Expand All @@ -16,15 +16,10 @@ From: bids/base_validator:1.13.1
apt-utils \
build-essential \
ca-certificates \
curl \
default-jre \
fonts-freefont-otf \
ghostscript \
git \
gnuplot-x11 \
libcurl4-gnutls-dev \
liboctave-dev \
octave \
octave-common \
octave-io \
octave-image \
Expand All @@ -33,15 +28,19 @@ From: bids/base_validator:1.13.1
python3-pip \
python3 \
software-properties-common \
unzip \
zip && \
unzip && \
apt-get clean && \
rm -rf \
/tmp/hsperfdata* \
/var/*/apt/*/partial \
/var/lib/apt/lists/* \
/var/log/apt/term*

# install bids validator
# TODO find out how to pin version
curl -fsSL https://deno.land/install.sh | sh
deno install -Agf https://github.com/bids-standard/bids-validator/raw/deno-build/bids-validator.js

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
Expand All @@ -53,9 +52,6 @@ From: bids/base_validator:1.13.1
git -C /opt/bidspm restore .
git -C /opt/bidspm/ submodule foreach --recursive 'git reset --hard'
git -C /opt/bidspm/ submodule foreach --recursive 'git clean --force -dfx'
git -C /opt/bidspm/ status



pip install --upgrade pip
pip install -r /opt/bidspm/requirements.txt
Expand Down

0 comments on commit 76cd413

Please sign in to comment.