|
|
|
|
|
|
|
|
|
|
|
|
| FROM python:3.10-slim
|
|
|
|
|
| RUN apt-get update && apt-get install -y \
|
| nginx \
|
| supervisor \
|
| curl \
|
| && rm -rf /var/lib/apt/lists/*
|
|
|
| WORKDIR /app
|
|
|
|
|
| COPY requirements-hf.txt .
|
| RUN pip install --no-cache-dir -r requirements-hf.txt
|
|
|
|
|
| COPY streamlit.py .
|
| COPY mcp_flask_server.py .
|
| COPY web ./web
|
|
|
|
|
|
|
| COPY nginx.conf /etc/nginx/sites-available/default
|
| RUN rm -f /etc/nginx/sites-enabled/default && \
|
| ln -s /etc/nginx/sites-available/default /etc/nginx/sites-enabled/
|
|
|
|
|
| COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
|
|
|
|
|
| RUN mkdir -p /var/log/supervisor
|
|
|
|
|
| EXPOSE 7860
|
|
|
|
|
| HEALTHCHECK --interval=30s --timeout=10s --start-period=60s --retries=3 \
|
| CMD curl --fail http://localhost:7860/ || exit 1
|
|
|
|
|
| CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/conf.d/supervisord.conf"]
|
|
|