With our venv ready, the first thing to do is to register the Function.
In this demo, the Compute Function has been registered and assigned UUID e381b154-abe5-48d2-956f-4c61ee02adf0. We will need this UUID when it is time to run the Flow.
The demonstration assumes that you just logged in to SCG, and that you need to
re-activate the venv. Here are the commands to run, to reproduce the demo in
your own session:
NOTE: On SCG, Python versions are provided through Lmod modules. Every example assumes that you have already loaded the python/3.11.1 module.
# If needed, activate the venv
cd globus_compute_endpoint
. bin/activate
which python
python -V
# Download the `function.py` script from the GitHub repo.
curl -L -o function.py https://github.com/stanford-rc/globus-example-flow/raw/refs/heads/flow/function.py
# Run the script, with instructions to register the Compute Function.
# This might prompt you to authenticate.
python function.py register
Once the function.py script completes, you may delete the script. Functions are not tied to individual users (though they are tied to a particular Python version), and they may be used multiple times.