Clarify need to include pyproject.toml with --no-install-project (#6581)

## Summary

See: https://github.com/astral-sh/uv/issues/6573
This commit is contained in:
Charlie Marsh 2024-08-24 09:45:23 -04:00 committed by GitHub
parent 1eb97c91fd
commit 8ee53a9e38
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 29 additions and 1 deletions

View file

@ -228,8 +228,9 @@ a big time saver.
FROM python:3.12-slim
COPY --from=ghcr.io/astral-sh/uv:latest /uv /bin/uv
# Copy the lockfile into the image
# Copy the lockfile and `pyproject.toml` into the image
ADD uv.lock /app/uv.lock
ADD pyproject.toml /app/pyproject.toml
# Install dependencies
WORKDIR /app
@ -243,6 +244,9 @@ WORKDIR /app
RUN uv sync --frozen
```
Note that the `pyproject.toml` is required to identify the project root and name, but the project
_contents_ are not copied into the image until the final `uv sync` command.
!!! tip
If you're using a [workspace](../../concepts/workspaces.md), then use the