noumanjavaid commited on
Commit
a5c305c
·
verified ·
1 Parent(s): a4c690f

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +14 -0
Dockerfile CHANGED
@@ -2,20 +2,34 @@ FROM python:3.9-slim
2
 
3
  WORKDIR /app
4
 
 
 
 
5
  RUN apt-get update && apt-get install -y \
6
  build-essential \
7
  curl \
8
  software-properties-common \
9
  git \
 
 
 
10
  && rm -rf /var/lib/apt/lists/*
11
 
12
  COPY requirements.txt ./
 
 
13
  COPY src/ ./src/
14
 
 
 
15
  RUN pip3 install -r requirements.txt
16
 
17
  EXPOSE 8501
18
 
19
  HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health
20
 
 
 
 
 
21
  ENTRYPOINT ["streamlit", "run", "src/streamlit_app.py", "--server.port=8501", "--server.address=0.0.0.0"]
 
2
 
3
  WORKDIR /app
4
 
5
+ # Install system dependencies including PortAudio development library
6
+ # and Python development headers.
7
+ # Also added libasound2-dev which is often a dependency for PortAudio on Debian-based systems.
8
  RUN apt-get update && apt-get install -y \
9
  build-essential \
10
  curl \
11
  software-properties-common \
12
  git \
13
+ portaudio19-dev \
14
+ python3-dev \
15
+ libasound2-dev \
16
  && rm -rf /var/lib/apt/lists/*
17
 
18
  COPY requirements.txt ./
19
+ # Assuming your main application script is in 'src/streamlit_app.py'
20
+ # and any other source code is also under 'src/'
21
  COPY src/ ./src/
22
 
23
+ # It's good practice to upgrade pip first
24
+ RUN pip3 install --upgrade pip
25
  RUN pip3 install -r requirements.txt
26
 
27
  EXPOSE 8501
28
 
29
  HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health
30
 
31
+ # Ensure your main Streamlit app file is correctly referenced here.
32
+ # If your app file is directly in /app (e.g., app_streamlit_new.py from previous examples),
33
+ # adjust the ENTRYPOINT accordingly.
34
+ # For this example, I'm sticking to the 'src/streamlit_app.py' from your Dockerfile.
35
  ENTRYPOINT ["streamlit", "run", "src/streamlit_app.py", "--server.port=8501", "--server.address=0.0.0.0"]