# Use an official Python runtime as a parent image FROM python:3.9-slim # Set the working directory inside the container WORKDIR /app # Install necessary system dependencies (git, ffmpeg, etc.) RUN apt-get update && apt-get install -y \ git \ ffmpeg \ && rm -rf /var/lib/apt/lists/* # Clone the Urdu TTS repository RUN git clone https://huggingface.co/zohann/urdu-tts # Change to the Urdu TTS directory WORKDIR /app/urdu-tts # Clone the Tortoise TTS Fast repository RUN git clone https://github.com/152334H/tortoise-tts-fast # Change to the tortoise-tts-fast directory WORKDIR /app/urdu-tts/tortoise-tts-fast # Install the Python dependencies from the cloned repository's requirements file RUN pip3 install -r requirements.txt --no-deps # Install the package in the current directory (editable mode) RUN pip3 install -e . # Install BigVGAN via GitHub RUN pip3 install git+https://github.com/152334H/BigVGAN.git # Install additional dependencies from the provided requirements.txt COPY requirements.txt /app/requirements.txt RUN pip3 install -r /app/requirements.txt # Copy your Gradio app (app.py) into the container COPY app.py /app/app.py # Set the working directory back to the main directory WORKDIR /app # Expose port 7860 for Gradio interface EXPOSE 7860 # Set the default command to run your Gradio app when the container starts CMD ["python", "app.py"]