File size: 976 Bytes
10e36a3
a25898b
 
b6297a2
a25898b
 
 
 
 
10e36a3
a25898b
 
 
 
 
 
 
 
 
 
10e36a3
a25898b
 
10e36a3
 
a25898b
10e36a3
a25898b
 
 
10e36a3
a25898b
 
10e36a3
a25898b
 
10e36a3
a25898b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# Use Python 3.11 base image
FROM python:3.11.4-slim

# Avoid interactive prompts
ENV DEBIAN_FRONTEND=noninteractive

# Set working directory
WORKDIR /app

# Install OS-level dependencies
RUN apt-get update && apt-get install -y \
    git \
    build-essential \
    ffmpeg \
    libglib2.0-0 \
    libsm6 \
    libxext6 \
    libxrender-dev \
    && rm -rf /var/lib/apt/lists/*

# Upgrade pip and install build tools
RUN pip install --upgrade pip setuptools wheel build

# ✅ Manually install Ultralytics CLIP fork using legacy build mode
RUN pip install --no-use-pep517 git+https://github.com/ultralytics/CLIP.git

# Copy requirements.txt and install remaining dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt

# Copy the rest of the application code
COPY . .

# Expose Gradio’s port (Hugging Face Spaces uses this)
EXPOSE 7860

# Start the application (adjust if your entrypoint file is named differently)
CMD ["python", "app.py"]