Skip to content

Build a Python Function Image

Call function.run(action="build", ...) to build the function image.

Task and run parameters

Name Type Required Description
action str ✓ Action to execute. Must be build.
volumes list[dict] List of volumes.
resources dict Resource values with optional cpu, mem, gpu, and disk keys.
envs list[dict] Environment variables.
secrets list[str] List of secret names.
profile str Profile template.
instructions list[str] Additional Dockerfile instructions, each executed as a RUN instruction.
inputs dict Mapping of handler argument names to platform entity keys.
parameters dict Extra values passed to handler arguments.
init_parameters dict Values supplied to the init function.

Example

run = function.run(
    action="build",
    instructions=["apt-get install -y git"],
)