Conversation
… selectzyme library (pip install --no-dependencies git+https://github.com/ipb-halle/SelectZyme.git)
Contributor
Reviewer's GuideMigrates the Docker image to use uv-based dependency management with pyproject/uv.lock, updates runtime commands accordingly, and enhances documentation with branding and citation details. Sequence diagram for container startup with uv run gunicornsequenceDiagram
actor Operator
participant DockerEngine
participant Container
participant UV
participant Gunicorn
participant App
Operator->>DockerEngine: docker run selectzyme-app
DockerEngine->>Container: Start container with ENTRYPOINT
Container->>Container: ulimit -s 11040
Container->>UV: uv run gunicorn app:server --bind 0.0.0.0:8050 --workers 1
UV->>Gunicorn: Execute gunicorn inside uv-managed environment
Gunicorn->>App: Import app and get server
App-->>Gunicorn: Return WSGI server instance
Gunicorn-->>Operator: Listen on port 8050 for HTTP requests
Flow diagram for Docker build using uv dependency managementflowchart TD
A[Start Docker build] --> B[apt-get update and install git]
B --> C[COPY pyproject.toml and requirements.txt into /app]
C --> D[pip install --upgrade pip]
D --> E[pip install uv]
E --> F[uv sync<br/>create environment from pyproject.toml and uv.lock]
F --> G[uv pip install --no-cache-dir --no-deps SelectZyme from GitHub]
G --> H[uv run python -c snapshot_download from huggingface_hub]
H --> I[COPY full source tree into /app]
I --> J[uv pip install .<br/>install app into uv environment]
J --> K[Set ENTRYPOINT: uv run gunicorn app:server]
K --> L[Expose port 8050]
L --> M[End Docker build]
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Contributor
There was a problem hiding this comment.
Hey - I've found 1 issue, and left some high level feedback:
- Consider copying
uv.lockinto the image and runninguv syncagainst it so your Docker build uses the fully locked dependency set rather than only thepyproject.toml. - Since you no longer use
requirements.txtin the Docker build (you calluv syncinstead), you can drop it from theCOPY pyproject.toml requirements.txt /app/line to avoid copying unused files into the image. - After installing dependencies with
uv pip install, callinguv run gunicorn ...in theENTRYPOINTis likely redundant; invokinggunicorndirectly would simplify the runtime path and avoid extrauvoverhead.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Consider copying `uv.lock` into the image and running `uv sync` against it so your Docker build uses the fully locked dependency set rather than only the `pyproject.toml`.
- Since you no longer use `requirements.txt` in the Docker build (you call `uv sync` instead), you can drop it from the `COPY pyproject.toml requirements.txt /app/` line to avoid copying unused files into the image.
- After installing dependencies with `uv pip install`, calling `uv run gunicorn ...` in the `ENTRYPOINT` is likely redundant; invoking `gunicorn` directly would simplify the runtime path and avoid extra `uv` overhead.
## Individual Comments
### Comment 1
<location path="Dockerfile" line_range="14-16" />
<code_context>
- pip install -r requirements.txt && \
- pip install --no-dependencies git+https://github.com/ipb-halle/SelectZyme.git@f16adbc && \
- python -c "from huggingface_hub import snapshot_download; snapshot_download(repo_id='davari-group/selectzyme-app-data', repo_type='dataset')"
+ pip install --upgrade pip && \
+ pip install uv && \
+ uv sync && \
+ uv pip install --no-cache-dir --no-deps git+https://github.com/ipb-halle/SelectZyme.git@f16adbc && \
+ uv run python -c "from huggingface_hub import snapshot_download; snapshot_download(repo_id='davari-group/selectzyme-app-data', repo_type='dataset')"
</code_context>
<issue_to_address>
**suggestion:** Consider tightening `uv sync` behavior and avoiding redundant tooling during the build.
Since `uv` fully manages the environment, upgrading `pip` beforehand is redundant and adds unnecessary build work. Once `uv.lock` is checked in and copied into the image, consider removing `pip install --upgrade pip` and using `uv sync --frozen` so the build strictly respects the lockfile and fails fast if dependencies drift.
Suggested implementation:
```
COPY pyproject.toml requirements.txt uv.lock /app/
```
```
RUN \
pip install uv && \
uv sync --frozen && \
uv pip install --no-cache-dir --no-deps git+https://github.com/ipb-halle/SelectZyme.git@f16adbc && \
uv run python -c "from huggingface_hub import snapshot_download; snapshot_download(repo_id='davari-group/selectzyme-app-data', repo_type='dataset')"
```
</issue_to_address>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
chore: .png version of logo to avoid browser rendering and missing fonts issues
chore: .png version of logo to avoid browser rendering and missing fonts issues critical: no removal of selectzyme no-deps easily possible. also selectzyme[app] profile without any dependencies very difficult
…ing during the build. Since uv fully manages the environment, upgrading pip beforehand is redundant and adds unnecessary build work. Once uv.lock is checked in and copied into the image, consider removing pip install --upgrade pip and using uv sync --frozen so the build strictly respects the lockfile and fails fast if dependencies drift.
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 by Sourcery
Adopt uv-based dependency and application management in the Docker image and refresh project metadata accordingly.
New Features:
Enhancements:
Documentation: