# Use an official Python runtime as a base image FROM python:3.10 # Set the working directory in the container WORKDIR /app # Install system dependencies RUN apt-get update && \ apt-get install -y ffmpeg && \ rm -rf /var/lib/apt/lists/* # Copy the requirements file and install Python dependencies COPY requirements.txt /app/ RUN pip install --no-cache-dir -r requirements.txt # Clone the necessary external repositories RUN git clone https://github.com/reazon-research/ReazonSpeech /app/ReazonSpeech # Install local packages from the cloned repository RUN pip install --no-warn-conflicts /app/ReazonSpeech/pkg/nemo-asr RUN pip install /app/ReazonSpeech/pkg/nemo-asr # Copy the rest of the application source code COPY . /app # Expose the port the app runs on EXPOSE 7860 # Environment variables for Uvicorn configuration ENV MODULE_NAME="app.main" ENV VARIABLE_NAME="app" ENV PORT=7860 # Run the app using Uvicorn CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "$PORT"]