Skip to content

Instantly share code, notes, and snippets.

@mmattamala
Last active November 10, 2023 15:45
Show Gist options
  • Save mmattamala/cfaec7c76305e7a4969381c2e68f723e to your computer and use it in GitHub Desktop.
Save mmattamala/cfaec7c76305e7a4969381c2e68f723e to your computer and use it in GitHub Desktop.
ARC commands

Links

ARC User Guide: https://arc-user-guide.readthedocs.io/en/latest/index.html

ARC Software Guide: https://arc-software-guide.readthedocs.io/en/latest/index.html

JADE2 user guide: https://docs.jade.ac.uk/en/latest/jade/scheduler/index.html#introduction

ARC

Script to start interactive session

This works on both ARC and HTC

#!/bin/bash
# run_interactive_cpu.sh

srun -p interactive --pty /bin/bash

Script to start interactive session (w/GPU)

This needs to run on HTC

#!/bin/bash
# run_interactive_gpu.sh

srun -p interactive --gres=gpu:1 --pty /bin/bash

Create conda environment (Python 3.10)

#/bin/bash
# conda_create.sh

if [ -z "$@" ];then
  echo "No environment name chosen. Exit"
  exit
else
  echo "Creating environment [$1]"
fi

# Load the version of Anaconda you need
module load Miniconda3

# Create an environment in $DATA and give it an appropriate name
export CONPREFIX=$DATA/$1
conda create --prefix $CONPREFIX python=3.10 pip

# Activate your environment
source activate $CONPREFIX

# Install packages...
echo "Install new packages with 'conda install <packagename>'"

Activate conda environment

#!/bin/bash
# conda_activate.sh

if [ -z "$@" ];then
  echo "No environment name chosen. Exit"
  exit
else
  echo "Activating environment [$1]"
fi

export CONPREFIX=$DATA/$1

module load Miniconda3
source activate $DATA/$1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment