Skip to content

Commit 1b2afd8

Browse files
EZoniax3l
andauthored
Docs: configure conda to use only conda-forge (#5569)
Requested by @ax3l: > We might also need to rework our conda docs, to change the default channel priorities to only use `conda-forge`. By default, many people have the `anaconda` repos in them too and, although we do not use them, this can break the build in this situation: some labs now block them in their firewall due to recent events, and then the installer just aborts instead of trying the next channel in the list. Very easy to do, I think we just need to prepend `conda-forge` in the channels (instead of the CLI) or add a guide to install Conda/Mamba from Conda-Forge/Minimamba instead of Anaconda. This PR adds instructions to: 1. add `conda-forge` to the top of the channel list; 2. set the channel priority to strict. Hopefully this should be enough? --------- Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>
1 parent 18d7f82 commit 1b2afd8

File tree

2 files changed

+24
-26
lines changed

2 files changed

+24
-26
lines changed

Docs/source/install/dependencies.rst

+12-13
Original file line numberDiff line numberDiff line change
@@ -52,27 +52,26 @@ For all other systems, we recommend to use a **package dependency manager**:
5252
Pick *one* of the installation methods below to install all dependencies for WarpX development in a consistent manner.
5353

5454

55-
Conda (Linux/macOS/Windows)
56-
---------------------------
55+
Conda-Forge (Linux/macOS/Windows)
56+
---------------------------------
5757

58-
`Conda <https://conda.io>`__/`Mamba <https://mamba.readthedocs.io>`__ are cross-compatible, user-level package managers.
58+
`Conda-Forge <https://conda-forge.org/download/>`__ is a repository for cross-compatible, user-level packages.
5959

6060
.. tip::
6161

62-
We recommend to configure your conda to use the faster ``libmamba`` `dependency solver <https://www.anaconda.com/blog/a-faster-conda-for-a-growing-community>`__.
62+
We recommend to deactivate that conda self-activates its ``base`` environment.
63+
This `avoids interference with the system and other package managers <https://collegeville.github.io/CW20/WorkshopResources/WhitePapers/huebl-working-with-multiple-pkg-mgrs.pdf>`__.
6364

6465
.. code-block:: bash
6566
66-
conda update -y -n base conda
67-
conda install -y -n base conda-libmamba-solver
68-
conda config --set solver libmamba
67+
conda config --set auto_activate_base false
6968
70-
We recommend to deactivate that conda self-activates its ``base`` environment.
71-
This `avoids interference with the system and other package managers <https://collegeville.github.io/CW20/WorkshopResources/WhitePapers/huebl-working-with-multiple-pkg-mgrs.pdf>`__.
69+
In order to make sure that the conda configuration uses ``conda-forge`` as the only channel, which will help avoid issues with blocked ``defaults`` or ``anaconda`` repositories, please set the following configurations:
7270

7371
.. code-block:: bash
7472
75-
conda config --set auto_activate_base false
73+
conda config --add channels conda-forge
74+
conda config --set channel_priority strict
7675
7776
.. tab-set::
7877

@@ -104,19 +103,19 @@ For OpenMP support, you will further need:
104103

105104
.. code-block:: bash
106105
107-
conda install -c conda-forge libgomp
106+
mamba install -c conda-forge libgomp
108107
109108
.. tab-item:: macOS or Windows
110109

111110
.. code-block:: bash
112111
113-
conda install -c conda-forge llvm-openmp
112+
mamba install -c conda-forge llvm-openmp
114113
115114
For Nvidia CUDA GPU support, you will need to have `a recent CUDA driver installed <https://developer.nvidia.com/cuda-downloads>`__ or you can lower the CUDA version of `the Nvidia cuda package <https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html#conda-installation>`__ and `conda-forge to match your drivers <https://docs.cupy.dev/en/stable/install.html#install-cupy-from-conda-forge>`__ and then add these packages:
116115

117116
.. code-block:: bash
118117
119-
conda install -c nvidia -c conda-forge cuda cuda-nvtx-dev cupy
118+
mamba install -c nvidia -c conda-forge cuda cuda-nvtx-dev cupy
120119
121120
More info for `CUDA-enabled ML packages <https://twitter.com/jeremyphoward/status/1697435241152127369>`__.
122121

Docs/source/install/users.rst

+12-13
Original file line numberDiff line numberDiff line change
@@ -38,36 +38,35 @@ If want to use WarpX on a specific high-performance computing (HPC) systems, jum
3838

3939
.. image:: conda.svg
4040

41-
Using the Conda Package
42-
-----------------------
41+
Using the Conda-Forge Package
42+
-----------------------------
4343

44-
A package for WarpX is available via the `Conda <https://conda.io>`_ package manager.
44+
A package for WarpX is available via `Conda-Forge <https://conda-forge.org/download/>`__.
4545

4646
.. tip::
4747

48-
We recommend to configure your conda to use the faster ``libmamba`` `dependency solver <https://www.anaconda.com/blog/a-faster-conda-for-a-growing-community>`__.
48+
We recommend to deactivate that conda self-activates its ``base`` environment.
49+
This `avoids interference with the system and other package managers <https://collegeville.github.io/CW20/WorkshopResources/WhitePapers/huebl-working-with-multiple-pkg-mgrs.pdf>`__.
4950

5051
.. code-block:: bash
5152
52-
conda update -y -n base conda
53-
conda install -y -n base conda-libmamba-solver
54-
conda config --set solver libmamba
53+
conda config --set auto_activate_base false
5554
56-
We recommend to deactivate that conda self-activates its ``base`` environment.
57-
This `avoids interference with the system and other package managers <https://collegeville.github.io/CW20/WorkshopResources/WhitePapers/huebl-working-with-multiple-pkg-mgrs.pdf>`__.
55+
In order to make sure that the conda configuration uses ``conda-forge`` as the only channel, which will help avoid issues with blocked ``defaults`` or ``anaconda`` repositories, please set the following configurations:
5856

5957
.. code-block:: bash
6058
61-
conda config --set auto_activate_base false
59+
conda config --add channels conda-forge
60+
conda config --set channel_priority strict
6261
6362
.. code-block:: bash
6463
65-
conda create -n warpx -c conda-forge warpx
66-
conda activate warpx
64+
mamba create -n warpx -c conda-forge warpx
65+
mamba activate warpx
6766
6867
.. note::
6968

70-
The ``warpx`` `conda package <https://anaconda.org/conda-forge/warpx>`__ does not yet provide GPU support.
69+
The ``warpx`` package on conda-forge does not yet provide `GPU support <https://github.com/conda-forge/warpx-feedstock/issues/89>`__.
7170

7271

7372
.. _install-spack:

0 commit comments

Comments
 (0)