docs: restructure runtime configuration and deprecate legacy formats#262
docs: restructure runtime configuration and deprecate legacy formats#262elijah-rou wants to merge 16 commits intomasterfrom
Conversation
…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
63534aa to
ee9d1cc
Compare
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
4c1a575 to
5287e16
Compare
- 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
…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"
- 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 |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
No WORKDIR in the dockerfile above? worth putting it in
| readycheck_endpoint = "/ready" | ||
|
|
||
| [cerebrium.dependencies.pip] | ||
| [dependencies.pip] |
There was a problem hiding this comment.
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: |
There was a problem hiding this comment.
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` | |||
There was a problem hiding this comment.
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> |
| above. | ||
| </Warning> | ||
|
|
||
| #### Pip Dependencies |
There was a problem hiding this comment.
do we need these three sections, you defined it above
| ## Complete Example | ||
| ## Complete Examples | ||
|
|
||
| ### Auto-Py Runtime (Default) |
|
|
||
| [cerebrium.dependencies.pip] | ||
| [runtime.python] | ||
| python_version = "3.11" |
There was a problem hiding this comment.
missing all the shell commands, prebuild commands, use_uv etc here
| name = "llm-inference" | ||
| python_version = "3.12" | ||
| disable_auth = false | ||
| include = ["*"] |
There was a problem hiding this comment.
We don't talk about include exclude in our container images which we should
Summary
cerebrium.*prefix on all TOML sections (e.g.,[cerebrium.deployment]→[deployment])[runtime.{type}.dependencies.*][dependencies.paths]with_file_relative_pathkey inside dependency sectionsDetails
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.cortex][runtime.python][runtime.docker]Dependencies
Dependencies are now specified under the runtime section:
The
[dependencies.paths]section is replaced by_file_relative_pathinside each dependency section.Test plan