Spaces:
Running
Running
Update Dockerfile
Browse files- Dockerfile +9 -9
Dockerfile
CHANGED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
# Use Python 3.11 base
|
| 2 |
FROM python:3.11.4-slim
|
| 3 |
|
| 4 |
# Avoid interactive prompts
|
|
@@ -7,7 +7,7 @@ ENV DEBIAN_FRONTEND=noninteractive
|
|
| 7 |
# Set working directory
|
| 8 |
WORKDIR /app
|
| 9 |
|
| 10 |
-
# Install
|
| 11 |
RUN apt-get update && apt-get install -y \
|
| 12 |
git \
|
| 13 |
build-essential \
|
|
@@ -18,21 +18,21 @@ RUN apt-get update && apt-get install -y \
|
|
| 18 |
libxrender-dev \
|
| 19 |
&& rm -rf /var/lib/apt/lists/*
|
| 20 |
|
| 21 |
-
# Upgrade pip and install build tools
|
| 22 |
RUN pip install --upgrade pip setuptools wheel build
|
| 23 |
|
| 24 |
-
# ✅ Manually install Ultralytics
|
| 25 |
-
RUN pip install git+https://github.com/ultralytics/CLIP.git
|
| 26 |
|
| 27 |
-
# Copy requirements and install
|
| 28 |
COPY requirements.txt .
|
| 29 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 30 |
|
| 31 |
-
# Copy rest of the
|
| 32 |
COPY . .
|
| 33 |
|
| 34 |
-
# Expose Gradio port
|
| 35 |
EXPOSE 7860
|
| 36 |
|
| 37 |
-
# Start
|
| 38 |
CMD ["python", "app.py"]
|
|
|
|
| 1 |
+
# Use Python 3.11 base image
|
| 2 |
FROM python:3.11.4-slim
|
| 3 |
|
| 4 |
# Avoid interactive prompts
|
|
|
|
| 7 |
# Set working directory
|
| 8 |
WORKDIR /app
|
| 9 |
|
| 10 |
+
# Install OS-level dependencies
|
| 11 |
RUN apt-get update && apt-get install -y \
|
| 12 |
git \
|
| 13 |
build-essential \
|
|
|
|
| 18 |
libxrender-dev \
|
| 19 |
&& rm -rf /var/lib/apt/lists/*
|
| 20 |
|
| 21 |
+
# Upgrade pip and install build tools
|
| 22 |
RUN pip install --upgrade pip setuptools wheel build
|
| 23 |
|
| 24 |
+
# ✅ Manually install Ultralytics CLIP fork using legacy build mode
|
| 25 |
+
RUN pip install --no-use-pep517 git+https://github.com/ultralytics/CLIP.git
|
| 26 |
|
| 27 |
+
# Copy requirements.txt and install remaining dependencies
|
| 28 |
COPY requirements.txt .
|
| 29 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 30 |
|
| 31 |
+
# Copy the rest of the application code
|
| 32 |
COPY . .
|
| 33 |
|
| 34 |
+
# Expose Gradio’s port (Hugging Face Spaces uses this)
|
| 35 |
EXPOSE 7860
|
| 36 |
|
| 37 |
+
# Start the application (adjust if your entrypoint file is named differently)
|
| 38 |
CMD ["python", "app.py"]
|