Skip to main content

Software Development Toolkit to communicate with the Materials MarketPlace HPC app.

Project description

hpc-sdk

sdk for hpc app of EU Materials-MarketPlace

Interacte with HPC through MarketPlace proxy

Use/integrate HPC Gateway app by SDK

This repository provide SDK for using or integrating the HPC gateway app into other MarketPlace app.

First, create a hpc instance with:

python

from marketplace_hpc import HpcGatewayApp

hpc = HpcGatewayApp(
    client_id=<app_id>, # This is the HPC gateway app.
    access_token=<your_access_token>,
)

The following capabilities are supported and can be called by using the SDK.

  • Check the availability of system: hpc.heartbeat()
  • Create a new calculation: hpc.new_job(), the resourceid will returned to list files on remote workdir, upload/downlead/delete files and the launch/delete job.
  • Upload file: hpc.upload_file(resourceid=<resourceid>, source_path=<file_local_path>.
  • Download file: hpc.download_file(resourceid=<resourceid>, filename=<filename>.
  • Delete file: hpc.delete_file(resourceid=resourceid, filename=<filename>)
  • List jobs (only CSCS deployment): hpc.list_jobs().
  • Launch job: hpc.run_job(resourceid=<resourceid>)
  • Delete job: hpc.delete_job(resourceid=resourceid)

You can find example at https://github.com/materials-marketplace/hpc-sdk/blob/main/hpc_api.ipynb

Materials Cloud (CSCS) deployment

The correspond HPC-Gateway app is https://www.materials-marketplace.eu/app/hpc-app (ID: 5fd66c68-50e9-474a-b55d-148777ae3efd) deployed on production server.

Since it deployed using Materials Cloud CSCS resources provided by EPFL, it is only for test purpose and MarketPlace users who what to use it need to contact Jusong Yu @unkpcz (jusong.yu@epfl.ch) to add your MarketPlace account to the whitelist and then register your account by:

curl -X POST \
   -H "Authorization:Bearer <put_your_token_here>" \
   'https://mp-hpc.herokuapp.com/user'

IWM deployment

The correspond HPC-Gateway app is HPC gateway (broker) (ID: dc67d85e-7945-49fa-bf85-3159a8358f85) deployed on staging server since RPC broker server needed.

For maintainers

To create a new release, clone the repository, install development dependencies with pip install '.[dev]', and then execute bumpver update. This will:

  1. Create a tagged release with bumped version and push it to the repository.
  2. Trigger a GitHub actions workflow that creates a GitHub release.

Additional notes:

  • Use the --dry option to preview the release change.
  • The release tag (e.g. a/b/rc) is determined from the last release. Use the --tag option to switch the release tag.

Acknowledgements

This work is supported by the the MARKETPLACE project funded by Horizon 2020 under the H2020-NMBP-25-2017 call (Grant No. 760173),

MarketPlace

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

hpc_sdk-0.2.1.tar.gz (6.2 kB view details)

Uploaded Source

Built Distribution

hpc_sdk-0.2.1-py3-none-any.whl (5.2 kB view details)

Uploaded Python 3

File details

Details for the file hpc_sdk-0.2.1.tar.gz.

File metadata

  • Download URL: hpc_sdk-0.2.1.tar.gz
  • Upload date:
  • Size: 6.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.14

File hashes

Hashes for hpc_sdk-0.2.1.tar.gz
Algorithm Hash digest
SHA256 2657772dbe71d83453674cc99d77d96982538e005e61465f05a4b1b8dab85e75
MD5 daeeb203dddb525847eb5cd5908e89df
BLAKE2b-256 bf3f711c2bdfd3da1e18c3bb506857eac1f644279b4d8e87538facff0eeab36b

See more details on using hashes here.

Provenance

File details

Details for the file hpc_sdk-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: hpc_sdk-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 5.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.14

File hashes

Hashes for hpc_sdk-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 3f39ccb464b024b5acf18e1a73bd4cd27b704e9391118eba6389b6ddfe6dfc73
MD5 863be487395b17ddc033a1c0fc7a4d97
BLAKE2b-256 4a644b90df3131f48e3e179d579473726d1b92fbe6f439376836789b960a4d07

See more details on using hashes here.

Provenance

Supported by

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