requirements | ClassVar[list[str] | list[list[str]]] | [] | Pip packages to install in the environment. Supports standard pip syntax including version specifiers. Use a list of strings for a single install step, or a list of lists to install in multiple steps. Example: ["numpy==1.24.0", "torch\>=2.0.0"] or [["setuptools", "wheel"], ["numpy==1.24.0"]] |
requirements_context_dir | ClassVar[Optional[str]] | None | Base directory for resolving local-path requirements such as .[extra] or projects/foo[extra]. Defaults to the directory containing the app file. |
local_python_modules | ClassVar[list[str]] | [] | List of local Python module names to include in the deployment. Use for custom code not available on PyPI. Example: ["my_utils", "models"] |
machine_type | ClassVar[str | list[str]] | 'S' | Compute instance type for your application. CPU options: ‘XS’, ‘S’ (default), ‘M’, ‘L’. GPU options: ‘GPU-A6000’, ‘GPU-A100’, ‘GPU-H100’, ‘GPU-H200’, ‘GPU-B200’. Use a string for a single type, or a list to define fallback types (tried in order until one is available). Example: "GPU-A100" or ["GPU-H100", "GPU-A100"] |
num_gpus | ClassVar[int | None] | None | Number of GPUs to allocate. Only applies to GPU machine types. |
regions | ClassVar[Optional[list[str]]] | None | Allowed regions for deployment. None means any region. Example: ["us-east", "eu-west"] |
host_kwargs | ClassVar[dict[str, Any]] | \{'_scheduler': 'nomad', '_scheduler_options': \{'storage_region': 'us-east'\}, 'resolver': 'uv', 'keep_alive': 60\} | Advanced configuration dictionary passed to the host. For internal use. Prefer using class attributes instead. |
app_name | ClassVar[Optional[str]] | None | Custom name for the application. Defaults to class name. |
app_auth | ClassVar[Optional[AuthModeLiteral]] | None | Authentication mode. Options: ‘private’ (API key required), ‘public’ (no auth), ‘shared’ (shareable link). |
app_files | ClassVar[list[str]] | [] | List of files/directories to include in deployment. Example: ["./models", "./config.yaml"] |
app_files_ignore | ClassVar[list[str]] | ['\\.pyc$', '__pycache__/', '\\.git/', '\\.DS_Store$'] | Regex patterns to exclude from deployment. Default excludes .pyc, __pycache__, .git, .DS_Store. |
app_files_context_dir | ClassVar[Optional[str]] | None | Base directory for resolving app_files paths. Defaults to the directory containing the app file. |
request_timeout | ClassVar[Optional[int]] | None | Maximum seconds for a single request. None for default. |
startup_timeout | ClassVar[Optional[int]] | None | Maximum seconds for app startup/setup. None for default. |
min_concurrency | ClassVar[Optional[int]] | None | Minimum warm instances to keep running. Set to 1+ to avoid cold starts. Default is 0 (scale to zero). |
max_concurrency | ClassVar[Optional[int]] | None | Maximum instances to scale up to. |
concurrency_buffer | ClassVar[Optional[int]] | None | Additional instances to keep warm above current load. |
concurrency_buffer_perc | ClassVar[Optional[int]] | None | Percentage buffer of instances above current load. |
scaling_delay | ClassVar[Optional[int]] | None | Seconds to wait for a request to be picked up by a runner before triggering a scale up. Useful for apps with slow startup times. |
max_multiplexing | ClassVar[Optional[int]] | None | Maximum concurrent requests per instance. |
kind | ClassVar[Optional[str]] | None | Deployment kind. For internal use. |
image | ClassVar[Optional[ContainerImage]] | None | Custom container image for the application. Use ContainerImage to specify a Dockerfile. |
local_file_path | ClassVar[Optional[str]] | None | - |
skip_retry_conditions | ClassVar[Optional[list[RetryConditionLiteral]]] | None | - |
isolate_channel | async_grpc.Channel | None | None | - |