Setup Conda on UCloud

The Conda package and environment management system is already included in few applications available on UCloud (see, e.g., JupyerLab and PyTorch).

For more general uses of Conda and its powerful package manager it is convenient to create a local installation and save it in a UCloud project.

Conda is included in all versions of Anaconda and Miniconda. For example, to install the latest version of Miniconda, just start any interactive app on UCloud, such as Terminal, and run the following shell commands:

$ curl -s -L -o /tmp/
$ bash /tmp/ -b -f -p /work/miniconda3

The installation directory, in this case miniconda3, must be created in the default working tree, so that it is available in the job output folder for later use.

Conda can be added to the search path with the command:

$ eval "$(/work/miniconda3/bin/conda shell.bash hook)"


$ sudo ln -s /work/miniconda3/bin/conda /usr/bin/conda

Both Conda packages and environments are then installed in /work/miniconda3.

To initialize the current shell for use with Conda, run:

$ conda init