replace poetry with uv in docker - #30
Merged
Merged
Conversation
☂️ Python Coverage
Overall Coverage
New FilesNo new covered files... Modified FilesNo covered modified files...
|
Contributor
There was a problem hiding this comment.
Pull request overview
This pull request updates the container build to use uv (the project’s current dependency manager) instead of Poetry, and refreshes documentation to match the new Docker workflow.
Changes:
- Replaced the Poetry-based multi-stage Docker build with a single-stage
uv sync-based build. - Updated container run instructions in
README.mdto usedockerby default (with apodmannote). - Updated
AGENTS.mddeployment notes to reflect theuv-based Docker build.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| Dockerfile | Switches dependency installation and runtime execution to uv in a simplified single-stage image. |
| README.md | Updates container build/run instructions and removes the “WIP” label. |
| AGENTS.md | Updates deployment documentation to describe the new Docker build approach. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What?
Switches the
Dockerfilefrom Poetry to uv, aligning the container build with the project's current package manager (uv.lockis the source of truth;poetry.lockdoes not exist). Also updates related documentation (README.md,AGENTS.md,architecture.md) to reflect the new build process.Key changes:
uvbuild.dockerby default.uv" as completed.Why?
Dockerfilereferencedpoetry.lock, which does not exist in the repository. The project has already migrated touv(CI usesuv sync,uv.lockis present).architecture.md.uvin Docker gives us faster installs, better layer caching viauv sync, and a smaller, simpler image.How?
Dockerfile changes
python:3.12.1-bookworm/slim-bookwormtopython:3.12.12-slim-bookworm(matching.python-version).uvinstalls quickly.uv:RUN pip install --no-cache-dir uvpyproject.toml+uv.lock→uv sync --frozen --no-dev --no-install-projectuv sync --frozen --no-devuv run --no-syncto ensure the virtualenv is activated correctly without re-verifying the lockfile at runtime:Documentation updates
README.md: Container instructions are no longer "WIP".AGENTS.md: Deployment section now describes theuv-based single-stage build.architecture.md: Removed the Dockerfile switch from the "next suggested steps" list.Testing?
docker build -t pyfastapi-test .completes successfully.Screenshots (optional)
N/A — infrastructure change only.
Anything Else?
COPY --from=ghcr.io/astral-sh/uv:latest /uv /usr/local/bin/uvto pull theuvbinary directly, but the local Docker daemon returned an auth error fromghcr.io. Falling back topip install uvinside the image is equally reliable and avoids registry issues.build-essentialin the image. For the current dependency set (FastAPI, SQLAlchemy, Alembic, toolz), all packages provide wheels, so single-stage is safe.AI Summary (optional)
Migrated the project's Dockerfile from Poetry to uv, replacing a broken multi-stage build (which referenced a non-existent
poetry.lock) with a working single-stage build that installs dependencies fromuv.lock. Updated README and internal docs to remove outdated Poetry references and reflect the new container workflow.