aniudupa commited on
Commit
f9caa2d
·
verified ·
1 Parent(s): 6fbe0bf

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +12 -14
Dockerfile CHANGED
@@ -1,34 +1,32 @@
1
- # Use the official Python base image
2
- FROM python:3.10-slim
3
 
4
- # Install system dependencies
5
  RUN apt-get update && apt-get install -y \
6
  build-essential \
7
  cmake \
8
- libgtk-3-dev \
9
- libboost-all-dev \
10
  libopenblas-dev \
11
  liblapack-dev \
12
  libx11-dev \
13
- libsm6 \
14
- libxext6 \
15
- libxrender-dev \
 
16
  && rm -rf /var/lib/apt/lists/*
17
 
18
-
19
-
20
  # Set working directory
21
  WORKDIR /app
22
 
23
- # Copy app files
24
- COPY app ./app
25
  COPY requirements.txt .
 
26
 
27
  # Install Python dependencies
 
28
  RUN pip install --no-cache-dir -r requirements.txt
29
 
30
- # Expose the port FastAPI will run on
31
  EXPOSE 7860
32
 
33
- # Run the FastAPI app
34
  CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"]
 
1
+ # Start from an image that supports face_recognition and dlib
2
+ FROM python:3.10
3
 
4
+ # Install system dependencies for face_recognition & image processing
5
  RUN apt-get update && apt-get install -y \
6
  build-essential \
7
  cmake \
 
 
8
  libopenblas-dev \
9
  liblapack-dev \
10
  libx11-dev \
11
+ libgtk-3-dev \
12
+ libboost-all-dev \
13
+ libgl1-mesa-glx \
14
+ libglib2.0-0 \
15
  && rm -rf /var/lib/apt/lists/*
16
 
 
 
17
  # Set working directory
18
  WORKDIR /app
19
 
20
+ # Copy files
 
21
  COPY requirements.txt .
22
+ COPY app ./app
23
 
24
  # Install Python dependencies
25
+ RUN pip install --upgrade pip
26
  RUN pip install --no-cache-dir -r requirements.txt
27
 
28
+ # Expose FastAPI port
29
  EXPOSE 7860
30
 
31
+ # Run the app
32
  CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"]