<p align="center">
<a href="https://github.com/openworkload/swm-jupyter-term/blob/master/LICENSE" alt="License">
<img src="https://img.shields.io/github/license/openworkload/swm-jupyter-term" />
</a>
<a href="https://github.com/openworkload/swm-jupyter-term/actions/workflows/ci.yml" alt="Latest CI tests result">
<img src="https://github.com/openworkload/swm-jupyter-term/actions/workflows/ci.yml/badge.svg?event=push" />
</a>
</p>
Sky Port Juputer terminal
=============================
# Overview
Sky Port is an universal bus between user software and compute resources.
It can also be considered as a transportation layer between workload producers and compute resource providers.
Sky Port makes it easy to connect user software to different cloud resources.
# JupyterHub integration
The project in this repository represents a custom spawner that allows spawning jupyterlab server over Sky Port.
The spawner python package is distributed via PyPI: [swmjupyter](https://pypi.org/project/swmjupyter).
## How to run
1. Ensure configurable-http-proxy is installed:
```bash
sudo apt install npm
sudo npm install -g configurable-http-proxy
```
2. Install jupyterhub and swmjupyter in virtual environment:
```bash
python3 -m venv /tmp/jupyterhub
source /tmp/jupyterhub/bin/activate
pip install jupyterhub==5.2.1 swmjupyter
```
3. Generate default JupyterHub configuration:
```bash
jupyterhub --generate-config
```
4. Add Sky Port related settings to generated jupyterhub_config.py:
```
c.JupyterHub.spawner_class = 'swmjupyter.spawner.SwmSpawner'
c.JupyterHub.authenticator_class = 'jupyterhub.auth.DummyAuthenticator'
c.SwmSpawner._swm_ca_file = '~/.swm/spool/secure/cluster/ca-chain-cert.pem'
c.SwmSpawner._swm_key_file = '~/.swm/key.pem'
c.SwmSpawner._swm_cert_file = '~/.swm/cert.pem'
c.SwmSpawner.start_timeout = 1800
```
4. Start JupyterHub:
```bash
jupyterhub
```
5. Submit Sky Port job:
a. go to `http://localhost:8000` in a web browser,
b. select notebook and other files that will be uploaded (if needed),
c. select flavor for VM machine (or use name filter if needed),
d. click "Start" button.
In 10-15 minutes JupyterLab will be started in Azure.
# Contributing
We appreciate all contributions. If you are planning to contribute back bug-fixes, please do so without any further discussion. If you plan to contribute new features, utility functions or extensions, please first open an issue and discuss the feature with us.
# License
We use a shared copyright model that enables all contributors to maintain the copyright on their contributions.
This software is licensed under the [BSD-3-Clause license](LICENSE).
Raw data
{
"_id": null,
"home_page": null,
"name": "swmjupyter",
"maintainer": null,
"docs_url": null,
"requires_python": "~=3.10",
"maintainer_email": null,
"keywords": "hpc, high performance computing, cloud, cloud computing, open workload, sky port, jupyter, jupyterhub, jupyterlab",
"author": null,
"author_email": "Taras Shapovalov <taras@iclouds.net>",
"download_url": "https://files.pythonhosted.org/packages/c1/90/5dada37ca4aad70feede3b0fc4346176ff9b397f787251128d78cf999a47/swmjupyter-0.1.4.tar.gz",
"platform": null,
"description": "<p align=\"center\">\n <a href=\"https://github.com/openworkload/swm-jupyter-term/blob/master/LICENSE\" alt=\"License\">\n <img src=\"https://img.shields.io/github/license/openworkload/swm-jupyter-term\" />\n </a>\n <a href=\"https://github.com/openworkload/swm-jupyter-term/actions/workflows/ci.yml\" alt=\"Latest CI tests result\">\n <img src=\"https://github.com/openworkload/swm-jupyter-term/actions/workflows/ci.yml/badge.svg?event=push\" />\n </a>\n</p>\n\n\nSky Port Juputer terminal\n=============================\n\n# Overview\n\nSky Port is an universal bus between user software and compute resources.\nIt can also be considered as a transportation layer between workload producers and compute resource providers.\nSky Port makes it easy to connect user software to different cloud resources.\n\n# JupyterHub integration\n\nThe project in this repository represents a custom spawner that allows spawning jupyterlab server over Sky Port.\nThe spawner python package is distributed via PyPI: [swmjupyter](https://pypi.org/project/swmjupyter).\n\n## How to run\n\n1. Ensure configurable-http-proxy is installed:\n```bash\nsudo apt install npm\nsudo npm install -g configurable-http-proxy\n```\n\n2. Install jupyterhub and swmjupyter in virtual environment:\n```bash\npython3 -m venv /tmp/jupyterhub\nsource /tmp/jupyterhub/bin/activate\npip install jupyterhub==5.2.1 swmjupyter\n```\n\n3. Generate default JupyterHub configuration:\n```bash\njupyterhub --generate-config\n```\n\n4. Add Sky Port related settings to generated jupyterhub_config.py:\n```\nc.JupyterHub.spawner_class = 'swmjupyter.spawner.SwmSpawner'\nc.JupyterHub.authenticator_class = 'jupyterhub.auth.DummyAuthenticator'\nc.SwmSpawner._swm_ca_file = '~/.swm/spool/secure/cluster/ca-chain-cert.pem'\nc.SwmSpawner._swm_key_file = '~/.swm/key.pem'\nc.SwmSpawner._swm_cert_file = '~/.swm/cert.pem'\nc.SwmSpawner.start_timeout = 1800\n```\n\n4. Start JupyterHub:\n```bash\njupyterhub\n```\n\n5. Submit Sky Port job:\na. go to `http://localhost:8000` in a web browser,\nb. select notebook and other files that will be uploaded (if needed),\nc. select flavor for VM machine (or use name filter if needed),\nd. click \"Start\" button.\n\nIn 10-15 minutes JupyterLab will be started in Azure.\n\n\n# Contributing\n\nWe appreciate all contributions. If you are planning to contribute back bug-fixes, please do so without any further discussion. If you plan to contribute new features, utility functions or extensions, please first open an issue and discuss the feature with us. \n\n\n# License\n\nWe use a shared copyright model that enables all contributors to maintain the copyright on their contributions.\n\nThis software is licensed under the [BSD-3-Clause license](LICENSE).\n",
"bugtrack_url": null,
"license": "BSD 3-Clause License",
"summary": "A spawner for JupyterHub to spawn notebooks over Sky Port",
"version": "0.1.4",
"project_urls": {
"Distribution": "https://pypi.org/project/swmjupyter",
"Documentation": "https://openworkload.org",
"Homepage": "https://openworkload.org",
"Issues": "https://github.com/openworkload/swm-jupyter-term/issues",
"Repository": "https://github.com/openworkload/swm-jupyter-term",
"Tests": "https://github.com/openworkload/swm-jupyter-term/tree/master/test"
},
"split_keywords": [
"hpc",
" high performance computing",
" cloud",
" cloud computing",
" open workload",
" sky port",
" jupyter",
" jupyterhub",
" jupyterlab"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "75dddbca3878f787ca053983a7a2a4bee46d62a834c745be770945553ee6631c",
"md5": "03ac636d21c1b8038cf14221bd229c06",
"sha256": "f69df97d664cdcd0fc694d3d0d7f4132b6f4d5db7470d25e63cebc01068cb69f"
},
"downloads": -1,
"filename": "swmjupyter-0.1.4-py3-none-any.whl",
"has_sig": false,
"md5_digest": "03ac636d21c1b8038cf14221bd229c06",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "~=3.10",
"size": 11368,
"upload_time": "2024-11-24T13:11:57",
"upload_time_iso_8601": "2024-11-24T13:11:57.141731Z",
"url": "https://files.pythonhosted.org/packages/75/dd/dbca3878f787ca053983a7a2a4bee46d62a834c745be770945553ee6631c/swmjupyter-0.1.4-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "c1905dada37ca4aad70feede3b0fc4346176ff9b397f787251128d78cf999a47",
"md5": "fcb56d254b8545e7a50e5426ea63ea7e",
"sha256": "9e2ca09a90ace7b911029ad080690ce45bf7b462b6ba8e7f783e8d65af152b7f"
},
"downloads": -1,
"filename": "swmjupyter-0.1.4.tar.gz",
"has_sig": false,
"md5_digest": "fcb56d254b8545e7a50e5426ea63ea7e",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "~=3.10",
"size": 13160,
"upload_time": "2024-11-24T13:11:58",
"upload_time_iso_8601": "2024-11-24T13:11:58.556188Z",
"url": "https://files.pythonhosted.org/packages/c1/90/5dada37ca4aad70feede3b0fc4346176ff9b397f787251128d78cf999a47/swmjupyter-0.1.4.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-11-24 13:11:58",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "openworkload",
"github_project": "swm-jupyter-term",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [
{
"name": "alembic",
"specs": [
[
"==",
"1.7.5"
]
]
},
{
"name": "annotated-types",
"specs": [
[
"==",
"0.7.0"
]
]
},
{
"name": "anyio",
"specs": [
[
"==",
"3.4.0"
]
]
},
{
"name": "attrs",
"specs": [
[
"==",
"21.4.0"
]
]
},
{
"name": "autoflake",
"specs": [
[
"==",
"1.4"
]
]
},
{
"name": "bandit",
"specs": [
[
"==",
"1.7.9"
]
]
},
{
"name": "black",
"specs": [
[
"==",
"21.12b0"
]
]
},
{
"name": "bleach",
"specs": [
[
"==",
"4.1.0"
]
]
},
{
"name": "certifi",
"specs": [
[
"==",
"2021.10.8"
]
]
},
{
"name": "certipy",
"specs": [
[
"==",
"0.1.3"
]
]
},
{
"name": "cffi",
"specs": [
[
"==",
"1.15.0"
]
]
},
{
"name": "charset-normalizer",
"specs": [
[
"==",
"2.0.9"
]
]
},
{
"name": "click",
"specs": [
[
"==",
"8.0.3"
]
]
},
{
"name": "colorama",
"specs": [
[
"==",
"0.4.4"
]
]
},
{
"name": "cryptography",
"specs": [
[
"==",
"36.0.1"
]
]
},
{
"name": "docutils",
"specs": [
[
"==",
"0.18.1"
]
]
},
{
"name": "greenlet",
"specs": [
[
"==",
"1.1.2"
]
]
},
{
"name": "h11",
"specs": [
[
"==",
"0.12.0"
]
]
},
{
"name": "httpcore",
"specs": [
[
"==",
"0.14.3"
]
]
},
{
"name": "httpx",
"specs": [
[
"==",
"0.21.1"
]
]
},
{
"name": "idna",
"specs": [
[
"==",
"3.3"
]
]
},
{
"name": "importlib-metadata",
"specs": [
[
"==",
"4.10.0"
]
]
},
{
"name": "isort",
"specs": [
[
"==",
"5.10.1"
]
]
},
{
"name": "jeepney",
"specs": [
[
"==",
"0.7.1"
]
]
},
{
"name": "jinja2",
"specs": [
[
"==",
"3.0.3"
]
]
},
{
"name": "jsonschema",
"specs": [
[
"==",
"4.3.3"
]
]
},
{
"name": "jupyter-events",
"specs": [
[
"==",
"0.5.0"
]
]
},
{
"name": "jupyterhub",
"specs": [
[
"==",
"5.2.1"
]
]
},
{
"name": "keyring",
"specs": [
[
"==",
"23.5.0"
]
]
},
{
"name": "mako",
"specs": [
[
"==",
"1.1.6"
]
]
},
{
"name": "markdown-it-py",
"specs": [
[
"==",
"2.2.0"
]
]
},
{
"name": "markupsafe",
"specs": [
[
"==",
"2.0.1"
]
]
},
{
"name": "mdurl",
"specs": [
[
"==",
"0.1.2"
]
]
},
{
"name": "mypy",
"specs": [
[
"==",
"1.0.1"
]
]
},
{
"name": "mypy-extensions",
"specs": [
[
"==",
"0.4.3"
]
]
},
{
"name": "oauthlib",
"specs": [
[
"==",
"3.1.1"
]
]
},
{
"name": "packaging",
"specs": [
[
"==",
"21.3"
]
]
},
{
"name": "pamela",
"specs": [
[
"==",
"1.2.0"
]
]
},
{
"name": "pathspec",
"specs": [
[
"==",
"0.9.0"
]
]
},
{
"name": "pbr",
"specs": [
[
"==",
"6.0.0"
]
]
},
{
"name": "pkginfo",
"specs": [
[
"==",
"1.8.2"
]
]
},
{
"name": "platformdirs",
"specs": [
[
"==",
"2.4.1"
]
]
},
{
"name": "prometheus-client",
"specs": [
[
"==",
"0.12.0"
]
]
},
{
"name": "pycparser",
"specs": [
[
"==",
"2.21"
]
]
},
{
"name": "pydantic",
"specs": [
[
"==",
"2.9.2"
]
]
},
{
"name": "pydantic-core",
"specs": [
[
"==",
"2.23.4"
]
]
},
{
"name": "pyflakes",
"specs": [
[
"==",
"2.4.0"
]
]
},
{
"name": "pygments",
"specs": [
[
"==",
"2.11.1"
]
]
},
{
"name": "pyopenssl",
"specs": [
[
"==",
"21.0.0"
]
]
},
{
"name": "pyparsing",
"specs": [
[
"==",
"3.0.6"
]
]
},
{
"name": "pyrsistent",
"specs": [
[
"==",
"0.18.0"
]
]
},
{
"name": "python-dateutil",
"specs": [
[
"==",
"2.8.2"
]
]
},
{
"name": "python-json-logger",
"specs": [
[
"==",
"2.0.2"
]
]
},
{
"name": "pyyaml",
"specs": [
[
"==",
"6.0.2"
]
]
},
{
"name": "readme-renderer",
"specs": [
[
"==",
"32.0"
]
]
},
{
"name": "requests",
"specs": [
[
"==",
"2.26.0"
]
]
},
{
"name": "requests-toolbelt",
"specs": [
[
"==",
"0.9.1"
]
]
},
{
"name": "rfc3986",
"specs": [
[
"==",
"1.5.0"
]
]
},
{
"name": "rich",
"specs": [
[
"==",
"13.2.0"
]
]
},
{
"name": "ruff",
"specs": [
[
"==",
"0.6.2"
]
]
},
{
"name": "secretstorage",
"specs": [
[
"==",
"3.3.1"
]
]
},
{
"name": "six",
"specs": [
[
"==",
"1.16.0"
]
]
},
{
"name": "sniffio",
"specs": [
[
"==",
"1.2.0"
]
]
},
{
"name": "sqlalchemy",
"specs": [
[
"==",
"1.4.29"
]
]
},
{
"name": "stevedore",
"specs": [
[
"==",
"5.3.0"
]
]
},
{
"name": "swmclient",
"specs": [
[
"==",
"0.1.6"
]
]
},
{
"name": "tomli",
"specs": [
[
"==",
"1.2.3"
]
]
},
{
"name": "tornado",
"specs": [
[
"==",
"6.1"
]
]
},
{
"name": "tqdm",
"specs": [
[
"==",
"4.62.3"
]
]
},
{
"name": "traitlets",
"specs": [
[
"==",
"5.1.1"
]
]
},
{
"name": "twine",
"specs": [
[
"==",
"3.7.1"
]
]
},
{
"name": "typing-extensions",
"specs": [
[
"==",
"4.12.2"
]
]
},
{
"name": "urllib3",
"specs": [
[
"==",
"1.26.7"
]
]
},
{
"name": "webencodings",
"specs": [
[
"==",
"0.5.1"
]
]
},
{
"name": "wheel",
"specs": [
[
"==",
"0.37.1"
]
]
},
{
"name": "zipp",
"specs": [
[
"==",
"3.7.0"
]
]
}
],
"lcname": "swmjupyter"
}