Spaces:
Runtime error
Runtime error
# Use the official Python 3.10 slim image as the base | |
FROM python:3.10-slim | |
# Install system dependencies | |
RUN apt-get update && apt-get install -y \ | |
git \ | |
git-lfs \ | |
ffmpeg \ | |
libsm6 \ | |
libxext6 \ | |
cmake \ | |
rsync \ | |
libgl1-mesa-glx \ | |
&& rm -rf /var/lib/apt/lists/* \ | |
&& git lfs install | |
# Set the working directory in the container | |
WORKDIR /app | |
# Copy your application code into the container at /app | |
COPY . /app | |
# Install gradio==4.36.1 | |
RUN pip install --no-cache-dir gradio==4.36.1 | |
# Install gradio_client==1.0.1 | |
RUN pip install --no-cache-dir gradio_client==1.0.1 | |
# Install transformers==4.41.2 | |
RUN pip install --no-cache-dir transformers==4.41.2 | |
# Install TTS==0.22.0 | |
RUN pip install --no-cache-dir TTS==0.22.0 | |
# Install numpy==1.22.0 required by TTS | |
RUN pip install --no-cache-dir numpy==1.22.0 | |
# Uninstall numpy==1.22.0 to resolve conflicts | |
RUN pip uninstall -y numpy | |
# Install numpy==1.23.5 required by other packages | |
RUN pip install --no-cache-dir numpy==1.23.5 | |
# Install PyTorch | |
RUN pip install --no-cache-dir torch | |
# Upgrade transformers to the latest version (if needed) | |
RUN pip install --no-cache-dir --upgrade transformers | |
# Uninstall pydantic if installed by other packages | |
RUN pip uninstall -y pydantic | |
# Install specific versions of fastapi and pydantic | |
RUN pip install --no-cache-dir fastapi==0.111.0 pydantic==2.7.4 | |
# Expose port 7860 for Gradio (if necessary) | |
EXPOSE 7860 | |
# Command to run your application | |
CMD ["python", "app.py"] | |