aniudupa commited on
Commit
1c5fa93
·
verified ·
1 Parent(s): 09cf558

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +8 -9
Dockerfile CHANGED
@@ -1,7 +1,6 @@
1
- # Use the official Python 3.10 slim image as the base
2
  FROM python:3.10-slim
3
 
4
- # Install dependencies for dlib, face_recognition, and FastAPI
5
  RUN apt-get update && apt-get install -y \
6
  build-essential \
7
  cmake \
@@ -9,17 +8,17 @@ RUN apt-get update && apt-get install -y \
9
  libopenblas-dev \
10
  liblapack-dev \
11
  libx11-dev \
 
12
  python3-dev \
13
  && rm -rf /var/lib/apt/lists/*
14
 
15
- # Install Python dependencies from requirements.txt
16
- COPY requirements.txt /app/requirements.txt
17
  WORKDIR /app
18
- RUN pip install --no-cache-dir -r requirements.txt
19
-
20
- # Copy the application files
21
  COPY . /app
22
 
23
- # Expose port and run FastAPI using Uvicorn
24
- EXPOSE 10000
 
 
 
25
  CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
 
 
1
  FROM python:3.10-slim
2
 
3
+ # Install build tools and dlib dependencies
4
  RUN apt-get update && apt-get install -y \
5
  build-essential \
6
  cmake \
 
8
  libopenblas-dev \
9
  liblapack-dev \
10
  libx11-dev \
11
+ libgtk-3-dev \
12
  python3-dev \
13
  && rm -rf /var/lib/apt/lists/*
14
 
15
+ # Copy code and set working dir
 
16
  WORKDIR /app
 
 
 
17
  COPY . /app
18
 
19
+ # Upgrade pip and install dependencies
20
+ RUN pip install --upgrade pip setuptools wheel
21
+ RUN pip install --use-pep517 --no-cache-dir -r requirements.txt
22
+
23
+ # Run FastAPI app
24
  CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]