-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
40 lines (30 loc) · 938 Bytes
/
Copy pathDockerfile
File metadata and controls
40 lines (30 loc) · 938 Bytes
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
# syntax=docker/dockerfile:1.7
FROM python:3.13-slim
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1 \
UV_LINK_MODE=copy \
UV_COMPILE_BYTECODE=1 \
UV_HTTP_TIMEOUT=300 \
UV_PROJECT_ENVIRONMENT=/opt/venv \
UV_CACHE_DIR=/tmp/uv-cache \
HOME=/tmp/home
WORKDIR /app
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
curl \
git \
libgl1 \
libglib2.0-0 \
libsm6 \
libxext6 \
libxrender1 \
&& rm -rf /var/lib/apt/lists/*
COPY --from=ghcr.io/astral-sh/uv:0.6.14 /uv /uvx /bin/
RUN mkdir -p /tmp/home /tmp/uv-cache /opt/venv && chmod -R 777 /tmp/home /tmp/uv-cache /opt/venv
COPY pyproject.toml uv.lock README.md ./
RUN --mount=type=cache,target=/tmp/uv-cache uv sync --frozen --no-install-project
COPY . .
RUN --mount=type=cache,target=/tmp/uv-cache uv sync --frozen
RUN chmod -R 777 /opt/venv
ENV PATH="/opt/venv/bin:$PATH"
CMD ["bash"]