Skip to content

Latest commit

 

History

History
48 lines (31 loc) · 1.09 KB

README.md

File metadata and controls

48 lines (31 loc) · 1.09 KB

example-service-kueue

An example Octue Twined data service using Kubernetes/Kueue as the service backend.

The infrastructure that runs this service can be found here. It depends on these Terraform modules:

Usage

Install the client

pip install octue

Usage

Authenticate with GCP

Download a key for a developer service account and set the GOOGLE_APPLICATION_CREDENTIALS environment variable:

export GOOGLE_APPLICATION_CREDENTIALS=/path/to/gcp-credentials.json

Interact with the service

Run the following python code:

from octue.resources import Child


# Point to the data service
child = Child(
    id="octue/example-service:0.1.0",
    backend={"name": "GCPPubSubBackend", "project_name": "octue-sdk-python"},
)

# Ask a question
answer, _ = child.ask(input_values={"n_iterations": 5}, timeout=3600)

# Access the output data
answer