Skip to content
/ susbot Public

Slack bot to interface with Slurm and other utlilities

License

Notifications You must be signed in to change notification settings

subhc/susbot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

susbot : Slurm and other Utilities Slack Bot

[WIP] Provides helper commands related to an ML research Slack group. Mostly related to a slurm cluster.

Available commands:

  • /cluster - Get summary of the nodes in the cluster

Getting Started

Prerequisites

Create a Slack bot app with appropriate scope (chat:write, command, im:history, users:read) and get the Slack tokens. Subscribe to events app_home_opened, message.im. You can find more information on how to do this here.

SLACK_BOT_TOKEN and SLACK_SIGNING_SECRET environment variables are required to run the app.

  • For SLACK_BOT_TOKEN copy the Bot User OAuth Access Token under the OAuth & Permissions sidebar.
  • SLACK_SIGNING_SECRET is available in your app's Basic Information page under App Credentials.
export SLACK_BOT_TOKEN=xoxb-your-token
export SLACK_SIGNING_SECRET=your-signing-secret

Installing dependencies

conda env create -f environment.yaml

Install PySlurm

Follow the instructions here

export SLURM_INCLUDE_DIR=/usr/include
export SLURM_LIB_DIR=/usr/lib64
git clone https://github.com/PySlurm/pyslurm.git && cd pyslurm
git checkout v23.2.0
pip install .

Running the app

Run it on a node with access to the cluster.

python app.py

Acknowledgments

  • The cluster GUI is shameless rip-off of slurm_web. If you are looking for a web GUI for cluster profiling, check it out.
  • slurm_gpustat

About

Slack bot to interface with Slurm and other utlilities

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages