Quickstart¶
Quick Installation¶
pip install opengris-scaler[all]
See Installation for other install choices and optional dependencies.
Start Services¶
The instructions below start a local scheduler with an elastic native worker
manager (baremetal_native). If you want to run scheduler + worker manager
locally but provision workers on cloud infrastructure, use these quick starts:
[object_storage_server]
bind_address = "tcp://127.0.0.1:8517"
[scheduler]
bind_address = "tcp://127.0.0.1:8516"
object_storage_address = "tcp://127.0.0.1:8517"
[[worker_manager]]
type = "baremetal_native"
scheduler_address = "tcp://127.0.0.1:8516"
worker_manager_id = "wm-native"
Run command:
scaler config.toml
In terminal 1:
scaler_object_storage_server tcp://127.0.0.1:8517
In terminal 2:
scaler_scheduler tcp://127.0.0.1:8516 --object-storage-address tcp://127.0.0.1:8517
In terminal 3:
scaler_worker_manager baremetal_native tcp://127.0.0.1:8516 --worker-manager-id wm-native
Start Compute Tasks¶
Connect the Python client and submit tasks:
from scaler import Client
def square(value):
return value * value
with Client(address="tcp://127.0.0.1:8516") as client:
results = client.map(square, range(0, 100))
print(results)