File size: 873 Bytes
7de77c7 5fc78bc 0922a62 342f0a3 4d46684 342f0a3 0922a62 5fc78bc 88456fa 5fc78bc 88456fa 5fc78bc 582e1d3 342f0a3 5fc78bc 88456fa 7de77c7 5fc78bc 88456fa 5fc78bc |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
# Use the Hugging Face Spaces base image
FROM huggingface/platform:latest
# Install system dependencies for PyAudio, PulseAudio, and other build tools
RUN apt-get update && apt-get install -y \
portaudio19-dev \
libasound-dev \
libportaudio2 \
libportaudiocpp0 \
pulseaudio \
gcc \
&& apt-get clean
# Set up a virtual microphone using PulseAudio
RUN pactl load-module module-null-sink sink_name=virtual_mic
RUN pactl load-module module-virtual-source source_name=virtual_mic.monitor
# Set the working directory inside the container
WORKDIR /app
# Copy all project files into the container
COPY . /app
# Install Python dependencies
RUN pip install --no-cache-dir -r requirements.txt
# 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"] |