Skip to content

Commit cb0f2b5

Browse files
authored
Update toml-reference.mdx
1 parent 1f14447 commit cb0f2b5

File tree

1 file changed

+26
-1
lines changed

1 file changed

+26
-1
lines changed

toml-reference/toml-reference.mdx

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ UV typically installs packages 10-100x faster than pip, especially beneficial fo
4848
**Example with UV enabled:**
4949

5050
```toml
51-
[cerebrium.build]
51+
[cerebrium.deployment]
5252
use_uv = true
5353
```
5454

@@ -64,6 +64,31 @@ Check your build logs for these indicators:
6464
failures, such as legacy packages with non-standard metadata.
6565
</Warning>
6666

67+
### Deploying with UV Lock Files
68+
69+
<Info>
70+
read only if you're using `pyproject.toml` and `uv.lock`
71+
</Info>
72+
73+
Generate your lock file locally. This creates a uv.lock file with exact dependency versions.
74+
75+
```bash
76+
# In your project directory with pyproject.toml
77+
uv sync
78+
```
79+
80+
Export your locked dependencies to requirements.txt
81+
82+
```bash
83+
uv pip compile pyproject.toml -o requirements.txt
84+
# Or if you want to use the lock file:
85+
uv pip compile uv.lock -o requirements.txt
86+
```
87+
88+
Include in your deployment:
89+
- Ensure requirements.txt is in your project directory
90+
- Deploy with UV enabled
91+
6792
## Runtime Configuration
6893

6994
The `[cerebrium.runtime.custom]` section configures custom web servers and runtime behavior.

0 commit comments

Comments
 (0)