If you are from CGSB, please refer to NYU Gencore for software installation. Contacts: https://gencore.bio.nyu.edu/bioinformatics/
Go through the Conda 30 mins test drive to make sure you understand the basic concepts: http://conda.pydata.org/docs/using/envs.html
This page is about how to create, use and migrate your own environment using Conda on Dalma.
Anaconda is based on environment. Each environment is independent. Which means you could install
(One Time Setup) Install Miniconda (which is a essential version of Anaconda) to your $HOME. A preferred path is $HOME/conda. The installation could be done by following the instructions here: https://conda.io/docs/user-guide/install/index.html
(One Time Setup) When it asks whether to put Miniconda to your .bashrc, say yes.
(One Time Setup) Log out and log in again. Now conda should be available.
Available Anaconda Python packages are listed here:https://docs.continuum.io/anaconda/pkg-docs. Alternatively, run the following commands to search.
Now you can create your own environment and use it.
Once the installation is done, you could activate the environment.
Example screen output:
Once the source is activated, you could install the package you want. The package installed is local to the environment activated. E.g., if you have 2 environments, fire and ice. You installed ipython when fire is activated. Then fire will contain ipython but ice will not.
Always install packages to your own environments. root environment is not modifiable by normal users.
After finalizing your environment, clean the installation cache.
Let say if you have followed the steps above to create an environment call dalma-python, with numpy and scipy installed in this environment. Now you want to activate this environment.
(If you followed the installation instructions above, this step is not necessary): Activate Miniconda
Now conda should be available. If not, check your installation
(Optional) List environments available.
Now activate environment dalma-python.
You will see the changing of your system prompt.
Now you will be able to use the packages installed in this environment.
(Optional) You could check the packages installed in your active environment.
As expected, numpy and scipy are installed.
Migrating / Sharing Environment
It is possible to migrate an environment, with exact same packages and configuration. This is the beauty of Conda. Same environment, anywhere.
root environment can not be migrated.
Activate the environment you want to migrate from.
Export the environment to an yml file.
- Share this yml file.
The other person / machine, an identical environment could be created using this yml file.