> ## Documentation Index
> Fetch the complete documentation index at: https://anaconda.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# outerbounds app deploy

export const GCell = ({children, className}) => <div className={`grid-table-cell ${className || ""}`} role="cell">
    {children}
  </div>;

export const GTH = ({children, className}) => <div className={`grid-table-th ${className || ""}`} role="columnheader">
    {children}
  </div>;

export const GRow = ({children}) => <div className="grid-table-row" role="row">{children}</div>;

export const GBody = ({children}) => <div className="grid-table-body" role="rowgroup">{children}</div>;

export const GHead = ({children}) => <div className="grid-table-head" role="rowgroup">{children}</div>;

export const GTable = ({children, className, cols}) => <div className={`grid-table not-prose overflow-hidden rounded-2xl ${className || ""}`} style={{
  "--grid-table-cols": cols
}} role="table">
    {children}
  </div>;

Packages your code, builds the container image, provisions the workers, and exposes the service as an endpoint. When a deployment with the same name exists in the same project and branch, the command updates it and rolls out a new version. If a rollout is already in progress, the command fails. Wait for the rollout to finish, or pass `--force-upgrade` to update anyway.

All configuration fields documented in [Deploying models and services](/docs/platform/guides/inference/deployments-deep-dive) can be set in the config file or passed as options. Values passed as options override the config file.

## Usage

```bash theme={null}
outerbounds app deploy [OPTIONS] [COMMAND]...
```

## Arguments

<GTable cols="25% 75%">
  <GHead>
    <GRow>
      <GTH>Argument</GTH>
      <GTH>Description</GTH>
    </GRow>
  </GHead>

  <GBody>
    <GRow>
      <GCell>`COMMAND`</GCell>
      <GCell>The startup command for the service when no config file is used, for example `"python app.py"`.</GCell>
    </GRow>
  </GBody>
</GTable>

## Options

