VietCat Amp commited on
Commit
62e47fd
·
1 Parent(s): 2c73a93

Use opencv-python-headless to avoid GUI dependencies

Browse files

Amp-Thread-ID: https://ampcode.com/threads/T-22e83726-d77c-475f-b185-6d55f37c5979
Co-authored-by: Amp <amp@ampcode.com>

Files changed (2) hide show
  1. Dockerfile +0 -11
  2. requirements.txt +1 -1
Dockerfile CHANGED
@@ -2,17 +2,6 @@ FROM python:3.9-slim
2
 
3
  WORKDIR /app
4
 
5
- # Install system dependencies for OpenCV
6
- RUN apt-get update && apt-get install -y \
7
- libgl1-mesa-glx \
8
- libglib2.0-0 \
9
- libsm6 \
10
- libxext6 \
11
- libxrender-dev \
12
- libgomp1 \
13
- libgthread-2.0-0 \
14
- && rm -rf /var/lib/apt/lists/*
15
-
16
  # Copy requirements first to leverage Docker cache
17
  COPY requirements.txt .
18
  RUN pip install --no-cache-dir -r requirements.txt
 
2
 
3
  WORKDIR /app
4
 
 
 
 
 
 
 
 
 
 
 
 
5
  # Copy requirements first to leverage Docker cache
6
  COPY requirements.txt .
7
  RUN pip install --no-cache-dir -r requirements.txt
requirements.txt CHANGED
@@ -1,5 +1,5 @@
1
  ultralytics==8.2.0
2
  gradio==4.36.1
3
- opencv-python==4.9.0.80
4
  pyyaml==6.0.1
5
  numpy==1.26.4
 
1
  ultralytics==8.2.0
2
  gradio==4.36.1
3
+ opencv-python-headless==4.9.0.80
4
  pyyaml==6.0.1
5
  numpy==1.26.4