Update Dockerfile
Browse files- Dockerfile +5 -2
Dockerfile
CHANGED
|
@@ -1,11 +1,12 @@
|
|
| 1 |
FROM python:3.10-slim
|
| 2 |
|
| 3 |
-
# Install system dependencies
|
|
|
|
| 4 |
RUN apt-get update && apt-get install -y --no-install-recommends \
|
| 5 |
build-essential \
|
| 6 |
wget \
|
| 7 |
git \
|
| 8 |
-
libgl1
|
| 9 |
libglib2.0-0 \
|
| 10 |
&& rm -rf /var/lib/apt/lists/*
|
| 11 |
|
|
@@ -19,6 +20,7 @@ WORKDIR $HOME/app
|
|
| 19 |
|
| 20 |
# Copy requirements and install Python dependencies
|
| 21 |
COPY --chown=user requirements.txt .
|
|
|
|
| 22 |
# 1. Install pre-compiled detectron2 (Crucial for CPU spaces)
|
| 23 |
RUN pip install --no-cache-dir detectron2 --extra-index-url https://wheels.myhloli.com
|
| 24 |
|
|
@@ -27,6 +29,7 @@ RUN pip install --no-cache-dir --upgrade pip && \
|
|
| 27 |
pip install --no-cache-dir -r requirements.txt
|
| 28 |
|
| 29 |
# Copy the rest of the application
|
|
|
|
| 30 |
COPY --chown=user . .
|
| 31 |
|
| 32 |
# Run the application
|
|
|
|
| 1 |
FROM python:3.10-slim
|
| 2 |
|
| 3 |
+
# Install system dependencies
|
| 4 |
+
# FIX: Replaced 'libgl1-mesa-glx' with 'libgl1' for compatibility
|
| 5 |
RUN apt-get update && apt-get install -y --no-install-recommends \
|
| 6 |
build-essential \
|
| 7 |
wget \
|
| 8 |
git \
|
| 9 |
+
libgl1 \
|
| 10 |
libglib2.0-0 \
|
| 11 |
&& rm -rf /var/lib/apt/lists/*
|
| 12 |
|
|
|
|
| 20 |
|
| 21 |
# Copy requirements and install Python dependencies
|
| 22 |
COPY --chown=user requirements.txt .
|
| 23 |
+
|
| 24 |
# 1. Install pre-compiled detectron2 (Crucial for CPU spaces)
|
| 25 |
RUN pip install --no-cache-dir detectron2 --extra-index-url https://wheels.myhloli.com
|
| 26 |
|
|
|
|
| 29 |
pip install --no-cache-dir -r requirements.txt
|
| 30 |
|
| 31 |
# Copy the rest of the application
|
| 32 |
+
# FIX: Ensure this is a single line
|
| 33 |
COPY --chown=user . .
|
| 34 |
|
| 35 |
# Run the application
|