Skip to main content
The Python package you write against is the same one the CLI uploads.
Then launch the tested example (source):

Surface that is documented

Put GPU-only imports inside the function so local dry-runs and packaging stay honest.

Non-Python files

The upload is the entrypoint plus the local Python modules it imports. Any other file (data, a config, a Lean/Lake or C project the function builds and runs) ships only when the decorator names it in include (CLI 0.1.21+):
  • Paths are relative to the project root: the entrypoint’s directory, or --project-root. include=["."] ships the whole directory.
  • A directory is walked recursively. Inside it, names that start with . (.git, .lake, .venv) and __pycache__ are skipped. Name a dot file explicitly to ship it.
  • Files land at the same relative paths in the run’s working directory. Symlinks are refused. Executable bits are not kept.
  • --dry-run lists every file that will ship. The whole upload is capped at 32 MiB compressed, 64 MiB uncompressed and 10,000 files.
  • The entrypoint is still a Python function. Toolchains are not preinstalled, so install them at run time. ptxas comes from the pip package above, at site-packages/nvidia/cuda_nvcc/bin/ptxas (it is not on PATH). Lean comes from elan; set ELAN_HOME under the working directory, because $HOME may be read-only.

Not in this manual

Do not treat local process spawning, detached handles you wait on later, persistent disks, or extra decorators as supported customer API. If it is not in the table above, do not build a workflow on it.

Timeout

Decorator timeout= is seconds on the function. The CLI default is 10 minutes if neither the decorator nor --timeout is set. The maximum is 24 hours. See Limits.