Spaces:
Runtime error
Runtime error
File size: 944 Bytes
dbc6a2b | 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 28 29 30 31 32 33 34 35 | # 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"]
|