Dilexsan commited on
Commit
d775ccf
·
1 Parent(s): e094d08

Upload emotion API project

Browse files
Files changed (1) hide show
  1. Dockerfile +6 -11
Dockerfile CHANGED
@@ -1,28 +1,23 @@
1
- # ---------- Base image ----------
2
  FROM python:3.10-slim
3
 
4
- # ---------- System dependencies ----------
5
- # HF uses Debian Trixie, so libgl1-mesa-glx is not available.
6
  RUN apt-get update && apt-get install -y --no-install-recommends \
7
  libgl1 \
8
  libglib2.0-0 \
9
- libopencv-core \
10
- libopencv-videoio \
11
- libopencv-imgproc \
12
  && rm -rf /var/lib/apt/lists/*
13
 
14
- # ---------- Working directory ----------
15
  WORKDIR /app
16
 
17
- # ---------- Copy project files ----------
18
  COPY requirements.txt .
19
  RUN pip install --no-cache-dir -r requirements.txt
20
 
21
- # Copy everything (includes model folder)
22
  COPY . .
23
 
24
- # ---------- Expose API port ----------
25
  EXPOSE 7860
26
 
27
- # ---------- Start server ----------
28
  CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
 
 
1
  FROM python:3.10-slim
2
 
3
+ # --- Install only required system libs for OpenCV & Mediapipe ---
 
4
  RUN apt-get update && apt-get install -y --no-install-recommends \
5
  libgl1 \
6
  libglib2.0-0 \
 
 
 
7
  && rm -rf /var/lib/apt/lists/*
8
 
9
+ # --- Working directory ---
10
  WORKDIR /app
11
 
12
+ # --- Install python dependencies ---
13
  COPY requirements.txt .
14
  RUN pip install --no-cache-dir -r requirements.txt
15
 
16
+ # --- Copy full project ---
17
  COPY . .
18
 
19
+ # --- Expose HF port ---
20
  EXPOSE 7860
21
 
22
+ # --- Start FastAPI ---
23
  CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]