# Use the Hugging Face Spaces base image | |
FROM huggingface/platform:latest | |
# Install system dependencies for PortAudio | |
RUN apt-get update && apt-get install -y \ | |
portaudio19-dev \ | |
libasound2-dev \ | |
libportaudio2 \ | |
libportaudiocpp0 \ | |
python3-dev \ | |
build-essential \ | |
&& apt-get clean | |
# Set the working directory inside the container | |
WORKDIR /app | |
# Copy all project files into the container | |
COPY . /app | |
# Install Python dependencies with verbose output | |
RUN pip install --no-cache-dir -v sounddevice | |
# Expose the Streamlit default port | |
EXPOSE 8501 | |
# Run the Streamlit app | |
CMD ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"] |