darshanajudiya7's picture
Fix Gradio 6 startup warning and quiet access logs
63eda9e
raw
history blame contribute delete
711 Bytes
FROM python:3.11-slim
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1 \
PYTHONUTF8=1 \
PYTHONIOENCODING=utf-8 \
PIP_NO_CACHE_DIR=1 \
PIP_DISABLE_PIP_VERSION_CHECK=1 \
ENABLE_GRADIO_DEMO=false
WORKDIR /app
COPY server/requirements.txt /tmp/requirements.txt
RUN python -m pip install --upgrade pip && \
pip install -r /tmp/requirements.txt
COPY . /app
RUN pip install --no-deps .
EXPOSE 8000
HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 \
CMD python -c "import urllib.request; urllib.request.urlopen('http://127.0.0.1:8000/health', timeout=3).read()"
CMD ["uvicorn", "server.app:app", "--host", "0.0.0.0", "--port", "8000", "--no-access-log"]