Environment Modules and Virtual Environment
Environment Modules (or modules) are used to manage the user environment for the installed packages. This makes it simple to use different packages or switch between versions of the same package without conflicts.
The commands for environment modules:
module avail
List of application software that is installed on the HPC
module load packageName
Loads the specified package with specified version
module list
List the uploaded application softwares
Unloads the specified package with specified version
Unload all packages from user environment.
Do not use wget or any other ways to install software. If you do you can have problems about job submitting and it will slow down your remote computer.
You can load necessary module through job scripts or terminal. But, wise thing to do is creating a job script to load modules such as gcc, cuda and adding to .bashrc file or run it every time. You can create different job scripts which includes necessary modules for specific projects.
If you want any other software installed, or a different version, send a request email IT@ku.edu.tr. Please include a detailed information about the software like web page, version, license etc. Note that if the software requires a licence, the users of the software will need to purchase the licence.
How to create a Virtual Environment?
List modules and choose an anaconda version from list.
Now, you will have conda command running since it was added into your PATH.
You will have conda virtual environment installed under your home folder
( /kuacc/users/username/.conda/ )You can activate/deactivate virtual env by:
You can install any software under your evironment by “pip install” or “conda install” commands.
In order to deactivate virtual environment
You need to add
Run your code.
into your job script.
If you want to remove the virtual environment:
If you get an error like this while pip install in virtual environment:
This is because the package you want to install tries to write under (/kuacc/apps
) which you do not have permission to access. Another reason is trying to remove the default packages that create env.
To fix the problem, you can force the home folder to be used by using the --user
statement.