-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
43 lines (34 loc) · 1.66 KB
/
Copy pathDockerfile
File metadata and controls
43 lines (34 loc) · 1.66 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
FROM python:3.13-slim
WORKDIR /app
RUN apt-get update && apt-get install -y \
tesseract-ocr \
libtesseract-dev \
curl \
git \
&& rm -rf /var/lib/apt/lists/*
RUN pip install uv
# Install ergon_core package
COPY ergon_core/pyproject.toml ergon_core/
COPY ergon_core/ergon_core/ ergon_core/ergon_core/
RUN cd ergon_core && uv pip install --system -e ".[dev]"
# Install ergon_builtins package WITH [data] extra. ``registry_core.py``
# imports ``SweBenchVerifiedBenchmark`` / ``MiniF2FBenchmark`` /
# ``StagedRubric`` at module-level (per the registry-lazy-import
# refactor); those modules transitively require ``datasets``,
# ``huggingface_hub``, and ``pandas`` respectively. Without ``[data]``
# the api container fails to import on startup.
COPY ergon_builtins/pyproject.toml ergon_builtins/
COPY ergon_builtins/ergon_builtins/ ergon_builtins/ergon_builtins/
RUN cd ergon_builtins && uv pip install --system -e ".[data]"
# Install ergon_ingestion before ergon_cli. The CLI imports the ingest command
# at startup, and export subcommands need the package's data dependencies.
COPY ergon_ingestion/pyproject.toml ergon_ingestion/
COPY ergon_ingestion/ergon_ingestion/ ergon_ingestion/ergon_ingestion/
RUN cd ergon_ingestion && uv pip install --system -e ".[data]"
# Install ergon_cli for API-container smoke parity. The package is a thin
# shell over ergon_core / ergon_builtins which are already installed above.
COPY ergon_cli/pyproject.toml ergon_cli/
COPY ergon_cli/ergon_cli/ ergon_cli/ergon_cli/
RUN cd ergon_cli && uv pip install --system -e "."
EXPOSE 9000
CMD ["uvicorn", "ergon_core.core.infrastructure.http.app:app", "--host", "0.0.0.0", "--port", "9000"]