Update Dockerfile
Browse files- Dockerfile +12 -4
Dockerfile
CHANGED
@@ -1,6 +1,7 @@
|
|
1 |
# Use the Hugging Face Spaces base image
|
2 |
FROM huggingface/platform:latest
|
3 |
-
|
|
|
4 |
RUN apt-get update && apt-get install -y \
|
5 |
portaudio19-dev \
|
6 |
libasound-dev \
|
@@ -9,15 +10,22 @@ RUN apt-get update && apt-get install -y \
|
|
9 |
pulseaudio \
|
10 |
gcc \
|
11 |
&& apt-get clean
|
|
|
|
|
|
|
|
|
|
|
12 |
# Set the working directory inside the container
|
13 |
WORKDIR /app
|
|
|
14 |
# Copy all project files into the container
|
15 |
COPY . /app
|
|
|
16 |
# Install Python dependencies
|
17 |
RUN pip install --no-cache-dir -r requirements.txt
|
18 |
-
|
19 |
-
RUN pactl load-module module-virtual-source source_name=virtual_mic.monitor
|
20 |
# Expose the Streamlit default port
|
21 |
EXPOSE 8501
|
|
|
22 |
# Run the Streamlit app
|
23 |
-
CMD ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"]
|
|
|
1 |
# Use the Hugging Face Spaces base image
|
2 |
FROM huggingface/platform:latest
|
3 |
+
|
4 |
+
# Install system dependencies for PyAudio, PulseAudio, and other build tools
|
5 |
RUN apt-get update && apt-get install -y \
|
6 |
portaudio19-dev \
|
7 |
libasound-dev \
|
|
|
10 |
pulseaudio \
|
11 |
gcc \
|
12 |
&& apt-get clean
|
13 |
+
|
14 |
+
# Set up a virtual microphone using PulseAudio
|
15 |
+
RUN pactl load-module module-null-sink sink_name=virtual_mic
|
16 |
+
RUN pactl load-module module-virtual-source source_name=virtual_mic.monitor
|
17 |
+
|
18 |
# Set the working directory inside the container
|
19 |
WORKDIR /app
|
20 |
+
|
21 |
# Copy all project files into the container
|
22 |
COPY . /app
|
23 |
+
|
24 |
# Install Python dependencies
|
25 |
RUN pip install --no-cache-dir -r requirements.txt
|
26 |
+
|
|
|
27 |
# Expose the Streamlit default port
|
28 |
EXPOSE 8501
|
29 |
+
|
30 |
# Run the Streamlit app
|
31 |
+
CMD ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"]
|