StefVero commited on
Commit
f220268
·
verified ·
1 Parent(s): 7ebef6a

Upload 2 files

Browse files
Files changed (2) hide show
  1. Dockerfile +11 -3
  2. requirements.txt +1 -1
Dockerfile CHANGED
@@ -2,19 +2,27 @@ FROM python:3.11-slim
2
 
3
  WORKDIR /app
4
 
 
5
  RUN apt-get update && apt-get install -y \
6
  build-essential \
7
  curl \
8
  git \
 
 
 
 
9
  && rm -rf /var/lib/apt/lists/*
10
 
 
11
  COPY requirements.txt ./
12
- COPY src/ ./src/
 
13
 
14
- RUN pip3 install -r requirements.txt
 
15
 
16
  EXPOSE 8501
17
 
18
  HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health
19
 
20
- ENTRYPOINT ["streamlit", "run", "src/streamlit_app.py", "--server.port=8501", "--server.address=0.0.0.0", "--server.enableXsrfProtection=false"]
 
2
 
3
  WORKDIR /app
4
 
5
+ # Install build tools and system dependencies
6
  RUN apt-get update && apt-get install -y \
7
  build-essential \
8
  curl \
9
  git \
10
+ libglib2.0-0 \
11
+ libsm6 \
12
+ libxrender1 \
13
+ libxext6 \
14
  && rm -rf /var/lib/apt/lists/*
15
 
16
+ # Copy requirements first for caching
17
  COPY requirements.txt ./
18
+ RUN pip install --upgrade pip
19
+ RUN pip install -r requirements.txt
20
 
21
+ # Copy source code
22
+ COPY src/ ./src/
23
 
24
  EXPOSE 8501
25
 
26
  HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health
27
 
28
+ ENTRYPOINT ["streamlit", "run", "src/streamlit_app.py", "--server.port=8501", "--server.address=0.0.0.0", "--server.enableXsrfProtection=false"]
requirements.txt CHANGED
@@ -2,4 +2,4 @@ streamlit==1.50.0
2
  tensorflow==2.21.0
3
  keras==3.14.0
4
  numpy==1.26.4
5
- Pillow==10.3.0
 
2
  tensorflow==2.21.0
3
  keras==3.14.0
4
  numpy==1.26.4
5
+ Pillow==10.3.0