Spaces:
Sleeping
Sleeping
Commit
·
d9e79bd
1
Parent(s):
72458c1
update: docker file ubuntu22.04 + ffmpeg
Browse files- Dockerfile +12 -10
Dockerfile
CHANGED
@@ -1,26 +1,28 @@
|
|
1 |
-
FROM
|
|
|
|
|
|
|
2 |
|
3 |
# Install system dependencies
|
4 |
RUN apt-get update && apt-get install -y \
|
5 |
-
|
|
|
|
|
6 |
imagemagick \
|
7 |
-
&&
|
8 |
|
9 |
# Create directories with proper permissions
|
10 |
WORKDIR /app
|
11 |
RUN mkdir -p /app/resources/{temp_video,audio,fonts,intro} \
|
12 |
-
&& chmod -R
|
13 |
|
14 |
# Set up temp directory with proper permissions
|
15 |
RUN mkdir -p /tmp/moviepy \
|
16 |
-
&& chmod -R
|
17 |
-
|
18 |
-
# Set TMPDIR environment variable
|
19 |
-
ENV TMPDIR=/tmp/moviepy
|
20 |
|
21 |
# Copy and install requirements
|
22 |
COPY requirements.txt .
|
23 |
-
RUN
|
24 |
|
25 |
# Copy application code
|
26 |
COPY . .
|
@@ -43,7 +45,7 @@ RUN echo '<policymap> \
|
|
43 |
# Set proper permissions
|
44 |
RUN chown -R nobody:nogroup /app \
|
45 |
&& chmod -R 755 /app \
|
46 |
-
&& chmod -R
|
47 |
|
48 |
# Use non-root user
|
49 |
USER nobody
|
|
|
1 |
+
FROM ubuntu:22.04
|
2 |
+
|
3 |
+
# Prevent interactive prompts during installation
|
4 |
+
ENV DEBIAN_FRONTEND=noninteractive
|
5 |
|
6 |
# Install system dependencies
|
7 |
RUN apt-get update && apt-get install -y \
|
8 |
+
python3.9 \
|
9 |
+
python3-pip \
|
10 |
+
ffmpeg=7:4.4.2-0ubuntu0.22.04.1+esm5 \
|
11 |
imagemagick \
|
12 |
+
&& rm -rf /var/lib/apt/lists/*
|
13 |
|
14 |
# Create directories with proper permissions
|
15 |
WORKDIR /app
|
16 |
RUN mkdir -p /app/resources/{temp_video,audio,fonts,intro} \
|
17 |
+
&& chmod -R 777 /app/resources
|
18 |
|
19 |
# Set up temp directory with proper permissions
|
20 |
RUN mkdir -p /tmp/moviepy \
|
21 |
+
&& chmod -R 777 /tmp/moviepy
|
|
|
|
|
|
|
22 |
|
23 |
# Copy and install requirements
|
24 |
COPY requirements.txt .
|
25 |
+
RUN pip3 install -r requirements.txt
|
26 |
|
27 |
# Copy application code
|
28 |
COPY . .
|
|
|
45 |
# Set proper permissions
|
46 |
RUN chown -R nobody:nogroup /app \
|
47 |
&& chmod -R 755 /app \
|
48 |
+
&& chmod -R 777 /tmp
|
49 |
|
50 |
# Use non-root user
|
51 |
USER nobody
|