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