Skip to content

Command helper for slurm system. Act as if you are on compute node.

License

Notifications You must be signed in to change notification settings

why-in-Shanghaitech/sapp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

69 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SAPP

sapp is a command helper for slurm system. It allows you to act as if you are on compute node (with Internet!). No need to learn how to use slurm.

How to use

Quick Start

Use spython to replace python and your applications will run on the compute node.

You will be asked to select a compute node for the first time. sapp will show the partition, type of cards and how many resources are available. After that, sapp will remember your choice and next time you may select this config with one click.

Advanced Usage

If you want to execute commands other that python, just add sapp in front of your command. Actually, spython is just a shortcut for sapp python. For example, use sapp bash train.sh to run bash train.sh on the compute node.

By default, sapp will do port forwarding for you. You will be able to use the Internet on the compute node as if you are on your local machine.

Clash

sapp has a built-in clash client. Use command clash to set up the service, or add -b to run in the background. The usage is the same as the official clash client.

With the help of clash, you may connect to any websites on the compute node. Just set up a clash service and fill in the port number in your sapp submission form.

You may also use clash without sapp.

Install

pip install git+https://github.com/why-in-Shanghaitech/sapp.git

Uninstall

pip uninstall sapp

Features

  • Free yourself from long commands and slurm settings. Personally, I do not like typing a long command or executing a shell script with no interactive console.
  • Beautiful tqdm progress bar for srun interactive jobs.
  • Sapp allows you to run srun and sbatch without worrying about file changes. It will memorize the file you submit, so feel free to change the scripts or config files after submitting the job, even if it does not start running yet.
  • Sapp could do auto port forwarding -- enjoy the Internet on the compute node!
  • Sapp will set up clash for you. Use command clash to run a clash service.

How it works

  • The GPU status query is based on the command sinfo.
  • The Internet service is based on clash and ssh port forwarding.

About

Command helper for slurm system. Act as if you are on compute node.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Languages