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.0.tar.gz (6.1 kB view details)

Uploaded Source

Built Distribution

hpc_sdk-0.2.0-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for hpc_sdk-0.2.0.tar.gz
Algorithm Hash digest
SHA256 7760511ce5ad87a6c6d0efb63cabf7fbe2e01694d4337714a48877acf42f4233
MD5 ecd2e6dbf98184be7cca6cc4275bead0
BLAKE2b-256 9413fd0464e41c4305836bbcbfc69921680db4532d6700c9af9336138413aaee

See more details on using hashes here.

Provenance

File details

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

File metadata

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

File hashes

Hashes for hpc_sdk-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1ad073b8afb007050339e1e1caa3274a86835fc32324c417c81131fabc980d94
MD5 a6ada7c03ab55f84986683835423e816
BLAKE2b-256 ea8fb07af65b2fe352e1ba503ac27e7d31fb07b41c4bc7890375dd398ccd6ef8

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