@@ -1150,11 +1150,11 @@ to build CUDA-enabled packages. These mechanisms involve several packages:
1150
1150
1151
1151
* ``nvcc ``: Nvidia's EULA does not allow the redistribution of compilers and drivers. Instead, we
1152
1152
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 ),
1154
1154
as well as wrapping the real ``nvcc `` executable to set some extra command line arguments.
1155
1155
1156
1156
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 ``
1158
1158
requirements automatically.
1159
1159
1160
1160
.. note ::
@@ -1168,12 +1168,16 @@ requirements automatically.
1168
1168
`conda-forge-ci-setup <https://github.com/conda-forge/conda-forge-ci-setup-feedstock/ >`_ scripts.
1169
1169
Do note that the Nvidia executable won't install the drivers because no GPU is present in the machine.
1170
1170
1171
- **How is `` cudatoolkit`` selected at install time? **
1171
+ **How is cudatoolkit selected at install time? **
1172
1172
1173
1173
Conda exposes the maximum CUDA version supported by the installed Nvidia drivers through a virtual package
1174
1174
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.
1177
1181
1178
1182
If for some reason you want to install a specific version, you can use::
1179
1183
@@ -1183,8 +1187,18 @@ Testing the packages
1183
1187
--------------------
1184
1188
1185
1189
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
+
1188
1202
1189
1203
Common problems and known issues
1190
1204
--------------------------------
0 commit comments