<GTable cols="30% 20% 50%">
  <GHead>
    <GRow>
      <GTH>Option</GTH>
      <GTH>Default</GTH>
      <GTH>Description</GTH>
    </GRow>
  </GHead>

  <GBody>
    <GRow>
      <GCell>`--config-file`</GCell>

      <GCell />

      <GCell>The config file to use for the App (YAML or JSON).</GCell>
    </GRow>

    <GRow>
      <GCell>`--readiness-condition`</GCell>
      <GCell>`at_least_one_running`</GCell>
      <GCell>What the deploy command waits for before reporting success: `at_least_one_running` (one worker of the new version is running), `all_running` (the minimum number of workers are running), `fully_finished` (all workers of the new version are running and no workers from previous versions remain), or `async` (return as soon as the platform registers the deployment). Useful for CI/CD pipelines that trigger on deployment completion.</GCell>
    </GRow>

    <GRow>
      <GCell>`--status-file`</GCell>

      <GCell />

      <GCell>The path to the file where the final status of the deployment will be written.</GCell>
    </GRow>

    <GRow>
      <GCell>`--readiness-wait-time`</GCell>
      <GCell>`15`</GCell>
      <GCell>The time (in seconds) to monitor the deployment for readiness after the readiness condition is met.</GCell>
    </GRow>

    <GRow>
      <GCell>`--deployment-timeout`</GCell>
      <GCell>`600`</GCell>
      <GCell>The maximum time (in seconds) to wait for the deployment to reach readiness before timing out.</GCell>
    </GRow>

    <GRow>
      <GCell>`--no-loader`</GCell>
      <GCell>`false`</GCell>
      <GCell>Do not use the loading spinner for the deployment.</GCell>
    </GRow>

    <GRow>
      <GCell>`--name`</GCell>

      <GCell />

      <GCell>The name of the app to deploy.</GCell>
    </GRow>

    <GRow>
      <GCell>`--port`</GCell>

      <GCell />

      <GCell>Port where the app is hosted.</GCell>
    </GRow>

    <GRow>
      <GCell>`--description`</GCell>

      <GCell />

      <GCell>The description of the app to deploy.</GCell>
    </GRow>

    <GRow>
      <GCell>`--app-type`</GCell>

      <GCell />

      <GCell>The user-defined type of app to deploy. It's only used for bookkeeping purposes.</GCell>
    </GRow>

    <GRow>
      <GCell>`--image`</GCell>

      <GCell />

      <GCell>The Docker image to deploy with the app.</GCell>
    </GRow>

    <GRow>
      <GCell>`--tag`</GCell>

      <GCell />

      <GCell>The tags of the app to deploy. Repeatable.</GCell>
    </GRow>

    <GRow>
      <GCell>`--secret`</GCell>

      <GCell />

      <GCell>Anaconda integrations to attach to the app. You can use the value you set in the `@secrets` decorator in your code without the outerbounds prefix. Repeatable.</GCell>
    </GRow>

    <GRow>
      <GCell>`--compute-pools`</GCell>

      <GCell />

      <GCell>A list of compute pools to deploy the app to. Repeatable.</GCell>
    </GRow>

    <GRow>
      <GCell>`--env`</GCell>

      <GCell />

      <GCell>Environment variables to deploy with the app. Repeatable.</GCell>
    </GRow>

    <GRow>
      <GCell>`--cpu`</GCell>

      <GCell />

      <GCell>CPU requests.</GCell>
    </GRow>

    <GRow>
      <GCell>`--memory`</GCell>

      <GCell />

      <GCell>Memory requests.</GCell>
    </GRow>

    <GRow>
      <GCell>`--gpu`</GCell>

      <GCell />

      <GCell>GPU requests.</GCell>
    </GRow>

    <GRow>
      <GCell>`--disk`</GCell>

      <GCell />

      <GCell>Storage disk size.</GCell>
    </GRow>

    <GRow>
      <GCell>`--shared-memory`</GCell>

      <GCell />

      <GCell>Shared memory.</GCell>
    </GRow>

    <GRow>
      <GCell>`--auth-type`</GCell>

      <GCell />

      <GCell>The type of authentication to use for the app. Choices: `Browser`, `API`, `BrowserAndApi`.</GCell>
    </GRow>

    <GRow>
      <GCell>`--public-access` | `--private-access`</GCell>
      <GCell>`--public-access`</GCell>
      <GCell>Whether the app is publicly accessible. Defaults to public access.</GCell>
    </GRow>

    <GRow>
      <GCell>`--fixed-replicas`</GCell>

      <GCell />

      <GCell>The fixed number of replicas to deploy the app with. Cannot be used with `--min-replicas` or `--max-replicas`.</GCell>
    </GRow>

    <GRow>
      <GCell>`--min-replicas`</GCell>

      <GCell />

      <GCell>The minimum number of replicas to deploy the app with.</GCell>
    </GRow>

    <GRow>
      <GCell>`--max-replicas`</GCell>

      <GCell />

      <GCell>The maximum number of replicas to deploy the app with.</GCell>
    </GRow>

    <GRow>
      <GCell>`--scaling-rpm`</GCell>

      <GCell />

      <GCell>Scale up replicas when requests per minute exceed this threshold. If not set and `--min-replicas` and `--max-replicas` are set, the default threshold is 60 requests per minute.</GCell>
    </GRow>

    <GRow>
      <GCell>`--dep-from-requirements`</GCell>

      <GCell />

      <GCell>The path to the `requirements.txt` file to attach to the app.</GCell>
    </GRow>

    <GRow>
      <GCell>`--dep-from-pyproject`</GCell>

      <GCell />

      <GCell>The path to the `pyproject.toml` file to attach to the app.</GCell>
    </GRow>

    <GRow>
      <GCell>`--python`</GCell>

      <GCell />

      <GCell>The Python version to use for the app.</GCell>
    </GRow>

    <GRow>
      <GCell>`--package-src-path`</GCell>

      <GCell />

      <GCell>The path to the source code to deploy with the App. Repeatable.</GCell>
    </GRow>

    <GRow>
      <GCell>`--package-suffixes`</GCell>

      <GCell />

      <GCell>A list of suffixes to add to the source code to deploy with the app. Repeatable.</GCell>
    </GRow>

    <GRow>
      <GCell>`--no-deps`</GCell>
      <GCell>`false`</GCell>
      <GCell>Do not install any dependencies. Use the provided image as-is.</GCell>
    </GRow>

    <GRow>
      <GCell>`--force-upgrade`</GCell>
      <GCell>`false`</GCell>
      <GCell>Force upgrade the app even if it is currently being upgraded.</GCell>
    </GRow>

    <GRow>
      <GCell>`--skip-code-package`</GCell>
      <GCell>`false`</GCell>
      <GCell>Skip packaging your code and rely on the container image's embedded source code. Requires `--no-deps`.</GCell>
    </GRow>

    <GRow>
      <GCell>`--project`</GCell>

      <GCell />

      <GCell>The project the deployment belongs to.</GCell>
    </GRow>

    <GRow>
      <GCell>`--branch`</GCell>

      <GCell />

      <GCell>The branch of the project the deployment belongs to.</GCell>
    </GRow>

    <GRow>
      <GCell>`--generate-static-url`</GCell>
      <GCell>`false`</GCell>
      <GCell>Generate a stable URL for the deployment from its perimeter, project, branch, and name.</GCell>
    </GRow>

    <GRow>
      <GCell>`--url-slug`</GCell>

      <GCell />

      <GCell>Name the deployment's URL yourself instead of having one generated, such as `api-my-model.<YOUR_PLATFORM_DOMAIN>`. Cannot be combined with `--generate-static-url`.</GCell>
    </GRow>

    <GRow>
      <GCell>`--proxy-namespace`</GCell>

      <GCell />

      <GCell>The namespace where the pods being proxied live. Required unless `--proxy-service-url` is set.</GCell>
    </GRow>

    <GRow>
      <GCell>`--proxy-selector-label`</GCell>

      <GCell />

      <GCell>The labels of the pods being proxied. They become the selector of the service that fronts those pods. Repeatable. Required unless `--proxy-service-url` is set.</GCell>
    </GRow>

    <GRow>
      <GCell>`--proxy-service-url`</GCell>

      <GCell />

      <GCell>The address of an existing service to proxy to, such as `my-svc.my-ns.svc.cluster.local:8080`.</GCell>
    </GRow>

    <GRow>
      <GCell>`--capsule-type`</GCell>
      <GCell>`Standard`</GCell>
      <GCell>What the platform runs for this deployment. `Standard` runs the image and commands configured here. `Proxy` fronts a workload that is already running in the cluster.</GCell>
    </GRow>

    <GRow>
      <GCell>`--persistence`</GCell>
      <GCell>`none`</GCell>
      <GCell>The persistence mode to deploy the app with. Choices: `none`, `postgres`. Experimental.</GCell>
    </GRow>
  </GBody>
</GTable>

## Examples

**Deploy with a config file**

```bash theme={null}
outerbounds app deploy --config-file config.yaml
```

**Deploy without a config file**

```bash theme={null}
outerbounds app deploy --name prediction-service --port 8000 --auth-type API "python app.py"
```

**Update during an active rollout**

```bash theme={null}
outerbounds app deploy --config-file config.yaml --force-upgrade
```
