Skip to main content

Chappyner

Project description

Chappyner

Chappyner allows to schedule and run web services on compute nodes of a remote HPC clusters and access them from your local browser. The backend services are mainly (but not necessarily) run via Apptainer/Singularity containers.

The main inspiration for Chappyner is Open Ondemand, from which it inherits the main logics as well as part of the codes that it uses on the remote side; Chappyner replaces the Apache + nginx role in Open Ondemand with Python scripts + ssh tunnels, in order to be daemonless. In this way, any user can run backend services (tools) from containers in a remote directory (warehouse) with no needs of servers running on the HPC cluster (other than sshd).


Install

You can install Chappyner in a Python virtual environment[^venv] of your current path using for instance:

python3 -m venv chappyner_venv # or choose the name you like
source chappyner_venv/bin/activate
pip install --upgrade pip
pip install <pip_package directory path>

Quick start

A typical general syntax for Chappyner might the following:

chappyner --user <my username on cluster> --host <url or host in ~/.ssh/config for login nodes> --warehouse <remote path with tools containers> --tool <name of the tool to start> [plus any option for the scheduler submit command]

but for default clusters like e.g. Cineca clusters you can exploit some package-embedded settings and ready-to-use warehouses on the clusters to make this syntax shorter. For instance, to use Chappyner on Leonardo you can run something like this:

chappyner --user <my username on cluster> --cluster leonardo --tool <name of the tool to start> [any sbatch option you like]

You can list all the default HPC clusters using the --list-clusters option and the avaliable tools remotely with the --list-tools option. Please note that using the default clusters might imply to automatically run some script on your local computer to allow the access to the specific cluster[^startup_script]. For instance, in the Leonardo case, a script will run to retrieve Smallstep certificates and to set ssh known hosts properly for login nodes, in order to ease the access to the cluster via ssh; if you don't like this behaviour you can disable it via the --no-startup-script option and perform those steps manually before using Chappyner.

Here it follows a list of examples to make it clearer:

# Run Jupyter on Leonardo with default configs (1 task, 1 hour on lrd_all_serial partition, no gpus, using your default account)
chappyner --user <my user name on leonardo> --cluster leonardo --tool jupyter
# Run Jupyter on Leonardo for 3 hours using 4 tasks and one gpu on boost_usr_prod partition with your account <my account>
chappyner --user <my user name on leonardo> --cluster leonardo --tool jupyter --ntasks 4 --gres gpu:1 --partition boost_usr_prod --account <my account> --time 03:00
# Run a VNC desktop via noVNC + TurboVNC  on Leonardo with default parameters (1 task, 1 hour on boost_usr_prod partition, 1 gpu, using your default account)
chappyner --user <my user name on leonardo> --cluster leonardo --tool vnc
# Run a VNC desktop via noVNC + TurboVNC  on Leonardo using the boost_qos_dbg for 30 minutes
chappyner --user <my user name on leonardo> --cluster leonardo --tool vnc -q boost_qos_dbg --time 00:30

Please check the --help option for the full list of options, as well as the documentation of your scheduler[^scheduler] and your cluster[^cineca_user_guide] for the full set of job submit options.

Custom warehouse

If you want to build your warehouse with your own tools you can exploit the --warehouse option; if coupled with --cluster it overwrites the default system value, whereas if you are deploying Chappyner on a different HPC cluster you need to couple it with the --host option.

Warehouses has to be built with a specific structure in order to be compliant with the client package here. Please refer to the original repo for details (see warehouses/README.md).

License

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see here.

Mantainers

This code is mantained by HPC department at Cineca.

Authors

Fabio Pitari, Lucia Rodriguez Muñoz, Antonio Memmolo

[^venv]: If you are not confident with Python virtual environments you can find a beginner's guide here [^startup_script]: You can inspect the scripts content using the --list-clusters option [^scheduler]: For Slurm you can refer to the "sbatch" command options; for PBS you can refer to the "qsub" command options [^cineca_user_guide]: For Cineca clusters you can find all the User's guides here

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

chappyner-0.3.0.tar.gz (97.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

chappyner-0.3.0-py3-none-any.whl (85.2 kB view details)

Uploaded Python 3

File details

Details for the file chappyner-0.3.0.tar.gz.

File metadata

  • Download URL: chappyner-0.3.0.tar.gz
  • Upload date:
  • Size: 97.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for chappyner-0.3.0.tar.gz
Algorithm Hash digest
SHA256 acd45901d254142e7a39ee70258bbfec33cb4ded83ff656a58fb1575233dae0b
MD5 da0a8166858fed33e1522ab572768a6c
BLAKE2b-256 2e678c533783be07b51fd38540a368dba33bcc2695ebc868e8f283596ba82412

See more details on using hashes here.

File details

Details for the file chappyner-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: chappyner-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 85.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for chappyner-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4de1f5156aa51b8beed952aa625aa15a065df470bb76ea0fcdc5b746f15f2261
MD5 f75581b6b1d85eed5e1954ddbb7d7fbe
BLAKE2b-256 25ddb8b7661d268d4f59cb56890f50f42a7450b75dda0a0e21b82c5562449487

See more details on using hashes here.

Supported by

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