Gowthamvemula commited on
Commit
1593a2c
·
verified ·
1 Parent(s): 1446472

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +7 -5
Dockerfile CHANGED
@@ -2,18 +2,20 @@ 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
  && rm -rf /var/lib/apt/lists/*
9
 
 
10
  COPY requirements.txt ./
11
- RUN pip install -r requirements.txt
12
 
 
13
  COPY . .
14
 
 
15
  EXPOSE 8501
16
 
17
- HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health || exit 1
18
-
19
- ENTRYPOINT ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"]
 
2
 
3
  WORKDIR /app
4
 
5
+ # Install system packages (optional, only if needed)
6
  RUN apt-get update && apt-get install -y \
 
7
  curl \
8
  && rm -rf /var/lib/apt/lists/*
9
 
10
+ # Copy requirement file and install Python dependencies
11
  COPY requirements.txt ./
12
+ RUN pip install --no-cache-dir -r requirements.txt
13
 
14
+ # Copy all necessary app files (including .pkl and app.py)
15
  COPY . .
16
 
17
+ # Expose Streamlit port
18
  EXPOSE 8501
19
 
20
+ # Healthcheck (optional)
21
+ HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health || exit_