Skip to content
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
16 changes: 8 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,19 @@
# - 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"

# CUDA-specific packages
ARG CIL_EXTRA_PACKAGES="ccpi::tigre=3.1.3 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 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 astra-toolbox conda-forge; do conda config --env --add channels $ch; done \
&& mamba env update -n base \
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 -f environment.yml \
&& mamba clean -a -y -f \
&& rm environment.yml \
&& fix-permissions "${CONDA_DIR}" /home/${NB_USER}
Expand All @@ -26,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}
2 changes: 1 addition & 1 deletion Wrappers/Python/test/test_algorithms.py
Original file line number Diff line number Diff line change
Expand Up @@ -1937,7 +1937,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()
Expand Down
4 changes: 2 additions & 2 deletions Wrappers/Python/test/test_wavelets.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -336,4 +336,4 @@ def test_L1Sparsity_complex_input(self):


if __name__ == "__main__":
unittest.main()
unittest.main()
2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"}
Expand Down
1 change: 1 addition & 0 deletions recipe.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ build:
env:
CMAKE_BUILD_TYPE: Release
CMAKE_GENERATOR: Ninja
CIL_FORCE_IPP: ${{ "ON" if x86_64 else "OFF" }}

requirements:
build:
Expand Down
4 changes: 4 additions & 0 deletions src/Core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Loading