-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathDockerfile.test
More file actions
27 lines (19 loc) · 1010 Bytes
/
Dockerfile.test
File metadata and controls
27 lines (19 loc) · 1010 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
FROM ghcr.io/astral-sh/uv:python3.11-bookworm-slim
WORKDIR /app
# 1. Copy only the metadata first for caching
COPY pyproject.toml uv.lock README.md ./
# 2. Pre-download dependencies (including build tools like hatchling)
RUN uv sync --frozen --no-install-project
# 3. Copy the actual source code
COPY . .
# 4. NOW install the project into the environment while we have internet.
# This builds the wheel and installs mcp-server-uyuni.
RUN uv sync --frozen
# 5. Use the --no-sync flag in the ENTRYPOINT.
# This tells uv "Don't check the network or the lockfile, just run what is there."
ENTRYPOINT ["uv", "run", "--no-sync", "pytest"]
# Or, if you want to be even safer and skip uv's logic at runtime:
# ENTRYPOINT ["/app/.venv/bin/pytest"]
CMD ["-s", "test/test_deepeval.py","--junit-xml=results.xml"]
# podman build -f Dockerfile.test -t test .
# podman run --rm --env-file .venv/config -v $(pwd)/test/test_config.json:/app/test/test_config.json -e GOOGLE_API_KEY=${GEMINI_API_KEY} --network=host test