amanSethSmava commited on
Commit
07c64db
·
1 Parent(s): a2d6753

Use prebuilt dlib base image to prevent timeout

Browse files
Files changed (1) hide show
  1. Dockerfile +18 -5
Dockerfile CHANGED
@@ -1,15 +1,28 @@
1
- FROM deeppomf/dlib-opencv:latest
 
 
 
 
 
 
 
 
 
 
 
 
2
 
3
- # Set working directory
4
  WORKDIR /app
5
 
6
- # Copy and install Python dependencies
 
 
 
7
  COPY requirements.txt .
8
  RUN pip install --upgrade pip
9
  RUN pip install -r requirements.txt
10
 
11
- # Copy your app
12
  COPY . .
13
 
14
- # Launch your app
15
  CMD ["python", "app.py"]
 
1
+ FROM python:3.10
2
+
3
+ # Install system dependencies needed for dlib
4
+ RUN apt-get update && apt-get install -y \
5
+ cmake \
6
+ libboost-all-dev \
7
+ build-essential \
8
+ python3-dev \
9
+ libopenblas-dev \
10
+ liblapack-dev \
11
+ git \
12
+ wget \
13
+ && rm -rf /var/lib/apt/lists/*
14
 
 
15
  WORKDIR /app
16
 
17
+ # Preinstall dlib with pip to avoid timeout
18
+ RUN pip install dlib==19.24.1
19
+
20
+ # Install other Python dependencies
21
  COPY requirements.txt .
22
  RUN pip install --upgrade pip
23
  RUN pip install -r requirements.txt
24
 
25
+ # Copy your source code
26
  COPY . .
27
 
 
28
  CMD ["python", "app.py"]