Skip to main content

Foldspace

Foldspace 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 Foldspace is Open Ondemand, from which it inherits the main logics as well as part of the codes that it uses on the remote side; Foldspace 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 (toolbox) with no needs of servers running on the HPC cluster (other than sshd).


Install

[!note] Foldspace is officially supported on GNU/Linux, MacOS and Windows via WSL. Windows Powershell support is still experimental, and BSD systems have not been tested.

You can install the latest Foldspace release in a Python virtual environment1 of your current path using for instance:

python3 -m venv foldspace_venv # or choose the name you like
source foldspace_venv/bin/activate
pip install --upgrade pip
pip install foldspace

If you prefer to use the development version instead, clone the official repository and replace pip install foldspace with pip install <pip_package directory path>2.

Quick start

A typical general syntax for Foldspace is the following:

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

but for some default clusters you can exploit some default settings and ready-to-use toolboxes on the clusters to make this syntax shorter. You can list all the default HPC clusters using the --list-clusters option and the avaliable tools remotely with the --list-tools option. For instance, to use Foldspace on <my cluster> you can run something like this:

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

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 cluster3 (e.g. to retrieve some ssh certificate needed for the access); if you don't like this behaviour you can skipt this step via the --no-startup-script option and perform any preliminary required step manually before using Foldspace.

Here it follows a list of examples to make it clearer; all the examples refers to a generic <my cluster> using Slurm as scheduler, containing jupyter and vnc as tools in the default cluster toolbox:

# Run Jupyter on `<my cluster>` with default configs (e.g. default partition, default walltime, default account, default resources)
foldspace --user <my user name on my cluster> --cluster <my cluster> --tool jupyter
# Run Jupyter on `<my cluster>` for 3 hours using 4 tasks on `<some partition>` with your account <my account>:
foldspace --user <my user name on my cluster> --cluster <my cluster> --tool jupyter --ntasks 4 --partition <some partition> --account <my account> --time 03:00:00
# Run a VNC remote desktop on `<my cluster>` with default parameters: 
foldspace --user <my user name on my cluster> --cluster <my cluster> --tool vnc
# Run a VNC remote desktop on `<my cluster>` using <some qos> for 30 minutes
foldspace --user <my user name on my cluster> --cluster <my cluster> --tool vnc --qos <some qos> --time 30:00

Please check the --help option for the full list of options, as well as the documentation of your scheduler4 and your cluster for the full set of job submit options.

Official repository

Foldspace source code is hosted at this link, where you can also find documentation and examples related to the toolbox to be hosted remotely.

Custom toolbox

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

Toolboxes 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 toolboxes/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

  1. If you are not confident with Python virtual environments you can find a beginner's guide here

  2. Please avoid the -e/--editable option for pip, since it is tipically unable to handle package data in setuptools and Foldspace execution would crash

  3. You can inspect the scripts content using the --list-clusters option

  4. For Slurm you can refer to the "sbatch" command options; for PBS you can refer to the "qsub" command options

Download files

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

Source Distribution

foldspace-1.0.0.tar.gz (96.6 kB view details)

Uploaded Source

Built Distribution

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

foldspace-1.0.0-py3-none-any.whl (84.5 kB view details)

Uploaded Python 3

File details

Details for the file foldspace-1.0.0.tar.gz.

File metadata

  • Download URL: foldspace-1.0.0.tar.gz
  • Upload date:
  • Size: 96.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.3

File hashes

Hashes for foldspace-1.0.0.tar.gz
Algorithm Hash digest
SHA256 0d7998b3823296ea965e08ed7b14adf67a0f9f9a756c55161054da2fb2e83afa
MD5 aa9e3ef87f3a9f451c89adc40b81900b
BLAKE2b-256 f089e6a3c753ebb183880b886845d02abbf11b3cbee7dd60695ad6f00f92802c

See more details on using hashes here.

File details

Details for the file foldspace-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: foldspace-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 84.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.3

File hashes

Hashes for foldspace-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5689808e25c01c3e0908855487d5b5617b0338b597080d1008a1e85a1bf8ed99
MD5 b800fc60095665a8544faf9d6a338d5e
BLAKE2b-256 84adaa27ca875c04f9049304b88ec122d46c19136b51b6f2c93c3e527343437a

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 files

0.0.1

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page