Skip to content

docs: restructure runtime configuration and deprecate legacy formats#262

Open
elijah-rou wants to merge 16 commits intomasterfrom
fix/make-entrypoint-docs-explicit
Open

docs: restructure runtime configuration and deprecate legacy formats#262
elijah-rou wants to merge 16 commits intomasterfrom
fix/make-entrypoint-docs-explicit

Conversation

@elijah-rou
Copy link
Contributor

@elijah-rou elijah-rou commented Jan 21, 2026

Summary

  • Clarify that TOML entrypoint always takes precedence over Dockerfile CMD/ENTRYPOINT
  • Deprecate cerebrium.* prefix on all TOML sections (e.g., [cerebrium.deployment][deployment])
  • Move dependencies under runtime: [runtime.{type}.dependencies.*]
  • Replace [dependencies.paths] with _file_relative_path key inside dependency sections
  • Update all documentation examples across 40+ files to use the new format
  • Add backwards compatibility section to TOML reference documenting all deprecated patterns

Details

TOML prefix removal

All [cerebrium.*] section prefixes are deprecated. Sub-keys become top-level (e.g., [cerebrium.hardware][hardware]). Old format still works for backwards compatibility.

Runtime types

Runtime Description
[runtime.cortex] Default Cerebrium-managed Python runtime
[runtime.python] Custom Python ASGI/WSGI web servers
[runtime.docker] Custom Dockerfile deployments

Dependencies

Dependencies are now specified under the runtime section:

[runtime.cortex.dependencies.pip]
torch = "latest"
_file_relative_path = "requirements.txt"  # Optional: use a requirements file

The [dependencies.paths] section is replaced by _file_relative_path inside each dependency section.

Test plan

  • Verify all TOML examples in docs render correctly
  • Confirm deprecation notices display properly
  • Check that internal links remain valid

…rfile CMD

- Add "Entrypoint Precedence" section to custom-dockerfiles.mdx explaining
  that cerebrium.toml entrypoint overrides Dockerfile CMD when specified
- Update toml-reference.mdx to document dockerfile_path parameter and
  add entrypoint precedence info box
- Clarify that either Dockerfile CMD or TOML entrypoint is required
@elijah-rou elijah-rou force-pushed the fix/make-entrypoint-docs-explicit branch from 63534aa to ee9d1cc Compare January 21, 2026 15:58
elijah-rou and others added 2 commits January 22, 2026 15:36
Split runtime documentation into separate cortex, python, and docker sections.
Update all examples to use new [cerebrium.runtime.cortex], [cerebrium.runtime.python],
and [cerebrium.runtime.docker] configuration patterns. Add backwards compatibility
notes for deprecated [cerebrium.runtime.custom] section.
…fix removal

- Add deprecation notice for cerebrium.* prefix (new format removes prefix)
- Update Dependencies section to show runtime-specific dependencies as recommended
- Add deprecation warnings for top-level [cerebrium.dependencies.*] sections
- Update complete examples to use runtime-specific dependencies
- Add backwards compatibility section for dependency migration paths
…format

- Add deprecation notice for cerebrium.* prefix in TOML sections
- Update all documentation examples to use new format:
  - [cerebrium.deployment] → [deployment]
  - [cerebrium.runtime.*] → [runtime.*]
  - [cerebrium.hardware] → [hardware]
  - [cerebrium.scaling] → [scaling]
  - [cerebrium.dependencies.*] → [dependencies.*]
- Update text references to match new format
- The old format remains backwards compatible
- Rename runtime: cortex → auto-py, python stays as python
- Rename TOML sections: [dependencies.*] → [deps.*]
- Add deprecation notice for old runtime name cortex → auto-py
- Update all prose references (Cortex runtime → auto-py runtime)
- Old names remain backwards compatible
@elijah-rou elijah-rou force-pushed the fix/make-entrypoint-docs-explicit branch from 4c1a575 to 5287e16 Compare January 27, 2026 20:49
@elijah-rou elijah-rou changed the title docs: clarify that TOML entrypoint always takes precedence over Docke… docs: restructure runtime configuration and deprecate legacy formats Jan 27, 2026
elijah-rou and others added 2 commits January 28, 2026 09:11
- Rename deps to dependencies in all examples
- Replace [dependencies.paths] section with _file_relative_path key
- Document file + inline dependency merging behavior
- Update backwards compatibility section
elijah-rou and others added 2 commits January 28, 2026 09:15
…ement files

- Revert deps → dependencies (dependencies is the correct name)
- Replace [dependencies.paths] with _file_relative_path key inside dependency sections
- Example: [dependencies.pip] with _file_relative_path = "requirements.txt"
elijah-rou and others added 2 commits January 28, 2026 13:18
- Revert all auto-py → cortex
- Remove unnecessary deprecation notice for runtime name change
- Keep cortex as the default runtime name

1. You must expose a port using the `EXPOSE` command - this port will be referenced later in your `cerebrium.toml` configuration
2. A `CMD` command is required to specify what runs when the container starts (typically your server process)
2. Either a `CMD` or `ENTRYPOINT` directive must be defined in your Dockerfile OR the `entrypoint` key in your `cerebrium.toml` under `[runtime.docker]`. This specifies what runs when the container starts. The TOML configuration will take precedence
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The toml configuration, 'entrypoint', will take precedence

1. You must expose a port using the `EXPOSE` command - this port will be referenced later in your `cerebrium.toml` configuration
2. A `CMD` command is required to specify what runs when the container starts (typically your server process)
2. Either a `CMD` or `ENTRYPOINT` directive must be defined in your Dockerfile OR the `entrypoint` key in your `cerebrium.toml` under `[runtime.docker]`. This specifies what runs when the container starts. The TOML configuration will take precedence
3. Set the working directory using `WORKDIR` to ensure your application runs from the correct location (defaults to root directory if not specified)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No WORKDIR in the dockerfile above? worth putting it in

readycheck_endpoint = "/ready"

[cerebrium.dependencies.pip]
[dependencies.pip]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not worth mentioning paths here to point to requirements.txt or apt dependancies. or a link to other parts of the doc to see

- `healthcheck_endpoint`: The endpoint used to confirm instance health. If unspecified, defaults to a TCP ping on the configured port. If the health check registers a non-200 response, it will be considered _unhealthy_, and be restarted should it not recover timely.
- `readycheck_endpoint`: The endpoint used to confirm if the instance is ready to receive. If unspecified, defaults to a TCP ping on the configured port. If the ready check registers a non-200 response, it will not be a viable target for request routing.

You can also configure build settings in the Python runtime section:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you mention built settings but where can i see an exhaustive list?

@@ -21,17 +21,17 @@ Check out the [Introductory Guide](/cerebrium/getting-started/introduction) for
<Info>
It is possible to initialize an existing project by adding a `cerebrium.toml`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we can word this better also make it more obvious instead of an info block but this is not the right please to put it. Maybe we put in the Getting started -> introduciton page about having an existing project

The `[cerebrium.dependencies.pip]` section lists Python package requirements.
### Top-Level Dependencies (Deprecated)

<Warning>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this we can remove

above.
</Warning>

#### Pip Dependencies
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need these three sections, you defined it above

## Complete Example
## Complete Examples

### Auto-Py Runtime (Default)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cortex


[cerebrium.dependencies.pip]
[runtime.python]
python_version = "3.11"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing all the shell commands, prebuild commands, use_uv etc here

name = "llm-inference"
python_version = "3.12"
disable_auth = false
include = ["*"]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't talk about include exclude in our container images which we should

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants