gdpr-auditor / Dockerfile
Charan Sai Mamidala
Refactor for multi-mode deployment: move main.py to server/app.py
b580df0
raw
history blame contribute delete
875 Bytes
# GDPR Auditor Environment Dockerfile
ARG BASE_IMAGE=ghcr.io/meta-pytorch/openenv-base:latest
FROM ${BASE_IMAGE} AS builder
WORKDIR /app
COPY . /app
WORKDIR /app
RUN apt-get update && apt-get install -y --no-install-recommends \
git \
&& rm -rf /var/lib/apt/lists/*
RUN --mount=type=cache,target=/root/.cache/uv \
uv sync --no-install-project --no-editable
RUN --mount=type=cache,target=/root/.cache/uv \
uv sync --no-editable
FROM ${BASE_IMAGE}
WORKDIR /app
COPY --from=builder /app/.venv /app/.venv
COPY --from=builder /app /app
ENV PATH="/app/.venv/bin:$PATH"
ENV PYTHONPATH="/app:/app/env:$PYTHONPATH"
ENV PORT=7860
HEALTHCHECK --interval=30s --timeout=3s --start-period=10s --retries=3 \
CMD python -c "import urllib.request; urllib.request.urlopen('http://localhost:7860/health')" || exit 1
EXPOSE 7860
CMD ["python", "server/app.py"]