-
Notifications
You must be signed in to change notification settings - Fork 20
Remove redundant dependencies, update versions and modernize Dockerfile #149
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,9 +1,13 @@ | ||
| FROM python:3.12-slim-bookworm | ||
| FROM python:3.13-slim-bookworm | ||
|
|
||
| COPY app /app | ||
| COPY README.md /README.md | ||
| COPY requirements.txt /requirements.txt | ||
| COPY --from=ghcr.io/astral-sh/uv:latest /uv /usr/local/bin/uv | ||
|
|
||
| RUN pip install -r requirements.txt | ||
| WORKDIR /app | ||
|
|
||
| CMD ["python", "-m", "app.app"] | ||
| COPY pyproject.toml uv.lock ./ | ||
| RUN uv sync --frozen --no-dev --no-install-project | ||
|
|
||
| COPY app ./app | ||
| COPY README.md ./ | ||
|
|
||
| CMD ["uv", "run", "python", "-m", "app.app"] | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
this issue can be solved using the multi stage docker implementation |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,18 +1,20 @@ | ||
| # This file was autogenerated by uv via the following command: | ||
| # uv pip compile pyproject.toml | ||
| annotated-doc==0.0.4 | ||
| # via fastapi | ||
| annotated-types==0.7.0 | ||
| # via pydantic | ||
| anyio==4.9.0 | ||
| anyio==4.13.0 | ||
| # via | ||
| # httpx | ||
| # starlette | ||
| certifi==2025.7.14 | ||
| certifi==2026.5.20 | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. package uses uv.lock to install in new docker using please run these packages will be upgraded to new versions: anyio |
||
| # via | ||
| # httpcore | ||
| # httpx | ||
| click==8.2.1 | ||
| click==8.4.0 | ||
| # via uvicorn | ||
| fastapi==0.116.1 | ||
| fastapi==0.136.1 | ||
| # via pesu-auth (pyproject.toml) | ||
| h11==0.16.0 | ||
| # via | ||
|
|
@@ -22,33 +24,29 @@ httpcore==1.0.9 | |
| # via httpx | ||
| httpx==0.28.1 | ||
| # via pesu-auth (pyproject.toml) | ||
| idna==3.10 | ||
| idna==3.16 | ||
| # via | ||
| # anyio | ||
| # httpx | ||
| pydantic==2.11.7 | ||
| pydantic==2.13.4 | ||
| # via | ||
| # pesu-auth (pyproject.toml) | ||
| # fastapi | ||
| pydantic-core==2.33.2 | ||
| pydantic-core==2.46.4 | ||
| # via pydantic | ||
| pytz==2025.2 | ||
| # via pesu-auth (pyproject.toml) | ||
| selectolax==0.3.32 | ||
| selectolax==0.4.9 | ||
| # via pesu-auth (pyproject.toml) | ||
| sniffio==1.3.1 | ||
| # via anyio | ||
| starlette==0.47.2 | ||
| starlette==1.0.1 | ||
| # via fastapi | ||
| typing-extensions==4.14.1 | ||
| typing-extensions==4.15.0 | ||
| # via | ||
| # anyio | ||
| # fastapi | ||
| # pydantic | ||
| # pydantic-core | ||
| # starlette | ||
| # typing-inspection | ||
| typing-inspection==0.4.1 | ||
| # via pydantic | ||
| uvicorn==0.35.0 | ||
| typing-inspection==0.4.2 | ||
| # via | ||
| # fastapi | ||
| # pydantic | ||
| uvicorn==0.47.0 | ||
| # via pesu-auth (pyproject.toml) | ||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can try using multi-stage docker builds, please check this https://ashishb.net/programming/using-python-uv-inside-docker/