Skip to content

fix docker #45

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

Merged
merged 6 commits into from
Dec 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG UV_VERSION=0.5.4
ARG UV_VERSION=0.5.9
ARG DEBIAN_VERSION=bookworm


Expand All @@ -8,4 +8,13 @@ FROM ghcr.io/astral-sh/uv:$UV_VERSION AS uv
FROM mcr.microsoft.com/vscode/devcontainers/base:$DEBIAN_VERSION
LABEL maintainer="a5chin <a5chin.origin+contact@gmain.com>"

# hadolint ignore=DL3008
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
# For OpenCV etc...
libgl1 libglib2.0-0 \
# To remove the image size, it is recommended refresh the package cache as follows
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

COPY --from=uv --chown=vscode: /uv /uvx /bin/
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"context": "..",
"dockerfile": "Dockerfile",
"args": {
"UV_VERSION": "0.5.4",
"UV_VERSION": "0.5.9",
"DEBIAN_VERSION": "bookworm"
}
},
Expand Down
2 changes: 1 addition & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: 2

updates:
- package-ecosystem: pip
directory: "/"
directory: /
schedule:
interval: daily
commit-message:
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
default_stages: [commit]
default_stages: [pre-commit]

repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
Expand Down
19 changes: 14 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ARG DEBIAN_VERSION=bookworm
ARG UV_VERSION=0.5.4
ARG UV_VERSION=0.5.9
ARG VARIANT=3.12


Expand All @@ -9,13 +9,22 @@ FROM ghcr.io/astral-sh/uv:$UV_VERSION AS uv
FROM python:$VARIANT-slim-$DEBIAN_VERSION
LABEL maintainer="a5chin <a5chin.origin+contact@gmain.com>"

ENV PYTHONDONTWRITEBYTECODE=True
ENV PYTHONUNBUFFERED=True
ENV UV_LINK_MODE=copy

WORKDIR /app

COPY --from=uv /uv /uvx /bin/
COPY pyproject.toml uv.lock ./

ENV PYTHONDONTWRITEBYTECODE=True
ENV PYTHONUNBUFFERED=True
ENV UV_LINK_MODE=copy

# hadolint ignore=DL3008
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
# For OpenCV etc...
libgl1 libglib2.0-0 \
# To remove the image size, it is recommended refresh the package cache as follows
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

RUN uv sync --frozen --no-install-project
4 changes: 3 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ requires-python = ">=3.9"
readme = "README.md"
license = { file = "LICENSE" }

dependencies = []
dependencies = [
"pydantic>=2.10.3",
]

[tool.uv]
dev-dependencies = [
Expand Down
138 changes: 138 additions & 0 deletions uv.lock

Large diffs are not rendered by default.

Loading