From 6e3c46db6967bbdcc6da74e612682a698bf740fc Mon Sep 17 00:00:00 2001 From: Yousef Moazzam Date: Fri, 10 Jan 2025 11:15:58 +0000 Subject: [PATCH 1/2] Get `cupy` dependency from conda Also, specify the regular `cupy` package from PyPI rather than `cupy-cuda12x`, to avoid httomo dragging in the `cupy-cuda12x` dependency when doing `pip install httomo-backends` (which causes issues in the CUDA container used for the IRIS CI). --- conda/environment.yml | 1 + pyproject.toml | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/conda/environment.yml b/conda/environment.yml index 0e232f4..8be4c51 100644 --- a/conda/environment.yml +++ b/conda/environment.yml @@ -4,6 +4,7 @@ channels: - httomo dependencies: - conda-forge::cuda-version + - conda-forge::cupy=12.3.0 - conda-forge::numpy<2 - conda-forge::pyyaml - conda-forge::tomopy=1.15 diff --git a/pyproject.toml b/pyproject.toml index d52d968..7a199df 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -26,7 +26,7 @@ dev_template = "{tag}" [project] name = "httomo-backends" -version = "0.1.0" +version = "0.1.1" description = "Supplementary files for HTTomo backends." readme = "README.rst" license = {text = "BSD-3-Clause"} @@ -50,7 +50,7 @@ dependencies = [ "numpy<2", "pyyaml", "tomopy", - "cupy-cuda12x==12.3.0", + "cupy==12.3.0", "nvtx", "toml", "imageio", From f707df038aa2117fc110f4720bf1692c023d90f0 Mon Sep 17 00:00:00 2001 From: Yousef Moazzam Date: Fri, 10 Jan 2025 11:36:42 +0000 Subject: [PATCH 2/2] Get all dependencies from conda Some notes on this may be useful: - It was found that specifying `astra-toolbox` as a conda dependency in addition to `cupy` was able to make the GPU detectable in the CUDA container used in the IRIS CI job. However, the first job was sometimes such that the GPU wasn't detected and needed to be rerun, but then the second job would have the GPU be detected, for some reason. - Specifying all required packages as conda dependencies somehow got rid of the need to rerun the job, where the first job seemingly was consistent in having the GPU be detected. The reason(s) for this behaviour are unknown, but this may be a good enough workaround to enable `httomo` in the following PR to install and use `httomo-backends` without issues in the IRIS CI: https://github.com/DiamondLightSource/httomo/pull/532. --- conda/environment.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/conda/environment.yml b/conda/environment.yml index 8be4c51..fa76970 100644 --- a/conda/environment.yml +++ b/conda/environment.yml @@ -3,8 +3,13 @@ channels: - conda-forge - httomo dependencies: - - conda-forge::cuda-version + - conda-forge::astra-toolbox - conda-forge::cupy=12.3.0 + - conda-forge::h5py + - conda-forge::imageio - conda-forge::numpy<2 + - conda-forge::nvtx - conda-forge::pyyaml + - conda-forge::scikit-image + - conda-forge::toml - conda-forge::tomopy=1.15