Best practices#

How to clone a repo#

One of the billions of how to guide: https://docs.gitlab.com/ee/gitlab-basics/start-using-git.html \n

How to run a script on server#

Before running a script, check if nobody else is using a GPU with nvidia-smi or even better with nvtop. With this command, you will see the active jobs running in the server. If a particular GPU is free, you can run your script reserving the specific card with these commands:

export CUDA_VISIBLE_DEVICES=<gpu-id>
YOUR SCRIPT TO BE EXECUTED

or if you want to export the environment variable just for the command you are running with

CUDA_VISIBLE_DEVICES=<gpu-id> YOUR SCRIPT TO BE EXECUTED 

For example:

From this image, it is evident that the GPU with id 0 has a running job (python) of almost 11 GB of memory, while the GPU 1 has no running jobs. So you can run your script python main.py, with

CUDA_VISIBLE_DEVICES=1 python main.py

or

export CUDA_VISIBLE_DEVICES=1 

python main.py