Building HPC Agents¶
Academy supports deploying agents and running tasks on HPC resource. This guide walks through different patterns of using HPC resources with Academy.
Launching Agents with Globus Compute¶
Academy can be combined with Globus Compute to deploy agents onto remote resources. Globus Compute is a function-as-a-service provider with a bring-your-own compute model.
A Globus Compute endpoint can be deployed on an HPC resource using the globus_compute_endpoint package:
pip install globus-compute-endpoint
globus-compute-endpoint configure
globus-compute-endpoint start <ENDPOINT_NAME>
endpoint_id. For more information on deployoing and configuring a Globus Compute endpoint please refer to the Globus Compute documentation.
To launch agents on the Globus Compute endpoint, we can use the Globus Compute executor with the Manager class. The following script initializes a executor pointing to <endpoint_id> and passes the executor to a Manager to launch agents. It also connects the Manager and agent to the cloud hosted exchange at https://exchange.academy-agents.org using the HttpExchangeFactory for authenticated inter-site communication.
Running Actions With Parsl¶
Academy Agents can also manage a pool of resources to run actions on HPC facilities. With this pattern an Agent is deployed on the login-node of a cluster (either using Globus Compute as above, or co-located with the user-script that is located in the same place). An Agent can then use technique it chooses to allocate resources and run tasks on the cluster.
The following script shows a simple example of invoking a Parsl task within an Academy action.