niranjanpc commited on
Commit
848d338
·
verified ·
1 Parent(s): cbff32f

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +9 -22
Dockerfile CHANGED
@@ -1,29 +1,16 @@
1
  FROM python:3.9-slim
2
 
3
- WORKDIR /app
4
-
5
  RUN apt-get update && apt-get install -y --no-install-recommends \
6
- software-properties-common \
 
7
  && rm -rf /var/lib/apt/lists/*
8
 
9
- #RUN apt-get update && apt-get install -y \
10
- #build-essential \
11
- #curl \
12
- #software-properties-common \
13
- #git \
14
- #&& rm -rf /var/lib/apt/lists/*
15
-
16
- COPY requirements.txt ./
17
- COPY src/ ./src/
18
-
19
- RUN pip3 install -r requirements.txt
20
-
21
- EXPOSE 8501
22
-
23
- HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health
24
-
25
- ENTRYPOINT ["streamlit", "run", "src/streamlit_app.py", "--server.port=8501", "--server.address=0.0.0.0"]
26
-
27
- FROM python:3.9-slim
28
 
 
 
29
 
 
 
1
  FROM python:3.9-slim
2
 
3
+ # Install system deps (if needed)
 
4
  RUN apt-get update && apt-get install -y --no-install-recommends \
5
+ build-essential \
6
+ git \
7
  && rm -rf /var/lib/apt/lists/*
8
 
9
+ # Install Python deps
10
+ COPY requirements.txt .
11
+ RUN pip install --no-cache-dir -r requirements.txt
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12
 
13
+ # Copy app
14
+ COPY app.py .
15
 
16
+ CMD ["streamlit", "run", "app.py", "--server.port", "7860", "--server.address", "0.0.0.0"]