TomographicImaging / TIGRE-conda

BSD 3-Clause "New" or "Revised" License
0 stars 1 forks source link

Update the meta.yaml for cuda #5

Open gfardell opened 6 months ago

gfardell commented 6 months ago

We are handling the cuda dependency incorrectly.

Based on https://github.com/conda-forge/cuda-version-feedstock/blob/main/recipe/README.md I believe our meta.yaml should be something like:

requirements:
  host:
    - cuda-version =X.Y
  run:
    - __cuda >={{X}}.0
    {% if X>= 12 %}
    - cuda-version >=X,<X+1
    {% else %}
    - cudatoolkit >=X,<X+1
    {% endif %}

where __cuda sets the minimum driver requirement from the user.

And cuda-version or cudatoolkit handle the cudart version.

I'm surprised at the lose requirement for cudatoolkit/cuda-version as I expected us to need the correct minor version of cudart. It might need trying cxomparing with pin_compatible

gfardell commented 5 days ago

Enforcing __cuda has knock on effects for the docker build, which needs to include tigre, but cannot if __cuda is enforced as a virtual package.

gfardell commented 5 days ago

When we build with CUDA SDK > 12 we need to confirm cudart libraries are included in the distribution with cuda-version