@@ -23,26 +23,32 @@ RUN uv sync --frozen --no-dev
2323# Copy the application code
2424COPY void_hdt/ ./void_hdt/
2525
26+ # Install the project itself into the venv
27+ RUN uv sync --frozen --no-dev
28+
2629# Runtime stage: slim image with only runtime dependencies
2730FROM python:3.12-slim
2831
2932# Set working directory
3033WORKDIR /app
3134
32- # Install uv in runtime image
33- COPY --from=ghcr.io/astral-sh/uv:latest /uv /usr/local/bin/uv
35+ # Install runtime C++ libraries (needed to run the compiled rdflib-hdt)
36+ RUN apt-get update && apt-get install -y --no-install-recommends \
37+ libstdc++6 \
38+ && rm -rf /var/lib/apt/lists/*
3439
35- # Copy the virtual environment from builder
40+ # Copy the virtual environment
3641COPY --from=builder /app/.venv /app/.venv
37-
38- # Copy the application code
3942COPY --from=builder /app/void_hdt /app/void_hdt
4043
41- # Copy project files needed by uv
42- COPY pyproject.toml uv.lock ./
44+ # Place the venv binaries on the PATH
45+ ENV PATH="/app/.venv/bin:$PATH"
46+
47+ # Ensure Python can find the module in /app
48+ ENV PYTHONPATH="/app"
4349
4450# Set the entrypoint to use uv run (handles environment automatically)
45- ENTRYPOINT ["uv" , "run" , " void-hdt" ]
51+ ENTRYPOINT ["void-hdt" ]
4652
4753# Default help command if no args provided
4854CMD ["--help" ]
0 commit comments