Spaces:
Running
Running
Upload Dockerfile with huggingface_hub
Browse files- Dockerfile +5 -2
Dockerfile
CHANGED
|
@@ -6,10 +6,12 @@ ENV PYTHONDONTWRITEBYTECODE 1
|
|
| 6 |
ENV PYTHONUNBUFFERED 1
|
| 7 |
ENV PORT 7860
|
| 8 |
|
| 9 |
-
# Install system dependencies (OpenCV requires libgl1)
|
| 10 |
RUN apt-get update && apt-get install -y \
|
| 11 |
libgl1-mesa-glx \
|
| 12 |
libglib2.0-0 \
|
|
|
|
|
|
|
| 13 |
&& rm -rf /var/lib/apt/lists/*
|
| 14 |
|
| 15 |
# Set working directory
|
|
@@ -17,7 +19,8 @@ WORKDIR /app
|
|
| 17 |
|
| 18 |
# Copy requirements and install
|
| 19 |
COPY requirements.txt .
|
| 20 |
-
RUN pip install --no-cache-dir -
|
|
|
|
| 21 |
|
| 22 |
# Pre-download models to bake them into the Docker image
|
| 23 |
# This ensures fast startup on Hugging Face Spaces
|
|
|
|
| 6 |
ENV PYTHONUNBUFFERED 1
|
| 7 |
ENV PORT 7860
|
| 8 |
|
| 9 |
+
# Install system dependencies (OpenCV requires libgl1, libsm6, libxext6)
|
| 10 |
RUN apt-get update && apt-get install -y \
|
| 11 |
libgl1-mesa-glx \
|
| 12 |
libglib2.0-0 \
|
| 13 |
+
libsm6 \
|
| 14 |
+
libxext6 \
|
| 15 |
&& rm -rf /var/lib/apt/lists/*
|
| 16 |
|
| 17 |
# Set working directory
|
|
|
|
| 19 |
|
| 20 |
# Copy requirements and install
|
| 21 |
COPY requirements.txt .
|
| 22 |
+
RUN pip install --no-cache-dir --upgrade pip && \
|
| 23 |
+
pip install --no-cache-dir -r requirements.txt
|
| 24 |
|
| 25 |
# Pre-download models to bake them into the Docker image
|
| 26 |
# This ensures fast startup on Hugging Face Spaces
|