Basic commands HPC Launch https://hds-sandbox.github.io/HPC-lab/
2025-04-15
Every app comes with its pre-defined installed software on UCloud
The Terminal
app has no preinstalled (bio)software
You can install and manage your software and its dependencies using virtual environments
Each project needs specific software versions dependent on each other for reproducibility - without interfering with other projects.
Definition
A virtual environment keeps project-specific software and its dependencies separated.
A package manager is a software that can retrieve, download, install, and upgrade packages easily and reliably.
Conda is both a virtual environment and a package manager.
A package manager puts together the dependency trees of requested packages to find all compatible dependency versions.
Figure: A package’s dependency tree with required versions on the edges
To install a specific package in your environment, search for it on anaconda.org:
Channels
Packages are archived in channels. conda-forge
and bioconda
include most of the packages for bioinformatics and data science.
conda-forge
packages are often the most up-to-date.
Let’s open the Terminal app. Since Conda is not pre-installed in the Terminal app on UCloud, we will need to:
We will run the following commands to get familiar with Conda environments.
hpclab-env
environmentImagine you need to share your environment with a collaborator so they can replicate your analysis. How do we do this?
Let’s create a new directory in your personal drive:
Now, add a new environment using the argument --prefix PATH
(e.g., /work/<YourNameSurname#xxxx>/envs/<name-env>
). We need to do this as miniconda is installed in a directory that you don’t have write rights to.
Locally, you would typically run the command: conda create --name <myenv>
Warning
Always specify the location using --prefix PATH
regardless of the UCloud app you use, especially if the app has conda pre-installed (e.g. Jupyterlab). The path must be on your personal drive or a shared drive with colleagues that you have access to. Otherwise, the environment won’t be saved, as you’re working within a temporary container instance.
Proceed ([y]/n)? y