Spaces:
Runtime error
Runtime error
| # # Build stage | |
| # FROM python:3.8.18 AS builder | |
| # WORKDIR /app | |
| # RUN apt-get update && apt-get install -y \ | |
| # ffmpeg \ | |
| # libsm6 \ | |
| # libxext6 \ | |
| # && rm -rf /var/lib/apt/lists/* | |
| # # Copy requirements and install Python dependencies | |
| # COPY requirements.txt . | |
| # RUN pip install --upgrade pip && \ | |
| # pip install --no-cache-dir -r requirements.txt --extra-index-url https://download.pytorch.org/whl/cpu | |
| # # Final stage | |
| # FROM python:3.8.18 | |
| # WORKDIR /app | |
| # RUN apt-get update && apt-get install -y \ | |
| # ffmpeg \ | |
| # libsm6 \ | |
| # libxext6 \ | |
| # && rm -rf /var/lib/apt/lists/* | |
| # # Copy files from the builder stage | |
| # COPY --from=builder /app /app | |
| # COPY . . | |
| # EXPOSE 8000 | |
| # CMD ["/usr/local/bin/uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8000"] | |
| FROM python:3.8.18 | |
| WORKDIR /app | |
| RUN apt-get update && apt-get install -y \ | |
| ffmpeg \ | |
| libsm6 \ | |
| libxext6 \ | |
| && rm -rf /var/lib/apt/lists/* | |
| COPY requirements.txt . | |
| RUN pip install --upgrade pip && \ | |
| pip install --no-cache-dir -r requirements.txt --extra-index-url https://download.pytorch.org/whl/cpu | |
| COPY . . | |
| EXPOSE 8000 | |
| # CMD ["/usr/local/bin/uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8000"] | |
| CMD ["python", "-m", "uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8000"] |