cybergis-compute-client


Namecybergis-compute-client JSON
Version 0.2.6 PyPI version JSON
download
home_pagehttps://github.com/cybergis/cybergis-compute-python-sdk
SummaryCyberGISX compatable HPC job submission client
upload_time2024-06-06 16:55:16
maintainerNone
docs_urlNone
authorCyberGIS Center
requires_pythonNone
licenseApache License 2.0
keywords hpc
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # CyberGIS-Compute Python SDK

![GitHub](https://img.shields.io/github/license/cybergis/cybergis-compute-python-sdk)
[![Docs](https://img.shields.io/badge/docs-site-blueviolet)](https://cybergis.github.io/cybergis-compute-python-sdk/reference.html)
[![PyPi Status](https://img.shields.io/pypi/v/cybergis-compute-client)](https://pypi.org/project/cybergis-compute-client/)

[![Docs Deployed](https://github.com/cybergis/cybergis-compute-python-sdk/actions/workflows/pages/pages-build-deployment/badge.svg)](https://github.com/cybergis/cybergis-compute-python-sdk/actions/workflows/pages/pages-build-deployment)
[![PythonCodeQuality](https://github.com/cybergis/cybergis-compute-python-sdk/workflows/Python%20Code%20Quality/badge.svg)](https://github.com/cybergis/cybergis-compute-python-sdk/actions)
[![PythonCodeTest](https://github.com/cybergis/cybergis-compute-python-sdk/workflows/Python%20Code%20Test/badge.svg)](https://github.com/cybergis/cybergis-compute-python-sdk/actions)

**CyberGIS-Compute** is a scalable middleware framework for enabling high-performance and data-intensive geospatial research and education on CyberGISX. This API can be used to send [supported jobs](https://github.com/cybergis/cybergis-compute-core#supported-git-projects) to various [supported HPC & computing resources](https://github.com/cybergis/cybergis-compute-core#supported-hpc--computing-resources).

***

## Installation

**Requirements**
- Python3 + pip3
- Jupyter server (Hub/Lab) with fixed domain
- System environment variables:
  - `JUPYTERHUB_API_TOKEN`: user access token, comes with JupyterHub/Lab.
  - `JUPYTER_INSTANCE_URL`: server url

From Pip:

```bash
pip install cybergis-compute-client
```

From Github:

```bash
git clone https://github.com/cybergis/cybergis-compute-python-sdk.git
cd cybergis-compute-python-sdk
python3 setup.py install
```

***

## Hello World Example

In this example, you will be using the SDK's **Pilot UI** to run the [hello world GitHub project](https://github.com/cybergis/cybergis-compute-hello-world) on the [Keeling Computing Cluster](https://cybergis.illinois.edu/infrastructure/hpc-user-guide/). 

1. Run the **Pilot UI**
```python
from cybergis_compute_client import CyberGISCompute

cybergis = CyberGISCompute(url="xxx") # replace xxx with CyberGIS-Compute server url
cybergis.show_ui() # run Pilot UI
```

2. Select `hello world` from **📦 Job Template**
3. Select `keeling_community` from **🖥 Computing Resource**
4. Configure the following, or leave it as default
	- Slurm Computing Configurations
	- Input Parameters
	- Receive Email
5. Select a file to upload under **Upload Data**
6. Click Submit

> ❓ If you wonder where the customized configuration options comes from, they are defined in the `manifest.json` file of each project. Please refer to https://github.com/cybergis/cybergis-compute-hello-world/blob/main/manifest.json

***
## SDK Usage
```python
cybergis = CyberGISCompute(url="xxx")
```

1. Query and resume jobs that you own. 
```python
# CyberGISCompute.list_job -> return a list of jobs that you submitted
cybergis.list_job()

# CyberGISCompute.get_job_by_id -> return a Job object referred by that id
cybergis.get_job_by_id(id)
```

2. Query CyberGIS-Compute server support information
```python
# CyberGISCompute.list_hpc -> prints a list of hpc resources that the server supports
cybergis.list_hpc()

# CyberGISCompute.list_git -> prints a list of Git projects that the server supports
cybergis.list_git()
```

3. Use Pilot UI
```python
# Renders a IPython Widget UI in Jupyter (async)
# CyberGISCompute.create_job_by_ui -> return None
cybergis.show_ui()

# Get the job submitted by the UI (after you press the submit button)
# CyberGISCompute.get_latest_created_job -> return Job object
cybergis.get_latest_created_job()
```

4. Submit job using programming style (in progress)
```python
# the Job object is an interface for a job
# CyberGISCompute.create_job -> return Job object & print the job's information
job = cybergis.create_job(hpc="some HPC")

# Job.submit -> print the job's information
job.submit()
```

***

## Related Documentation and Projects
- [CyberGIS-Compute Python SDK webpage](https://cybergis.github.io/cybergis-compute-python-sdk/)
    - [Using CyberGIS-Compute](https://cybergis.github.io/cybergis-compute-python-sdk/usage.html)
    - [Hello World Notebook](https://cybergis.github.io/cybergis-compute-python-sdk/notebooks/hello_world.html)
    - [Model Gallery](https://cybergis.github.io/cybergis-compute-python-sdk/models.html)
    - [Contributing Models](https://cybergis.github.io/cybergis-compute-python-sdk/model_contribution/index.html)
- [CyberGIS Compute Core - the server](https://github.com/cybergis/cybergis-compute-core)
- [CyberGIS Compute Example Hello World Project](https://github.com/cybergis/cybergis-compute-hello-world)

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/cybergis/cybergis-compute-python-sdk",
    "name": "cybergis-compute-client",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "HPC",
    "author": "CyberGIS Center",
    "author_email": "help@cybergis.org",
    "download_url": "https://files.pythonhosted.org/packages/8d/f5/85f9f9867519d7a3d900461311b6005a454e52e07f1b185f8df08c59c431/cybergis_compute_client-0.2.6.tar.gz",
    "platform": null,
    "description": "# CyberGIS-Compute Python SDK\n\n![GitHub](https://img.shields.io/github/license/cybergis/cybergis-compute-python-sdk)\n[![Docs](https://img.shields.io/badge/docs-site-blueviolet)](https://cybergis.github.io/cybergis-compute-python-sdk/reference.html)\n[![PyPi Status](https://img.shields.io/pypi/v/cybergis-compute-client)](https://pypi.org/project/cybergis-compute-client/)\n\n[![Docs Deployed](https://github.com/cybergis/cybergis-compute-python-sdk/actions/workflows/pages/pages-build-deployment/badge.svg)](https://github.com/cybergis/cybergis-compute-python-sdk/actions/workflows/pages/pages-build-deployment)\n[![PythonCodeQuality](https://github.com/cybergis/cybergis-compute-python-sdk/workflows/Python%20Code%20Quality/badge.svg)](https://github.com/cybergis/cybergis-compute-python-sdk/actions)\n[![PythonCodeTest](https://github.com/cybergis/cybergis-compute-python-sdk/workflows/Python%20Code%20Test/badge.svg)](https://github.com/cybergis/cybergis-compute-python-sdk/actions)\n\n**CyberGIS-Compute** is a scalable middleware framework for enabling high-performance and data-intensive geospatial research and education on CyberGISX. This API can be used to send [supported jobs](https://github.com/cybergis/cybergis-compute-core#supported-git-projects) to various [supported HPC & computing resources](https://github.com/cybergis/cybergis-compute-core#supported-hpc--computing-resources).\n\n***\n\n## Installation\n\n**Requirements**\n- Python3 + pip3\n- Jupyter server (Hub/Lab) with fixed domain\n- System environment variables:\n  - `JUPYTERHUB_API_TOKEN`: user access token, comes with JupyterHub/Lab.\n  - `JUPYTER_INSTANCE_URL`: server url\n\nFrom Pip:\n\n```bash\npip install cybergis-compute-client\n```\n\nFrom Github:\n\n```bash\ngit clone https://github.com/cybergis/cybergis-compute-python-sdk.git\ncd cybergis-compute-python-sdk\npython3 setup.py install\n```\n\n***\n\n## Hello World Example\n\nIn this example, you will be using the SDK's **Pilot UI** to run the [hello world GitHub project](https://github.com/cybergis/cybergis-compute-hello-world) on the [Keeling Computing Cluster](https://cybergis.illinois.edu/infrastructure/hpc-user-guide/). \n\n1. Run the **Pilot UI**\n```python\nfrom cybergis_compute_client import CyberGISCompute\n\ncybergis = CyberGISCompute(url=\"xxx\") # replace xxx with CyberGIS-Compute server url\ncybergis.show_ui() # run Pilot UI\n```\n\n2. Select `hello world` from **\ud83d\udce6 Job Template**\n3. Select `keeling_community` from **\ud83d\udda5 Computing Resource**\n4. Configure the following, or leave it as default\n\t- Slurm Computing Configurations\n\t- Input Parameters\n\t- Receive Email\n5. Select a file to upload under **Upload Data**\n6. Click Submit\n\n> \u2753 If you wonder where the customized configuration options comes from, they are defined in the `manifest.json` file of each project. Please refer to https://github.com/cybergis/cybergis-compute-hello-world/blob/main/manifest.json\n\n***\n## SDK Usage\n```python\ncybergis = CyberGISCompute(url=\"xxx\")\n```\n\n1. Query and resume jobs that you own. \n```python\n# CyberGISCompute.list_job -> return a list of jobs that you submitted\ncybergis.list_job()\n\n# CyberGISCompute.get_job_by_id -> return a Job object referred by that id\ncybergis.get_job_by_id(id)\n```\n\n2. Query CyberGIS-Compute server support information\n```python\n# CyberGISCompute.list_hpc -> prints a list of hpc resources that the server supports\ncybergis.list_hpc()\n\n# CyberGISCompute.list_git -> prints a list of Git projects that the server supports\ncybergis.list_git()\n```\n\n3. Use Pilot UI\n```python\n# Renders a IPython Widget UI in Jupyter (async)\n# CyberGISCompute.create_job_by_ui -> return None\ncybergis.show_ui()\n\n# Get the job submitted by the UI (after you press the submit button)\n# CyberGISCompute.get_latest_created_job -> return Job object\ncybergis.get_latest_created_job()\n```\n\n4. Submit job using programming style (in progress)\n```python\n# the Job object is an interface for a job\n# CyberGISCompute.create_job -> return Job object & print the job's information\njob = cybergis.create_job(hpc=\"some HPC\")\n\n# Job.submit -> print the job's information\njob.submit()\n```\n\n***\n\n## Related Documentation and Projects\n- [CyberGIS-Compute Python SDK webpage](https://cybergis.github.io/cybergis-compute-python-sdk/)\n    - [Using CyberGIS-Compute](https://cybergis.github.io/cybergis-compute-python-sdk/usage.html)\n    - [Hello World Notebook](https://cybergis.github.io/cybergis-compute-python-sdk/notebooks/hello_world.html)\n    - [Model Gallery](https://cybergis.github.io/cybergis-compute-python-sdk/models.html)\n    - [Contributing Models](https://cybergis.github.io/cybergis-compute-python-sdk/model_contribution/index.html)\n- [CyberGIS Compute Core - the server](https://github.com/cybergis/cybergis-compute-core)\n- [CyberGIS Compute Example Hello World Project](https://github.com/cybergis/cybergis-compute-hello-world)\n",
    "bugtrack_url": null,
    "license": "Apache License 2.0",
    "summary": "CyberGISX compatable HPC job submission client",
    "version": "0.2.6",
    "project_urls": {
        "Homepage": "https://github.com/cybergis/cybergis-compute-python-sdk"
    },
    "split_keywords": [
        "hpc"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "8df585f9f9867519d7a3d900461311b6005a454e52e07f1b185f8df08c59c431",
                "md5": "88462f4dbbcfa0e668f71ebfe1cbeecc",
                "sha256": "17c9d542828f7e9216a07a6c43367917392805c8d7f5f7045bef7384439fef68"
            },
            "downloads": -1,
            "filename": "cybergis_compute_client-0.2.6.tar.gz",
            "has_sig": false,
            "md5_digest": "88462f4dbbcfa0e668f71ebfe1cbeecc",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 4552696,
            "upload_time": "2024-06-06T16:55:16",
            "upload_time_iso_8601": "2024-06-06T16:55:16.843186Z",
            "url": "https://files.pythonhosted.org/packages/8d/f5/85f9f9867519d7a3d900461311b6005a454e52e07f1b185f8df08c59c431/cybergis_compute_client-0.2.6.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-06-06 16:55:16",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "cybergis",
    "github_project": "cybergis-compute-python-sdk",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "cybergis-compute-client"
}
        
Elapsed time: 3.76914s