Spaces:
Runtime error
Runtime error
File size: 649 Bytes
5f36d04 c7a3124 854099b 5f36d04 c7a3124 5f36d04 c7a3124 5f36d04 c7a3124 5f36d04 c7a3124 5f36d04 c7a3124 5f36d04 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# Base image with CUDA support (uses PyTorch image for convenience)
FROM pytorch/pytorch:2.0.1-cuda11.7-cudnn8-runtime
ENV DEBIAN_FRONTEND=noninteractive
ENV TZ=Etc/UTC
# Install system packages
RUN apt-get update && apt-get install -y \
git \
ffmpeg && \
rm -rf /var/lib/apt/lists/*
# Set working directory
WORKDIR /app
# Copy requirements and install Python dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy application code
COPY app.py .
# Expose port for FastAPI
EXPOSE 7860
# Start the FastAPI server using Uvicorn
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"] |