1- # Creates a docker image of bidspm with
1+ # Creates a docker image of bidspm
2+
3+ # version number are updated automatically with tbe bump version script
24
35# this is mostly taken from the spm docker files: https://github.com/spm/spm-docker
46FROM ubuntu:22.04
@@ -8,62 +10,59 @@ USER root
810ENV LANG="en_US.UTF-8" \
911 LC_ALL="en_US.UTF-8"
1012
11- # TODO how to update this with the content of the current version
12- LABEL version="1.1.5dev"
13+ LABEL version="2.2.0"
1314
1415LABEL maintainer="Rémi Gau <remi.gau@gmail.com>"
1516
16- # # Install SPM
17- # basic OS tools install and also octave
17+ # # basic OS tools install, node, npm also octave
1818RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get -y install \
19- build-essential \
19+ build-essential software-properties-common \
2020 curl \
21- octave \
22- liboctave-dev &&
23- apt-get clean &&
21+ octave liboctave-dev \
22+ nodejs npm
23+
24+ # # add python
25+ RUN add-apt-repository ppa:deadsnakes/ppa && apt-get update
26+ RUN apt-get -y install python3.10 python3-pip
27+
28+ RUN apt-get clean && \
2429 rm -rf \
2530 /tmp/hsperfdata* \
2631 /var/*/apt/*/partial \
2732 /var/lib/apt/lists/* \
2833 /var/log/apt/term*
2934
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 &&
35+ # # Install SPM
36+ RUN mkdir /opt/spm12 && \
37+ curl -SL https://github.com/spm/spm12/archive/r7771.tar.gz | \
38+ tar -xzC /opt/spm12 --strip-components 1 && \
39+ curl -SL https://raw.githubusercontent.com/spm/spm-docker/main/octave/spm12_r7771.patch | \
40+ patch -p0 && \
41+ make -C /opt/spm12/src PLATFORM=octave distclean && \
42+ make -C /opt/spm12/src PLATFORM=octave && \
43+ make -C /opt/spm12/src PLATFORM=octave install && \
3844 ln -s /opt/spm12/bin/spm12-octave /usr/local/bin/spm12
39-
4045RUN octave --no-gui --eval "addpath('/opt/spm12/'); savepath ();"
4146
4247# # 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 \
47- /tmp/hsperfdata* \
48- /var/*/apt/*/partial \
49- /var/lib/apt/lists/* \
50- /var/log/apt/term*
51-
5248RUN node -v && npm -v && npm install -g bids-validator
5349
5450# # Install BIDSpm in user folder
5551RUN test "$(getent passwd neuro)" || useradd --no-user-group --create-home --shell /bin/bash neuro
5652
57- USER neuro
58-
5953WORKDIR /home/neuro
54+ RUN mkdir code input output
6055
61- RUN mkdir code output bidspm
56+ # COPY . /home/neuro/bidspm # this is for local development
57+ RUN git clone --branch v2.2.0 --depth 1 --recursive https://github.com/cpp-lln-lab/bidspm.git
6258
63- WORKDIR /home/neuro/
59+ RUN cd bidspm && pip3 install .
60+ RUN echo '\n '
61+ RUN python3 --version && pip3 list
62+ RUN echo '\n '
6463
65- COPY [ "." , "/home/neuro/ bidspm/" ]
64+ RUN cd bidspm && octave --no-gui --eval " bidspm; savepath();"
6665
67- RUN cd bidspm && octave --no-gui --eval "initCppSpm(false); savepath();"
66+ USER neuro
6867
6968ENTRYPOINT ["octave" ]
0 commit comments