Spaces:
Runtime error
Runtime error
| # Use an official PyTorch image with CUDA support | |
| FROM pytorch/pytorch:2.1.0-cuda12.1-cudnn8-runtime | |
| # Set working directory | |
| WORKDIR /app | |
| # Install system dependencies required for OpenCV and FFmpeg | |
| RUN apt-get update && apt-get install -y \ | |
| git \ | |
| ffmpeg \ | |
| libgl1-mesa-glx \ | |
| libglib2.0-0 \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Copy requirements file | |
| COPY requirements.txt . | |
| # Install Python dependencies | |
| # Note: PySide6 and pyqtdarktheme are excluded/ignored if they fail, | |
| # as they are for desktop GUI and not needed for this web demo. | |
| RUN pip install --no-cache-dir -r requirements.txt || true | |
| # Copy the rest of the application code | |
| COPY . . | |
| # Expose the port defined in app.py (default 8000) | |
| EXPOSE 8000 | |
| # Set environment variables | |
| ENV GRADIO_SERVER_NAME="0.0.0.0" | |
| # Command to run the application | |
| # We use the --port argument to match the EXPOSE instruction | |
| CMD ["python", "hugging_face/app.py", "--port", "8000"] | |