Spaces:
Runtime error
Runtime error
Update Dockerfile
Browse files- Dockerfile +22 -27
Dockerfile
CHANGED
@@ -1,36 +1,31 @@
|
|
1 |
-
|
2 |
-
|
3 |
FROM python:3.10-slim
|
4 |
|
5 |
-
|
6 |
-
|
7 |
WORKDIR /app
|
8 |
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
COPY . .
|
30 |
|
31 |
-
|
32 |
ENV pexels_api_key=${pexels_api_key}
|
33 |
|
34 |
-
|
35 |
-
|
36 |
CMD ["python", "app.py"]
|
|
|
1 |
+
# Use official Python slim base image
|
|
|
2 |
FROM python:3.10-slim
|
3 |
|
4 |
+
# Set working directory
|
|
|
5 |
WORKDIR /app
|
6 |
|
7 |
+
# Install system dependencies
|
8 |
+
RUN apt-get update && apt-get install -y \
|
9 |
+
ffmpeg \
|
10 |
+
libsm6 \
|
11 |
+
libxext6 \
|
12 |
+
libxrender-dev \
|
13 |
+
&& rm -rf /var/lib/apt/lists/*
|
14 |
+
|
15 |
+
# Copy requirements.txt and install Python dependencies
|
16 |
+
COPY requirements.txt .
|
17 |
+
RUN pip install --no-cache-dir -r requirements.txt || pip install --no-cache-dir \
|
18 |
+
torch \
|
19 |
+
transformers \
|
20 |
+
gradio \
|
21 |
+
moviepy \
|
22 |
+
imageio-ffmpeg
|
23 |
+
|
24 |
+
# Copy the entire project
|
|
|
|
|
25 |
COPY . .
|
26 |
|
27 |
+
# Set environment variable for Pexels API key
|
28 |
ENV pexels_api_key=${pexels_api_key}
|
29 |
|
30 |
+
# Command to run the application
|
|
|
31 |
CMD ["python", "app.py"]
|