MASSJ77 commited on
Commit
bd5db9c
·
verified ·
1 Parent(s): 03fa7b1

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +6 -10
Dockerfile CHANGED
@@ -1,32 +1,28 @@
1
- # ---- Base image ----
2
  FROM python:3.11-slim
3
 
4
- # ---- Set environment variables ----
5
  ENV PYTHONDONTWRITEBYTECODE 1
6
  ENV PYTHONUNBUFFERED 1
7
  ENV HF_HOME=/tmp/hf_cache
8
 
9
- # ---- Install system dependencies ----
10
- RUN apt-get update && apt-get install -y \
11
  git \
12
  ffmpeg \
13
- libgl1 \
14
  libglib2.0-0 \
 
15
  && rm -rf /var/lib/apt/lists/*
16
 
17
- # ---- Create working directory ----
18
  WORKDIR /app
19
 
20
- # ---- Copy requirements and install ----
21
  COPY requirements.txt .
22
  RUN pip install --upgrade pip
23
  RUN pip install --no-cache-dir -r requirements.txt
24
 
25
- # ---- Copy app code ----
26
  COPY . .
27
 
28
- # ---- Expose FastAPI port ----
29
  EXPOSE 8000
30
 
31
- # ---- Run Uvicorn ----
32
  CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8000"]
 
 
1
  FROM python:3.11-slim
2
 
 
3
  ENV PYTHONDONTWRITEBYTECODE 1
4
  ENV PYTHONUNBUFFERED 1
5
  ENV HF_HOME=/tmp/hf_cache
6
 
7
+ # Install system dependencies for OpenCV, Mediapipe, ffmpeg
8
+ RUN apt-get update && apt-get install -y --no-install-recommends \
9
  git \
10
  ffmpeg \
11
+ libgl1-mesa-glx \
12
  libglib2.0-0 \
13
+ build-essential \
14
  && rm -rf /var/lib/apt/lists/*
15
 
 
16
  WORKDIR /app
17
 
18
+ # Copy requirements and install
19
  COPY requirements.txt .
20
  RUN pip install --upgrade pip
21
  RUN pip install --no-cache-dir -r requirements.txt
22
 
23
+ # Copy app code
24
  COPY . .
25
 
 
26
  EXPOSE 8000
27
 
 
28
  CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8000"]