Loading...
Loading...
How to deploy a chalk function ("chalkcompute.function"). Useful for deploying a stand-alone python function in Chalk's container infrastructure. Use when someone wants to run a python function remotely on Chalk, deploy a chalkcompute function, or asks about the chalkcompute SDK.
npx skill4agent add chalk-ai/chalk-ai-plugins deploy-chalk-functionchalkcomputechalkcomputechalk-sandbox-sdkuv<3.14chalk-remote-call-python#!/usr/bin/env -S uv run --script
#
# /// script
# requires-python = ">=3.12,<3.14"
# dependencies = ["chalkcompute"]
# ///
import chalkcompute
@chalkcompute.function()
def some_function(arg_1: str) -> str:
return f"hi {arg_1}"
if __name__ == "__main__":
print(some_function("world"))@chalkcompute.function@chalkcompute.function()@chalkcompute.functionTypeError: function() takes 0 positional arguments but 1 was givensome_function("world")chalkCHALK_ENVIRONMENT_IDCHALK_ENVIRONMENTCHALK_API_SERVER
CHALK_CLIENT_ID
CHALK_CLIENT_SECRET
CHALK_ENVIRONMENT_IDchalk configCHALK_API_SERVER=... CHALK_CLIENT_ID=... CHALK_CLIENT_SECRET=... CHALK_ENVIRONMENT_ID=... ./your_script.pyCHALK_ENVIRONMENT_IDpermission_deniedCustomImageService.GetOrBuildCustomImageCHALK_CLIENT_IDCHALK_CLIENT_SECRETchalkcomputechalkcomputechalk-sandbox-sdk# [tool.uv.sources]
# chalkcompute = { path = "/path/to/chalk-sandbox-sdk" }