gopalswami commited on
Commit
28b7422
·
1 Parent(s): be02e33

Refactor Dockerfile to combine system dependency installation steps for improved cache handling

Browse files
Files changed (1) hide show
  1. Dockerfile +14 -12
Dockerfile CHANGED
@@ -2,18 +2,20 @@ FROM python:3.12-slim
2
 
3
  WORKDIR /app
4
 
5
- # Install system dependencies including those needed for OCR and ML models
6
- RUN apt-get update -y && apt-get upgrade -y
7
- RUN apt-get install -y --no-install-recommends \
8
- curl \
9
- poppler-utils \
10
- libgl1-mesa-glx \
11
- libglib2.0-0 \
12
- libsm6 \
13
- libxext6 \
14
- libxrender-dev \
15
- libgomp1
16
- RUN apt-get clean -y && \
 
 
17
  rm -rf /var/lib/apt/lists/*
18
 
19
  # Install poetry
 
2
 
3
  WORKDIR /app
4
 
5
+ # Combining update and install to ensure proper cache handling
6
+ RUN apt-get update -y && \
7
+ apt-get upgrade -y && \
8
+ apt-get install -y --no-install-recommends \
9
+ curl \
10
+ poppler-utils \
11
+ libgl1-mesa-glx \
12
+ libglib2.0-0 \
13
+ libsm6 \
14
+ libxext6 \
15
+ libxrender-dev \
16
+ libgomp1 \
17
+ wget && \
18
+ apt-get clean -y && \
19
  rm -rf /var/lib/apt/lists/*
20
 
21
  # Install poetry