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:
pip install octue
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
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