-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathDockerfile.eval
More file actions
46 lines (37 loc) · 1.85 KB
/
Copy pathDockerfile.eval
File metadata and controls
46 lines (37 loc) · 1.85 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
43
44
45
46
# Leoma EVAL SERVER image (CUDA).
#
# This is the GPU box: it downloads king + challenger weights from Hippius Hub,
# loads the pinned diffusers I2V pipeline, generates video on the held-out clips
# and scores each generation against the real continuation.
#
# It needs the [eval] extra (torch / diffusers / lpips / opencv / open_clip).
# The validator image (Dockerfile) deliberately does NOT.
FROM nvidia/cuda:12.4.1-cudnn-runtime-ubuntu22.04
ENV DEBIAN_FRONTEND=noninteractive \
PYTHONUNBUFFERED=1 \
PIP_NO_CACHE_DIR=1
# python3.12 + ffmpeg (ground-truth decode) + curl (healthcheck).
RUN apt-get update && apt-get install -y --no-install-recommends \
software-properties-common \
&& add-apt-repository -y ppa:deadsnakes/ppa \
&& apt-get update && apt-get install -y --no-install-recommends \
python3.12 python3.12-venv python3.12-dev \
ffmpeg curl build-essential \
&& rm -rf /var/lib/apt/lists/*
RUN python3.12 -m venv /opt/venv
ENV PATH="/opt/venv/bin:${PATH}"
WORKDIR /app
RUN pip install --no-cache-dir uv
COPY pyproject.toml uv.lock README.md ./
COPY leoma ./leoma
# The [eval] extra is the whole point of this image. Frozen sync makes rebuilds use
# the exact tested CUDA/Diffusers/Transformers graph from uv.lock; an open-ended GPU
# stack can change generated frames even when Leoma's own source is unchanged.
RUN uv sync --active --frozen --extra eval --no-dev --no-editable --no-cache
# Fail at BUILD time if the eval stack can't import (torch/diffusers/chain.toml).
RUN python -c "import leoma.eval_server, leoma.eval.metrics, leoma.infra.chain_config as c; print('eval image OK, pipeline =', c.ARCH_PIPELINE)"
EXPOSE 9000
HEALTHCHECK --interval=30s --timeout=5s --start-period=60s --retries=3 \
CMD curl -fsS -H "Authorization: Bearer ${LEOMA_EVAL_TOKEN}" \
http://127.0.0.1:9000/health || exit 1
CMD ["leoma", "servers", "eval-server"]