Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX] update version in container #1306

Merged
merged 13 commits into from
Aug 17, 2024
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
4 changes: 4 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,10 @@ jobs:
name: create output directory
command: mkdir -p /home/circleci/outputs/ds000001/derivatives

- run:
name: version
command: docker run -ti --rm << parameters.dh_orga >>/<< parameters.dh_repo >> --version

- run:
name: default model subject level
command: |
Expand Down
30 changes: 15 additions & 15 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,18 +1,6 @@
# ignoring this might speed up build
# by preventing passing extra content to the docker daemon

.github
.mypy_cache
.vscode
binder
coverage_html
**/demos
**/docs
templates
**/tests
**/bids-examples
lib/**/.git
lib/spmup

docs/posters/2023_ohbm/poster/betterposter-thumbnail-portrait.png

# General
.DS_Store
Expand All @@ -23,6 +11,8 @@ lib/**/.git
*.html
*.docx
*.ps
*.~lock.*
*.ppt*

new_events.tsv

Expand All @@ -38,21 +28,31 @@ skipped_roi_*.tsv
# created by tests
CHANGES
README
tests/data/tsv_files/moae_results_table.tsv
htmlcov

# Project specific
onsets*_events.mat


## from running tests in root dir
*/group/*
models/*
derivatives/models
derivatives/options

# hatch
src/bidspm/_version.py

###############################################################################
# python
**/*egg-info
**/__pycache__
**/build
.coverage
.pytest_cache
.tox

.mypy_cache

# jupyter notebooks
.ipynb_checkpoints
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/apptainer_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,5 @@ jobs:
apptainer-version: 1.3.0
- name: build sif image
run: apptainer build bidspm.sif bidspm.def
- name: version
run: apptainer run bidspm.sif --version
3 changes: 3 additions & 0 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
# Required
version: 2

submodules:
exclude: [lib/riksneurotools, lib/CPP_ROI]

build:
os: ubuntu-22.04
tools:
Expand Down
12 changes: 9 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,17 @@ WORKDIR /home/neuro

COPY . /home/neuro/bidspm
WORKDIR /home/neuro/bidspm
RUN pip install --no-cache-dir --upgrade pip && \
RUN git restore . && \
git -C lib/CPP_ROI/atlas/HCPex reset --hard && \
git -C lib/CPP_ROI/atlas/HCPex clean --force -dfx && \
git status && \
pip install --no-cache-dir --upgrade pip && \
pip3 --no-cache-dir install -r requirements.txt && \
pip3 --no-cache-dir install . && \
octave --no-gui --eval "addpath('/opt/spm12/'); savepath ();" && \
octave --no-gui --eval "addpath(pwd); savepath(); bidspm(); path"
octave --no-gui --eval "addpath('/opt/spm12/'); savepath ('/usr/share/octave/site/m/startup/octaverc');" && \
octave --no-gui --eval "addpath(pwd); savepath('/usr/share/octave/site/m/startup/octaverc'); bidspm(); path" && \
octave --no-gui --eval "path"


WORKDIR /home/neuro

Expand Down
14 changes: 0 additions & 14 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -123,20 +123,6 @@ clean_docker:
build_image: Dockerfile ## Build stable docker image from the main branch
docker build . -f Dockerfile -t cpplab/bidspm:unstable

Dockerfile_matlab:
docker run --rm kaczmarj/neurodocker:0.9.1 generate docker \
--pkg-manager apt \
--base-image debian:stretch-slim \
--spm12 version=r7771 \
--install nodejs npm \
--run "node -v && npm -v && npm install -g bids-validator" \
--user neuro \
--run "mkdir code output bidspm" \
--copy ".", "/home/neuro/bidspm/" > Dockerfile_matlab

build_image_matlab: Dockerfile_matlab
docker build . -f Dockerfile_matlab -t cpplab/bidspm_matlab:unstable

docker_data:
make -C demos/openneuro data_ds000001

Expand Down
10 changes: 9 additions & 1 deletion bidspm.def
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,19 @@ From: bids/base_validator:1.13.1
make -C /opt/spm12/src PLATFORM=octave install
ln -s /opt/spm12/bin/spm12-octave /usr/local/bin/spm12

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
pip install /opt/bidspm
octave --no-gui --eval "addpath('/opt/spm12/'); savepath ('/usr/share/octave/site/m/startup/octaverc');" && \
octave --no-gui --eval "addpath('/opt/bidspm/'); savepath('/usr/share/octave/site/m/startup/octaverc'); bidspm(); path"
octave --no-gui --eval "addpath('/opt/bidspm/'); savepath('/usr/share/octave/site/m/startup/octaverc'); bidspm(); path" && \
octave --no-gui --eval "path"

%runscript
bidspm "$@"
Expand Down
2 changes: 1 addition & 1 deletion docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ BROWSER := python -c "$$BROWSER_PYSCRIPT"

# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXOPTS ?= -v
SPHINXBUILD ?= sphinx-build
SOURCEDIR = source
BUILDDIR = build
Expand Down
3 changes: 0 additions & 3 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,10 @@
exclude_patterns = [
"**/examples/*",
"**/images/*",
"**/lib/**",
"demo",
"defaults",
"examples",
"images",
"lib",
"tests/**/*.m",
]

suppress_warnings = ["myst.header", "myst.xref_missing"]
Expand Down
2 changes: 1 addition & 1 deletion docs/source/demos/openneuro.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,5 +158,5 @@ transformers cannot yet be appled to confounds
### Scripts

```{eval-rst}
.. autoscript:: ds003379_run
.. autoscript:: ds003397_run
```
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ dev = [
'pandas'
]
doc = [
"urllib3==1.26.15",
"urllib3",
"faqtory",
"myst-parser",
"sphinx",
Expand All @@ -45,7 +45,7 @@ doc = [
"pydata-sphinx-theme",
"sphinx-togglebutton",
"sphinxcontrib-bibtex",
"sphinxcontrib-matlabdomain",
"sphinxcontrib-matlabdomain>=0.22.1",
"sphinxcontrib-mermaid",
"setuptools"
]
Expand Down
Loading