Skip to content

Instantly share code, notes, and snippets.

@poojithansl
Last active November 1, 2020 15:46
Show Gist options
  • Save poojithansl/96b8394a2c58fcda30eff77ce1b6cd24 to your computer and use it in GitHub Desktop.
Save poojithansl/96b8394a2c58fcda30eff77ce1b6cd24 to your computer and use it in GitHub Desktop.
Ada Commands
srun --account research --gres=gpu:1 --mem=64G --pty bash
srun --time 4-00:00:00 --account research --gres=gpu:1 --mem=64G --pty bash
#cpus -c cpus
srun --time 4-00:00:00 -c 40 --account research --gres=gpu:1 --pty bash
pip3 install jupyter --user
jupyter-notebook --no-browser --port 8080
ssh -N -f -R 8080:localhost:8080 poojitha@ip
#use sublime(https://stackoverflow.com/questions/37458814/how-to-open-remote-files-in-sublime-text-3)
ssh -R 52698:localhost:52698 sa7i@ada
~/.bin/rsub file.py
#To load modules
module load cuda/9.0 cudnn/7-cuda-9.0
# Show job info
scontrol show job job_id
# To other nodes
sinfo
squeue -u sa7i
#Know the users from the node
sjstat | grep gnode39
#know if the nodes are free, allocated
sinfo
ssh gnode39
#To install pytorch or libraries without pip, do it from source
git clone --recursive https://github.com/pytorch/pytorch
#screen - outside node
screen -S pyt
Ctrl a Ctrl d
screen -r pyt
screen -list
screen -d -r <num>
#Scroll through
Esc ^ v
#check gpu usage
nvidia-smi
#move large number of files
find dailymail/stories/ -name "*.*" | xargs -I {} mv -f {} cnn/stories/
# Copy large files
rsync -r -P -e ssh local_file sa7i@ada:directory
#Cannot import mail error pip
python -m pip install --user somepackage
#Create a virtual environment
virtualenv -p /usr/bin/python2.7 venv
#Run it
source venv/bin/activate
@simransinghal
Copy link

#!/bin/bash
#SBATCH -A research
#SBATCH -n 13
#SBATCH --mem-per-cpu=1000
#SBATCH --time=4-00:00:00
#SBATCH --mail-type=END
#SBATCH --qos=medium

run python commands

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment