Skip to content

Commit

Permalink
Move conda-forge overview from conda-based installation document to a…
Browse files Browse the repository at this point in the history
… separate document (#932)

* Update conda-forge.md

* Create conda-forge-overview.md
  • Loading branch information
traversaro authored Dec 31, 2021
1 parent be015ee commit 76ac9fb
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 18 deletions.
15 changes: 15 additions & 0 deletions doc/conda-forge-overview.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
## conda-forge overview

The **advantages** of the use of conda and conda-forge are:
* **Updated dependencies:** conda-forge tipically has relatively recent version of the dependencies, so if you want to use a recent version of some libraries quite used in robotics such as [VTK](https://vtk.org/) or [PCL](https://pointclouds.org/) (or event a recent compiler) on an old Linux distro such as Ubuntu 16.04, you can. This permits us to support older distributions even when the packages that install via apt are relatively old.
* **No need for root permissions or to change the system state:** all the software installed by conda is installed and used in a user directory, so even if you are on a system in which you do not have root access (such as a shared workstation) you can still install all you required dependencies
* **Use of binaries:** conda distributes its packages as binaries, so even to download heavy dependencies such as OpenCV, PCL, Qt and Gazebo on Windows it just takes a few minutes, as opposed to hours necessary to compile them when using vcpkg. This is also useful when producing Docker images that require a recent version of PCL or VTK: installing them via conda takes a few seconds, and this would cut the time necessary to regenerate Docker images.
* **Reproducible enviroments:** conda has built in support for installing exactly the same version of the packages you were using in the past, up to the patch version. This is quite important for reproducibility in scientific research. See https://www.nature.com/articles/d41586-020-02462-7 for a Nature article on the importance of reproducibility in scientific research.
* **ROS easily available on Windows and macOS:** On macOS and Windows, conda is also the package manager for which it is more easily possible to obtain working binaries of ROS1 and ROS2, thanks to the work of the [RoboStack project](https://github.com/RoboStack)
* **Simple and fast creation of new conda-forge packages:** The entire process of mantainance of conda-forge packages is GitHub-based. If you want to add a new package to conda-forge, the [required steps are minimal](https://conda-forge.org/docs/maintainer/adding_pkgs.html), and as soon as the package
is approved the package is ready to be used, as opposed to the stable Linux distributions that are tipically used in robotics research (such as Ubuntu LTS) in which adding a new package may require months and users can be used them only when a new LTS is released and the users install them.

The **disadvantages** of conda and conda-forge are:
* **Not compatible with dependencies installed by other package managers:** As conda-forge provides all the software it installs without using almost anything from the system, you cannot mix libraries installed by other package managers (such as `apt` or `homebrew`). If you have a dependency
that is only provided by `apt` and is not available in `conda-forge`, then you should install all the dependencies that you want to use from `apt`.
* **No Debug version of C++ libraries on Windows:** as other package managers such as `apt` or `homebrew`, a part from some small exceptions conda-forge only ships the version of the libraries compiled as shared library and in `Release` compilation mode. This is not a big problem on Linux or macOS, where executables compiled in `Debug` can link libraries compiled in `Release`, but is more problematic on Windows, where this is not possible. When you are using conda-forge libraries on Windows, you can't compile your executable in `Debug` mode, but only in `Release` or `RelWithDebInfo` mode. If you stricly need to also have the `Debug` version of the libraries, the [`vcpkg`](https://github.com/microsoft/vcpkg) package manager may be more useful for you.
21 changes: 3 additions & 18 deletions doc/conda-forge.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,14 @@

[`conda`](https://docs.conda.io/en/latest/) is a package manager (originally for Python, but effectively language agnostic) that works on Linux, macOS and Windows.

[`conda-forge`](https://conda-forge.org/) is a community-mantained channel for the `conda` package manager that provides many dependencies useful for scientific software, in particular all the one that are required by the robotology-superbuild .
[`conda-forge`](https://conda-forge.org/) is a community-mantained channel for the `conda` package manager that provides many dependencies useful for scientific software, in particular all the one that are required by the robotology-superbuild .

For an overview of advantages and disadvantages of conda and conda-forge, check the [`conda-forge-overview.md`](conda-forge-overview.md) document. If you are just interested in installing the robotology-superbuild, please proceed to the next sections.

## Table of Contents
* [conda-forge overview](#conda-forge-overview)
* [Binary installation](#binary-installation)
* [Source installation](#source-installation)

## conda-forge overview

The **advantages** of the use of conda and conda-forge are:
* **Updated dependencies:** conda-forge tipically has relatively recent version of the dependencies, so if you want to use a recent version of some libraries quite used in robotics such as [VTK](https://vtk.org/) or [PCL](https://pointclouds.org/) (or event a recent compiler) on an old Linux distro such as Ubuntu 16.04, you can. This permits us to support older distributions even when the packages that install via apt are relatively old.
* **No need for root permissions or to change the system state:** all the software installed by conda is installed and used in a user directory, so even if you are on a system in which you do not have root access (such as a shared workstation) you can still install all you required dependencies
* **Use of binaries:** conda distributes its packages as binaries, so even to download heavy dependencies such as OpenCV, PCL, Qt and Gazebo on Windows it just takes a few minutes, as opposed to hours necessary to compile them when using vcpkg. This is also useful when producing Docker images that require a recent version of PCL or VTK: installing them via conda takes a few seconds, and this would cut the time necessary to regenerate Docker images.
* **Reproducible enviroments:** conda has built in support for installing exactly the same version of the packages you were using in the past, up to the patch version. This is quite important for reproducibility in scientific research. See https://www.nature.com/articles/d41586-020-02462-7 for a Nature article on the importance of reproducibility in scientific research.
* **ROS easily available on Windows and macOS:** On macOS and Windows, conda is also the package manager for which it is more easily possible to obtain working binaries of ROS1 and ROS2, thanks to the work of the [RoboStack project](https://github.com/RoboStack)
* **Simple and fast creation of new conda-forge packages:** The entire process of mantainance of conda-forge packages is GitHub-based. If you want to add a new package to conda-forge, the [required steps are minimal](https://conda-forge.org/docs/maintainer/adding_pkgs.html), and as soon as the package
is approved the package is ready to be used, as opposed to the stable Linux distributions that are tipically used in robotics research (such as Ubuntu LTS) in which adding a new package may require months and users can be used them only when a new LTS is released and the users install them.

The **disadvantages** of conda and conda-forge are:
* **Not compatible with dependencies installed by other package managers:** As conda-forge provides all the software it installs without using almost anything from the system, you cannot mix libraries installed by other package managers (such as `apt` or `homebrew`). If you have a dependency
that is only provided by `apt` and is not available in `conda-forge`, then you should install all the dependencies that you want to use from `apt`.
* **No Debug version of C++ libraries on Windows:** as other package managers such as `apt` or `homebrew`, a part from some small exceptions conda-forge only ships the version of the libraries compiled as shared library and in `Release` compilation mode. This is not a big problem on Linux or macOS, where executables compiled in `Debug` can link libraries compiled in `Release`, but is more problematic on Windows, where this is not possible. When you are using conda-forge libraries on Windows, you can't compile your executable in `Debug` mode, but only in `Release` or `RelWithDebInfo` mode. If you stricly need to also have the `Debug` version of the libraries, the [`vcpkg`](https://github.com/microsoft/vcpkg) package manager may be more useful for you.

## Binary installation

This section describes how to compile and install the binary packages built from the robotology-superbuild on conda on Windows, macOS and Linux.
Expand Down

0 comments on commit 76ac9fb

Please sign in to comment.