Skip to main content

SLURM Link Assistant Service Hub (SLASH) is a submodule for the python package sapp, dealing with the Internect connection problems.

Project description

Slash

SLURM Link Assistant Service Hub (SLASH) is a submodule for the python package sapp, dealing with the Internect connection problems on slurm compute nodes.

How to use

Quick Start

You only need to provide a subscription link. Two simple steps: create an environment and run commands.

# Create a new environment with a subscription
# e.g. https://raw.githubusercontent.com/Pawdroid/Free-servers/main/sub
slash create -n myenv -f <your_subscription>
# Run a command with the newly created environment
slash run -n myenv wget huggingface.co

There is a built-in environment called base, which is a mirror of the Internet on this machine. Useful if you need to forward it to the compute nodes on slurm.

Advanced Usage

The usage is very similar to conda. You can activate and deactivate the environment.

# Initialize the Slash environment, then open a new terminal
slash init
# (In a new terminal) Activate the environment
slash activate myenv
# Run a command with the environment
wget huggingface.co
# Deactivate the environment
slash deactivate

# List all environments
slash env list
# Remove the environment
slash remove myenv

Use -h, --help to get more information.

slash -h

Python Interface

Use the python interface to python codes.

import os
from slash import Slash

# excute a command with the environment
with Slash('myenv'):
    os.system('wget huggingface.co')

Install

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

Uninstall

pip uninstall slash

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page