build(docker): migrate from pip to uv for dependency management#34
Merged
mirrorange merged 2 commits intomirrorange:mainfrom Dec 15, 2025
Merged
Conversation
- Replace pip with uv in Dockerfile using official uv image - Remove requirements.txt (no longer needed with uv.lock) - Update .dockerignore to include pyproject.toml and uv.lock - Add README.md copy step (required by pyproject.toml) This eliminates the need to manually sync two dependency systems (pyproject.toml + requirements.txt), reducing maintenance burden and potential version inconsistencies. Base image: ghcr.io/astral-sh/uv:python3.11-bookworm-slim
pyproject.toml has force-include config for app/static, which requires the directory to exist when hatchling builds the project during uv sync
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.
Summary
将 Docker 构建从 pip + requirements.txt 迁移到 uv,统一依赖管理。
动机
项目存在两套依赖管理系统需要手动同步:
pyproject.toml+uv.lock用于本地开发requirements.txt用于 Docker 构建历史上曾因遗漏同步导致问题(如 rnet 版本不一致导致 Docker 容器启动失败)。
变更内容
ghcr.io/astral-sh/uv:python3.11-bookworm-slim官方镜像pyproject.toml+uv.lockpyproject.toml和uv.lock技术细节