Update Dockerfile
Browse files- Dockerfile +6 -5
Dockerfile
CHANGED
|
@@ -1,7 +1,6 @@
|
|
| 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 \
|
|
@@ -18,18 +17,20 @@ ENV HOME=/home/user \
|
|
| 18 |
|
| 19 |
WORKDIR $HOME/app
|
| 20 |
|
| 21 |
-
# Copy requirements
|
| 22 |
COPY --chown=user requirements.txt .
|
| 23 |
|
| 24 |
-
# 1. Install pre-compiled detectron2
|
| 25 |
-
|
|
|
|
|
|
|
|
|
|
| 26 |
|
| 27 |
# 2. Install other dependencies
|
| 28 |
RUN pip install --no-cache-dir --upgrade pip && \
|
| 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
|
|
|
|
| 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 \
|
|
|
|
| 17 |
|
| 18 |
WORKDIR $HOME/app
|
| 19 |
|
| 20 |
+
# Copy requirements
|
| 21 |
COPY --chown=user requirements.txt .
|
| 22 |
|
| 23 |
+
# 1. Install pre-compiled detectron2
|
| 24 |
+
# FIX: Added '--trusted-host' to bypass the SSL certificate error
|
| 25 |
+
RUN pip install --no-cache-dir detectron2 \
|
| 26 |
+
--extra-index-url https://wheels.myhloli.com \
|
| 27 |
+
--trusted-host wheels.myhloli.com
|
| 28 |
|
| 29 |
# 2. Install other dependencies
|
| 30 |
RUN pip install --no-cache-dir --upgrade pip && \
|
| 31 |
pip install --no-cache-dir -r requirements.txt
|
| 32 |
|
| 33 |
# Copy the rest of the application
|
|
|
|
| 34 |
COPY --chown=user . .
|
| 35 |
|
| 36 |
# Run the application
|