Skip to content

Commit 5688e51

Browse files
committed
address feedback
1 parent 5fac9dc commit 5688e51

File tree

1 file changed

+21
-7
lines changed

1 file changed

+21
-7
lines changed

src/maintainer/knowledge_base.rst

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1150,11 +1150,11 @@ to build CUDA-enabled packages. These mechanisms involve several packages:
11501150

11511151
* ``nvcc``: Nvidia's EULA does not allow the redistribution of compilers and drivers. Instead, we
11521152
provide a wrapper package that locates the CUDA installation in the system. The main role of this
1153-
package is to set some environment variables (``CUDA_HOME``, as well as ``CFLAGS`` and friends),
1153+
package is to set some environment variables (``CUDA_HOME``, ``CUDA_PATH``,``CFLAGS`` and others),
11541154
as well as wrapping the real ``nvcc`` executable to set some extra command line arguments.
11551155

11561156
In practice, to enable CUDA on your package, add ``{{ compiler('cuda') }}`` to the ``build``
1157-
section of your requirements and rerender! The matching ``cudatoolkit`` will be added to the ``run``
1157+
section of your requirements and rerender. The matching ``cudatoolkit`` will be added to the ``run``
11581158
requirements automatically.
11591159

11601160
.. note::
@@ -1168,12 +1168,16 @@ requirements automatically.
11681168
`conda-forge-ci-setup <https://github.com/conda-forge/conda-forge-ci-setup-feedstock/>`_ scripts.
11691169
Do note that the Nvidia executable won't install the drivers because no GPU is present in the machine.
11701170

1171-
**How is ``cudatoolkit`` selected at install time?**
1171+
**How is cudatoolkit selected at install time?**
11721172

11731173
Conda exposes the maximum CUDA version supported by the installed Nvidia drivers through a virtual package
11741174
named ``__cuda``. By default, ``conda`` will install the highest version available
1175-
for the packages involved. However, prior to v4.8.4, ``__cuda`` versions would not be part of the
1176-
constraints, so you would always get the latest one, regardless the supported CUDA version.
1175+
for the packages involved. To override this behaviour, you can define a ``CONDA_OVERRIDE_CUDA`` environment
1176+
variable. More details in the
1177+
`Conda docs <https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-virtual.html#overriding-detected-packages>`_.
1178+
1179+
Note that prior to v4.8.4, ``__cuda`` versions would not be part of the constraints, so you would always
1180+
get the latest one, regardless the supported CUDA version.
11771181

11781182
If for some reason you want to install a specific version, you can use::
11791183

@@ -1183,8 +1187,18 @@ Testing the packages
11831187
--------------------
11841188

11851189
Since the CI machines do not feature a GPU, you won't be able to test the built packages as part
1186-
of the conda recipe. For now, the workaround is to enable the Azure artifacts for your feedstock
1187-
(see :ref:`azure-config`) and then perform the tests locally.
1190+
of the conda recipe. That does not mean you can't test your package locally. To do so:
1191+
1192+
1. Enable the Azure artifacts for your feedstock (see :ref:`here <azure-config>`).
1193+
2. Include the test files and requirements in the recipe
1194+
`like this <https://github.com/conda-forge/cupy-feedstock/blob/a1e9cdf47775f90d3153a26913068c6df942d54b/recipe/meta.yaml#L51-L61>`_.
1195+
3. Provide the test instructions. Take into account that the GPU tests will fail in the CI run,
1196+
so you need to ignore them to get the package built and uploaded as an artifact.
1197+
`Example <https://github.com/conda-forge/cupy-feedstock/blob/a1e9cdf47775f90d3153a26913068c6df942d54b/recipe/run_test.py>`_.
1198+
4. Once you have downloaded the artifacts, you will be able to run::
1199+
1200+
conda build --test <pkg file>.tar.bz2
1201+
11881202

11891203
Common problems and known issues
11901204
--------------------------------

0 commit comments

Comments
 (0)