-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
39 lines (29 loc) · 913 Bytes
/
Copy pathDockerfile
File metadata and controls
39 lines (29 loc) · 913 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
# syntax=docker/dockerfile:1
FROM python:3.13-slim
# Set environment variables
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1
# Set work directory
WORKDIR /app
# Install system dependencies
RUN apt update && \
apt install -y --no-install-recommends build-essential curl && \
rm -rf /var/lib/apt/lists/*
# Install UV
RUN curl -LsSf https://astral.sh/uv/install.sh | sh && \
ln -s /root/.cargo/bin/uv /usr/local/bin/uv
# Copy only dependency files first for better caching
COPY pyproject.toml ./
COPY uv.lock ./
COPY README.md ./
# Install dependencies (cached unless dependencies change)
RUN uv sync --frozen
# Now copy the source code
COPY ml_eval ./ml_eval
# Install the package (now that code is present)
RUN uv sync --frozen
# Expose a volume for configs and results
VOLUME ["/app/config", "/app/results"]
# Set default entrypoint to the CLI
ENTRYPOINT ["ml-eval"]
CMD ["--help"]