Conda is an open-source package and environment management system that runs on Windows, macOS and Linux. Conda quickly installs, runs and updates packages and their dependencies. Conda easily creates, saves, loads and switches between environments on your local computer.
It was created for Python programs, but it can package and distribute software for any language.
To use Conda you have to activate it running the following script:
You can list all availables environments typing:
conda env list
Pick an environment from this list and activate with the
conda activate command. The following command activate a conda environment which includes Torch framework version 1.x for python 3.
conda activate torch1.X_py3
You can find a set of Conda commands here.
It is possible that none of the environments listed will meet your needs. For this reason you can create your own Conda environment.
To do this:
$ conda create --name $ENVIRONMENT_NAME python tensorflow
You have to replace $ENVIRONMENT_NAME by the name of the environment you want to create. You can add all the packages to install in your environment, after python (here the environment will contain python and tensorflow).
Creating an environment can be time and resource consuming. Don’t forget to connect to the compute node via the oarsub command.
To create an environment from an
$ conda env create -f environment.yml
The content of
environment.yml is of the form:
name: env-name channels: - conda-forge - defaults dependencies: - python=3.7 - tensorflow
You can visit this page to find more specific environment creation commands.