From 5bdc99e1f10a0cccbd81c5689bd33884e33e0e76 Mon Sep 17 00:00:00 2001 From: Casper da Costa-Luis Date: Fri, 22 May 2026 11:18:09 +0100 Subject: [PATCH 1/5] docker: drop channel priority --- Dockerfile | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index 3e6065f4d6..8a32185610 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,16 +9,12 @@ LABEL org.opencontainers.image.source=https://github.com/TomographicImaging/CIL LABEL org.opencontainers.image.licenses="Apache-2.0 AND BSD-3-Clause AND GPL-3.0" # CUDA-specific packages -ARG CIL_EXTRA_PACKAGES="tigre=2.6 astra-toolbox=2.4" +ARG CIL_EXTRA_PACKAGES="tigre=2.6 astra-toolbox::astra-toolbox=2.4" # build & runtime dependencies -# TODO: sync scripts/create_local_env_for_cil_development.sh, scripts/cil_development.yml, recipe/meta.yaml (e.g. missing libstdcxx-ng _openmp_mutex pip)? -# vis. https://github.com/TomographicImaging/CIL/pull/1590 +# TODO: sync scripts/cil_development.yml, recipe.yaml COPY --chown="${NB_USER}" scripts/cil_development.yml environment.yml -# channel_priority: https://stackoverflow.com/q/58555389 RUN sed -ri '/tigre|astra-toolbox| python /d' environment.yml \ && for pkg in 'jupyter-server-proxy>4.1.0' $CIL_EXTRA_PACKAGES; do echo " - $pkg" >> environment.yml; done \ - && conda config --env --set channel_priority strict \ - && for ch in defaults nvidia ccpi https://software.repos.intel.com/python/conda astra-toolbox conda-forge; do conda config --env --add channels $ch; done \ && mamba env update -n base \ && mamba clean -a -y -f \ && rm environment.yml \ From bcc7ebff7b92f5a86daa735b8ce8d5f24d550b73 Mon Sep 17 00:00:00 2001 From: Casper da Costa-Luis Date: Fri, 22 May 2026 11:39:10 +0100 Subject: [PATCH 2/5] docker: bump image base - fixes #2066 --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 8a32185610..604ecec0ae 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,7 +3,7 @@ # - https://github.com/TomographicImaging/CIL#installation-of-cil # consumers: # - harbor.stfc.ac.uk/imaging-tomography/cil -FROM jupyter/tensorflow-notebook:ubuntu-22.04 +FROM quay.io/jupyter/tensorflow-notebook:ubuntu-24.04 LABEL org.opencontainers.image.source=https://github.com/TomographicImaging/CIL # tigre: BSD-3-Clause, astra-toolbox: GPL-3.0 LABEL org.opencontainers.image.licenses="Apache-2.0 AND BSD-3-Clause AND GPL-3.0" @@ -15,7 +15,7 @@ ARG CIL_EXTRA_PACKAGES="tigre=2.6 astra-toolbox::astra-toolbox=2.4" COPY --chown="${NB_USER}" scripts/cil_development.yml environment.yml RUN sed -ri '/tigre|astra-toolbox| python /d' environment.yml \ && for pkg in 'jupyter-server-proxy>4.1.0' $CIL_EXTRA_PACKAGES; do echo " - $pkg" >> environment.yml; done \ - && mamba env update -n base \ + && mamba env update -n base -f environment.yml \ && mamba clean -a -y -f \ && rm environment.yml \ && fix-permissions "${CONDA_DIR}" /home/${NB_USER} From 705fedec18c239bcb48d1de05e8daf37f4c855a7 Mon Sep 17 00:00:00 2001 From: Casper da Costa-Luis Date: Fri, 22 May 2026 13:18:05 +0100 Subject: [PATCH 3/5] tests: reduce precision --- Wrappers/Python/test/test_algorithms.py | 2 +- Wrappers/Python/test/test_wavelets.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Wrappers/Python/test/test_algorithms.py b/Wrappers/Python/test/test_algorithms.py index 7908debf66..9f916f10de 100644 --- a/Wrappers/Python/test/test_algorithms.py +++ b/Wrappers/Python/test/test_algorithms.py @@ -2056,7 +2056,7 @@ def test_initialization_with_params(self): def test_set_up(self): lsqr = LSQR(initial=self.initial, operator=self.Aop, data=self.bop, alpha=0.5) beta = (self.bop -self.Aop.direct(self.initial)).norm() - self.assertAlmostEqual(lsqr.beta, beta, 5 ) + self.assertAlmostEqual(lsqr.beta, beta, 4) self.assertAlmostEqual(lsqr.phibar, beta, 5 ) self.assertAlmostEqual(lsqr.normr, beta, 5 ) alpha = self.Aop.adjoint((self.bop -self.Aop.direct(self.initial))/beta).norm() diff --git a/Wrappers/Python/test/test_wavelets.py b/Wrappers/Python/test/test_wavelets.py index 2bcf3e357e..b1179f07ba 100644 --- a/Wrappers/Python/test/test_wavelets.py +++ b/Wrappers/Python/test/test_wavelets.py @@ -232,7 +232,7 @@ def test_wavelet_adjoint(self): ip1 = c.dot(W.direct(x)) ip2 = x.dot(W.adjoint(c)) M = x.norm() # Normalization - self.assertAlmostEqual(ip1/M, ip2/M, places=5, msg="Periodization convolution should be closest to true adjoint") + self.assertAlmostEqual(ip1/M, ip2/M, 4, msg="Periodization convolution should be closest to true adjoint") def test_WaveletOperator_norm(self): n = 64 @@ -336,4 +336,4 @@ def test_L1Sparsity_complex_input(self): if __name__ == "__main__": - unittest.main() \ No newline at end of file + unittest.main() From 487911bf417113d94bbd54944795358a766d484b Mon Sep 17 00:00:00 2001 From: Casper da Costa-Luis Date: Fri, 22 May 2026 14:36:04 +0100 Subject: [PATCH 4/5] CIL_FORCE_IPP --- Dockerfile | 1 + pyproject.toml | 2 ++ recipe.yaml | 1 + src/Core/CMakeLists.txt | 4 ++++ 4 files changed, 8 insertions(+) diff --git a/Dockerfile b/Dockerfile index 604ecec0ae..a910647ba9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -25,5 +25,6 @@ ENV TENSORBOARD_PROXY_URL=/user-redirect/proxy/6006/ # build & install CIL COPY --chown="${NB_USER}" . src +ENV CIL_FORCE_IPP=ON RUN pip install ./src && rm -rf src \ && fix-permissions "${CONDA_DIR}" /home/${NB_USER} diff --git a/pyproject.toml b/pyproject.toml index 0c4109c3ca..8914f8b488 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -15,6 +15,8 @@ sdist.include = ["Wrappers/Python/cil/version.py"] sdist.exclude = ["scripts", "docs", "Wrappers/Python/data", "Wrappers/Python/test", ".*"] [tool.scikit-build.wheel.packages] cil = "Wrappers/Python/cil" +[tool.scikit-build.cmake.define] +CIL_FORCE_IPP = {env="CIL_FORCE_IPP", default="OFF"} [tool.setuptools] package-dir = {"" = "Wrappers/Python"} diff --git a/recipe.yaml b/recipe.yaml index 89cbac95df..c79a1ed4de 100644 --- a/recipe.yaml +++ b/recipe.yaml @@ -29,6 +29,7 @@ build: env: CMAKE_BUILD_TYPE: Release CMAKE_GENERATOR: Ninja + CIL_FORCE_IPP: ${{ "ON" if x86_64 else "OFF" }} requirements: build: diff --git a/src/Core/CMakeLists.txt b/src/Core/CMakeLists.txt index 11eff34554..1314052712 100644 --- a/src/Core/CMakeLists.txt +++ b/src/Core/CMakeLists.txt @@ -51,7 +51,11 @@ else() endif() list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") +option(CIL_FORCE_IPP "Force CIL to use IPP" OFF) find_package(IPP) +if(CIL_FORCE_IPP AND NOT IPP_FOUND) + message(FATAL_ERROR "CIL_FORCE_IPP and NOT IPP_FOUND") +endif() list(APPEND cilacc_SOURCES utilities.cpp axpby.cpp FiniteDifferenceLibrary.cpp) list(APPEND cilacc_INCLUDES ${CMAKE_CURRENT_SOURCE_DIR}/include) From 5e65e44f1407ffd099722a1e8e4a3f306e3295f4 Mon Sep 17 00:00:00 2001 From: Edoardo Pasca <14138589+paskino@users.noreply.github.com> Date: Tue, 16 Jun 2026 22:26:05 +0100 Subject: [PATCH 5/5] set supported TIGRE version --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index a910647ba9..b37418ee80 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,7 +9,7 @@ LABEL org.opencontainers.image.source=https://github.com/TomographicImaging/CIL LABEL org.opencontainers.image.licenses="Apache-2.0 AND BSD-3-Clause AND GPL-3.0" # CUDA-specific packages -ARG CIL_EXTRA_PACKAGES="tigre=2.6 astra-toolbox::astra-toolbox=2.4" +ARG CIL_EXTRA_PACKAGES="ccpi::tigre=3.1.3 astra-toolbox::astra-toolbox=2.4" # build & runtime dependencies # TODO: sync scripts/cil_development.yml, recipe.yaml COPY --chown="${NB_USER}" scripts/cil_development.yml environment.yml