mgbam's picture
Upload Dockerfile with huggingface_hub
67928c2 verified
raw
history blame contribute delete
788 Bytes
FROM python:3.11-slim
ENV PIP_NO_INPUT=1 PYTHONDONTWRITEBYTECODE=1 PYTHONUNBUFFERED=1 PORT=7860
RUN apt-get update && apt-get install -y --no-install-recommends build-essential git && rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY requirements.txt /app/requirements.txt
RUN pip install --upgrade pip && pip install -r /app/requirements.txt
COPY app_advanced.py /app/app_advanced.py
COPY app.py /app/app.py
COPY .streamlit/config.toml /app/.streamlit/config.toml
COPY README.md /app/README.md
EXPOSE 7860
HEALTHCHECK --interval=30s --timeout=5s --start-period=30s CMD python -c "import socket; s=socket.socket(); s.settimeout(3); s.connect(('127.0.0.1', 7860)); s.close()" || exit 1
CMD ["streamlit", "run", "app_advanced.py", "--server.port=7860", "--server.address=0.0.0.0"]