Spaces:
Running
Running
Update Dockerfile
Browse files- Dockerfile +38 -41
Dockerfile
CHANGED
@@ -1,41 +1,38 @@
|
|
1 |
-
# Use
|
2 |
-
FROM python:3.
|
3 |
-
|
4 |
-
# Avoid prompts during builds
|
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 |
-
|
40 |
-
# Start Gradio app (adjust this if your main file is different)
|
41 |
-
CMD ["python", "app.py"]
|
|
|
1 |
+
# Use official Python 3.11 image
|
2 |
+
FROM python:3.11.4-slim
|
3 |
+
|
4 |
+
# Avoid prompts during builds
|
5 |
+
ENV DEBIAN_FRONTEND=noninteractive
|
6 |
+
|
7 |
+
# Set working directory
|
8 |
+
WORKDIR /app
|
9 |
+
|
10 |
+
# Install system-level dependencies
|
11 |
+
RUN apt-get update && apt-get install -y \
|
12 |
+
git \
|
13 |
+
build-essential \
|
14 |
+
ffmpeg \
|
15 |
+
libglib2.0-0 \
|
16 |
+
libsm6 \
|
17 |
+
libxext6 \
|
18 |
+
libxrender-dev \
|
19 |
+
&& rm -rf /var/lib/apt/lists/*
|
20 |
+
|
21 |
+
# Upgrade pip and install build tools to avoid wheel issues
|
22 |
+
RUN pip install --upgrade pip setuptools wheel build
|
23 |
+
|
24 |
+
# Install OpenAI CLIP from GitHub directly (outside requirements.txt)
|
25 |
+
RUN pip install git+https://github.com/openai/CLIP.git
|
26 |
+
|
27 |
+
# Copy and install remaining Python dependencies
|
28 |
+
COPY requirements.txt .
|
29 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
30 |
+
|
31 |
+
# Copy the rest of the app (e.g., app.py, assets, etc.)
|
32 |
+
COPY . .
|
33 |
+
|
34 |
+
# Expose Gradio’s default port
|
35 |
+
EXPOSE 7860
|
36 |
+
|
37 |
+
# Start the app (update this if your entry file is named differently)
|
38 |
+
CMD ["python", "app.py"]
|
|
|
|
|
|