-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
42 lines (33 loc) · 1.1 KB
/
Dockerfile
File metadata and controls
42 lines (33 loc) · 1.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
FROM python:3.12-slim-trixie
# Copy uv and uvx from the official image (per docs)
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1 \
UV_NO_PROGRESS=1 \
UV_NO_WRAP=1 \
CCACHE_MAXSIZE=500M
WORKDIR /app
# System deps for building native extensions (e.g., fasttext)
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
--mount=type=cache,target=/var/lib/apt/lists,sharing=locked \
apt-get update \
&& apt-get install -y --no-install-recommends \
build-essential \
cmake \
git \
g++-14 \
ccache \
python3-dev \
--fix-missing \
&& rm -rf /var/lib/apt/lists/*
# Copy project metadata first for better layer caching
COPY pyproject.toml uv.lock README.md ./
# Install dependencies into a project-local virtualenv (.venv)
RUN uv sync --frozen --no-dev
# Copy source code
COPY dialogue_kitogram ./dialogue_kitogram
COPY main.py ./
# Ensure log directories exist (host volume may override)
RUN mkdir -p /app/logs /app/runtime
# Default command: run via uv to use the synced virtualenv
CMD ["uv", "run", "main.py"]