FROM python:3.11-slim WORKDIR /app # Install system compilation tools and PortAudio dependencies RUN apt-get update && apt-get install -y \ gcc \ python3-dev \ portaudio19-dev \ && rm -rf /var/lib/apt/lists/* # Install PyTorch CPU version RUN pip install --no-cache-dir torch torchaudio --index-url https://download.pytorch.org/whl/cpu # Copy and install Python dependencies COPY backend/requirements.txt ./ RUN pip install --no-cache-dir -r requirements.txt # Copy the application folders COPY backend/ ./backend COPY frontend/ ./frontend WORKDIR /app/backend EXPOSE 7860 CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]