FROM python:3.12-slim ENV PYTHONDONTWRITEBYTECODE=1 \ PYTHONUNBUFFERED=1 \ PIP_NO_CACHE_DIR=1 WORKDIR /app COPY pyproject.toml README.md ./ COPY ethicsguard ./ethicsguard COPY server ./server COPY inference.py openenv.yaml ./ RUN pip install --upgrade pip && pip install . EXPOSE 7860 HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 \ CMD python -c "import urllib.request; urllib.request.urlopen('http://127.0.0.1:7860/health')" || exit 1 CMD ["uvicorn", "server.app:app", "--host", "0.0.0.0", "--port", "7860"]