CoolFace
Apppublic

dkAmulet/sql-query-optimizer

sourceHugging Facemitupdated 5mo agoView on Hugging Face
0likes
Dockerfile24 linesDownload Raw Back to root
1FROM python:3.11-slim-bookworm2 3WORKDIR /app4 5# Install dependencies6COPY requirements.txt .7RUN pip install --no-cache-dir -r requirements.txt8 9# Copy application source10COPY models.py tasks.py db.py env.py app.py inference.py openenv.yaml ./11COPY server/ ./server/12COPY static/ ./static/13 14# Create non-root user15RUN useradd -m -u 1000 appuser && chown -R appuser /app16USER appuser17 18EXPOSE 786019 20HEALTHCHECK --interval=30s --timeout=10s --start-period=20s --retries=3 \21  CMD python -c "import urllib.request; urllib.request.urlopen('http://localhost:7860/health')"22 23CMD ["python", "-m", "uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860", "--log-level", "info"]24