Skip to content

Commit b13033c

Browse files
committed
edit based on new PR
1 parent 623fac3 commit b13033c

File tree

1 file changed

+13
-52
lines changed

1 file changed

+13
-52
lines changed

src/maintainer/adding_pkgs.rst

Lines changed: 13 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -635,62 +635,23 @@ Running tests locally for staged recipes
635635

636636
If you want to run and build packages in the staged-recipes repository locally,
637637
go to the root repository directory and run the
638-
``.scripts/run_docker_build.sh`` script. This requires that you have docker
639-
installed on your machine.
638+
``build-locally.py`` script (you need Python 3). And then you could follow the prompt to select the variant you'd like build. This requires that you have Docker
639+
installed on your machine if you are building a package for Linux.
640+
For MacOS, it will prompt you to select a location for the SDK (via ``export OSX_SDK_DIR=/opt``) to be downloaded.
640641

641-
You need to define an environment variable named ``CONFIG``. Its value must correspond
642-
the name of one of the YAML configuration file in the ``.ci_support``
643-
directory (for all practical purposes, only ``linux64`` is used here). As an example, you can
644-
invoke the command as follows.
645-
646-
.. code-block:: sh
647-
648-
$ cd staged-recipes
649-
$ CONFIG=linux64 ./.scripts/run_docker_build.sh
650-
651-
Once built, you can find the finished package under ``staged-recipes/build_artifacts``. In order to run cuda-enabled builds locally, you need to set the ``IMAGE_NAME`` environment variable alongside the ``CONFIG`` environment variable (see the following for cuda 10.2 and 11.2).
652-
653-
.. code-block:: sh
654-
655-
$ cd staged-recipes
656-
$ CONFIG=linux64 IMAGE_NAME=quay.io/condaforge/linux-anvil-cos7-cuda:10.2 ./.scripts/run_docker_build.sh
657-
658-
.. code-block:: sh
659-
660-
$ cd staged-recipes
661-
$ CONFIG=linux64 IMAGE_NAME=quay.io/condaforge/linux-anvil-cuda:11.2 ./.scripts/run_docker_build.sh
662-
663-
If you are trying to run ``osx64`` builds, you can directly invoke ``run_osx_build.sh`` script.
664-
665-
.. code-block:: sh
666-
667-
$ cd staged-recipes
668-
$ .scripts/run_osx_build.sh
669-
670-
671-
Or you can build using your own conda-build environment (``conda install conda-build`` or ``mamba install boa``) and then run the command (``conda build recipes/RECIPE_DIR`` or ``mamba build recipes/RECIPE_DIR``). However, if the recipe has additional variables like ``cuda_compiler_version`` in the case of cuda-enabled builds, then, you would need to set that to ``"None"`` when running on osx.
672-
673-
.. code-block:: sh
674-
675-
$ cd staged-recipes
676-
$ cuda_compiler_version="None" mamba build recipes/RECIPE_DIR
677-
678-
Running tests locally for feedstocks
679-
....................................
680-
681-
Simply invoke the ``build-locally.py`` script in the root of the feedstock repository and select the appropriate build.
682-
683-
.. code-block:: sh
684-
685-
$ cd staged-recipes
642+
.. code-block:: bash
643+
644+
$ cd ~/staged-recipes
686645
$ python build-locally.py
687646
688-
Or append the call with the name of the run from the ``.ci_support`` directory (without the ``.yaml`` extension).
647+
If you know which image you want to build, you can specify it as an argument to the script.
689648

690-
.. code-block:: sh
691-
692-
$ cd staged-recipes
693-
$ python build-locally.py linux_64_c_compiler_version9cuda_compiler_versionNonecudnnundefinedcxx_compiler_version9numpy1.19python3.9.____cpython
649+
.. code-block:: bash
650+
651+
$ cd ~/staged-recipes
652+
$ python build-locally.py <VARIANT>
653+
654+
where ``<VARIANT>`` is one of the file names in the ``.ci_support/`` directory, e.g. ``linux64``, ``osx64``, and ``linux64_cuda102``.
694655

695656

696657
About

0 commit comments

Comments
 (0)