Fola-AI commited on
Commit ·
e1eef3d
1
Parent(s): 2695efb
Fix ultralytics installation
Browse files- Dockerfile +8 -2
Dockerfile
CHANGED
|
@@ -15,22 +15,28 @@ ENV DEBIAN_FRONTEND=noninteractive
|
|
| 15 |
|
| 16 |
WORKDIR /app
|
| 17 |
|
| 18 |
-
# Install system dependencies
|
| 19 |
RUN apt-get update && apt-get install -y --no-install-recommends \
|
| 20 |
ffmpeg \
|
| 21 |
libsm6 \
|
| 22 |
libxext6 \
|
| 23 |
libgl1 \
|
|
|
|
| 24 |
git \
|
| 25 |
&& rm -rf /var/lib/apt/lists/*
|
| 26 |
|
|
|
|
|
|
|
|
|
|
| 27 |
# Copy requirements
|
| 28 |
COPY requirements.txt .
|
| 29 |
|
| 30 |
# Install Python dependencies
|
| 31 |
-
# Note: torch is already in base image
|
| 32 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 33 |
|
|
|
|
|
|
|
|
|
|
| 34 |
# Copy application code
|
| 35 |
COPY . .
|
| 36 |
|
|
|
|
| 15 |
|
| 16 |
WORKDIR /app
|
| 17 |
|
| 18 |
+
# Install system dependencies
|
| 19 |
RUN apt-get update && apt-get install -y --no-install-recommends \
|
| 20 |
ffmpeg \
|
| 21 |
libsm6 \
|
| 22 |
libxext6 \
|
| 23 |
libgl1 \
|
| 24 |
+
libglib2.0-0 \
|
| 25 |
git \
|
| 26 |
&& rm -rf /var/lib/apt/lists/*
|
| 27 |
|
| 28 |
+
# Upgrade pip first
|
| 29 |
+
RUN pip install --no-cache-dir --upgrade pip setuptools wheel
|
| 30 |
+
|
| 31 |
# Copy requirements
|
| 32 |
COPY requirements.txt .
|
| 33 |
|
| 34 |
# Install Python dependencies
|
|
|
|
| 35 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 36 |
|
| 37 |
+
# Verify ultralytics installed
|
| 38 |
+
RUN python -c "from ultralytics import YOLO; print('✅ Ultralytics installed successfully')"
|
| 39 |
+
|
| 40 |
# Copy application code
|
| 41 |
COPY . .
|
| 42 |
|