| FROM python:3.11-slim |
|
|
| |
| RUN apt-get update && apt-get install -y \ |
| ffmpeg \ |
| git \ |
| git-lfs \ |
| gcc \ |
| g++ \ |
| make \ |
| build-essential \ |
| curl \ |
| libopenblas-dev \ |
| && rm -rf /var/lib/apt/lists/* |
|
|
| |
| RUN git lfs install --skip-repo |
|
|
| WORKDIR /app |
|
|
| |
| COPY . . |
|
|
| |
| RUN git lfs pull 2>/dev/null || echo "Git LFS files skipped (may be pre-downloaded)" |
|
|
| |
| |
| RUN pip install --no-cache-dir Cython 'numpy<2.0.0' 'scipy<1.14.0' |
| RUN pip install --no-cache-dir -r backend/requirements.txt |
|
|
| |
| |
| |
|
|
| |
| RUN mkdir -p /app/storage && chmod 777 /app/storage |
|
|
| |
| |
| EXPOSE 7860 |
|
|
| |
| ENV API_PORT=7860 |
| ENV API_HOST=0.0.0.0 |
|
|
| |
| HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \ |
| CMD curl -f http://localhost:7860/health || exit 1 |
|
|
| |
| CMD ["python", "-m", "uvicorn", "backend.main:app", "--host", "0.0.0.0", "--port", "7860"] |
|
|