Skip to content

Commit

Permalink
remove CIL if BUILD_CIL=ON
Browse files Browse the repository at this point in the history
  • Loading branch information
paskino committed May 15, 2024
1 parent 1b88642 commit 65e2d70
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

## vx.x.x
- Adds CCPi-Regularisation-Toolkit as prerequisite for CIL and reinstate unit tests
- Docker:
- Handle BUILD_CIL correctly and not install CIL from conda if BUILD_CIL=ON
- CMake:
- only pass through `OpenMP*LIBRARY` variables if set, and add OpenMP_iomp_LIBRARY to the list (for Intel compiler)
- Updated Versions:
Expand Down
8 changes: 7 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,16 @@ RUN bash /opt/scripts/build_system-ubuntu.sh

# SIRF python deps
ARG BUILD_GPU=0
ARG BUILD_CIL="OFF"
COPY docker/requirements.yml /opt/scripts/
# https://jupyter-docker-stacks.readthedocs.io/en/latest/using/common.html#conda-environments
# https://github.com/TomographicImaging/CIL/blob/master/Dockerfile
RUN if test "$BUILD_GPU" != 0; then \
sed -ri 's/^(\s*)#\s*(- \S+.*#.*GPU.*)$/\1\2/' /opt/scripts/requirements.yml; \
fi \
&& if test "$BUILD_CIL" != 0; then \
sed -r -i -e '/^\s*- (cil).*/d' /opt/scripts/requirements.yml; \
fi \
&& conda config --env --set channel_priority strict \
&& for ch in defaults ccpi intel conda-forge; do conda config --env --add channels $ch; done \
&& mamba env update -n base -f /opt/scripts/requirements.yml \
Expand Down Expand Up @@ -66,7 +70,8 @@ ARG USE_NiftyPET="OFF"
ARG BUILD_siemens_to_ismrmrd="ON"
ARG BUILD_pet_rd_tools="ON"
ARG Gadgetron_USE_CUDA="ON"
ARG BUILD_CIL="OFF"
# BUILD_CIL is defined in the previous stage
ARG BUILD_CIL
ARG EXTRA_BUILD_FLAGS=""

# build, install in /opt/SIRF-SuperBuild/{INSTALL,sources/SIRF}, test (if RUN_CTEST)
Expand Down Expand Up @@ -110,6 +115,7 @@ COPY --from=build --link --chown=${NB_USER} /opt/SIRF-SuperBuild/INSTALL/ /opt/S
#COPY --from=build --link /opt/conda/ /opt/conda/

# install {SIRF-Exercises,CIL-Demos}
ARG BUILD_CIL
COPY docker/user_demos.sh /opt/scripts/
RUN BUILD_CIL="${BUILD_CIL}" bash /opt/scripts/user_demos.sh \
&& fix-permissions /opt/SIRF-Exercises /opt/CIL-Demos "${CONDA_DIR}" /home/${NB_USER}
Expand Down

0 comments on commit 65e2d70

Please sign in to comment.