| # Start from an official Python base image | |
| FROM python:3.10-slim | |
| # Install system dependencies for PortAudio and other necessary tools | |
| RUN apt-get update && \ | |
| apt-get install -y \ | |
| portaudio19-dev \ | |
| gcc \ | |
| g++ \ | |
| libsndfile1-dev \ | |
| && apt-get clean | |
| # Copy requirements.txt and install Python dependencies | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Copy the Streamlit app files into the container | |
| COPY . /app | |
| WORKDIR /app | |
| # Expose port for Streamlit (default is 8501) | |
| EXPOSE 8501 | |
| # Set the command to run the app with Streamlit | |
| CMD ["streamlit", "run", "page.py"] |