# Use an official Python runtime as the base image FROM python:3.10-slim # Install system dependencies RUN apt-get update && apt-get install -y \ ffmpeg \ git \ libsm6 \ libxext6 \ libsndfile1 \ libopenblas-dev \ && rm -rf /var/lib/apt/lists/* # Set the working directory WORKDIR /app # Copy the requirements file into the container COPY requirements.txt . # Install Python dependencies RUN pip install --no-cache-dir -r requirements.txt # Create a directory for numba cache RUN mkdir -p /root/.cache/numba RUN chmod -R 777 /root/.cache/numba # Copy the application code into the container COPY app.py . # Expose the port Gradio will run on EXPOSE 7860 # Run the application CMD ["python", "app.py"]