shiveshnavin commited on
Commit
59f0cca
·
1 Parent(s): 4665111

Add ffmpeg

Browse files
Files changed (2) hide show
  1. Dockerfile +65 -54
  2. common-utils +1 -1
Dockerfile CHANGED
@@ -1,54 +1,65 @@
1
- FROM semibit/render-farm:latest
2
-
3
- # Install required packages including Xvfb
4
- USER root
5
- RUN apt-get update && \
6
- apt-get install -y \
7
- bash \
8
- git git-lfs \
9
- wget curl procps \
10
- htop vim nano \
11
- xvfb x11-utils && \
12
- rm -rf /var/lib/apt/lists/*
13
-
14
- # Install nginx
15
- RUN apt-get update && apt-get install -y nginx wget && apt-get clean && rm -rf /var/lib/apt/lists/*
16
-
17
- # Expose ports
18
- EXPOSE 7860 3000 8083
19
- RUN mkdir /app || true
20
- RUN chown 1000 /app
21
-
22
- COPY --chown=1000 . /app
23
- COPY --chown=1000 package.ci.json /app/package.json
24
-
25
- # Ensure writable directories
26
- RUN mkdir -p /app/public /app/out /app/frames /app/uploads || true
27
- RUN chmod -R 777 /app/public /app/out /app/uploads /app/frames || true
28
- RUN chmod 777 /app/index.html || true
29
- RUN mkdir -p /tmp/client_body /tmp/proxy_temp /tmp/fastcgi_temp /tmp/uwsgi_temp /tmp/scgi_temp && chmod -R 777 /tmp || true
30
- RUN chmod -R 777 /var || true
31
- RUN chmod -R 777 /app/node_modules/.cache || true
32
-
33
- # Build app
34
- WORKDIR /app
35
-
36
- # RUN npm run bundle || true
37
- # RUN npm run skip-font-warn || true
38
-
39
- # Copy nginx config and start script
40
- COPY --chown=1000 nginx.conf /etc/nginx/nginx.conf
41
- COPY --chown=1000 start.sh /app/start.sh
42
- RUN chmod +x /app/start.sh
43
-
44
- # Ensure nginx runs as root
45
- RUN sed -i 's/^user .*;/user root;/' /etc/nginx/nginx.conf || true
46
-
47
- # Set up Xvfb virtual display environment variable
48
- ENV DISPLAY=:99
49
-
50
- # Start Xvfb and then your app
51
- USER 1000
52
-
53
- CMD ["sh", "/app/start.sh"]
54
-
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM semibit/render-farm:latest
2
+
3
+ # Install required packages including Xvfb
4
+ USER root
5
+ RUN apt-get update && \
6
+ apt-get install -y \
7
+ bash \
8
+ git git-lfs \
9
+ wget curl procps \
10
+ htop vim nano \
11
+ xvfb x11-utils && \
12
+ rm -rf /var/lib/apt/lists/*
13
+
14
+ # Install FFmpeg 8 from static build
15
+ RUN wget https://johnvansickle.com/ffmpeg/releases/ffmpeg-release-amd64-static.tar.xz && \
16
+ tar -xf ffmpeg-release-amd64-static.tar.xz && \
17
+ mv ffmpeg-*-amd64-static/ffmpeg /usr/local/bin/ffmpeg && \
18
+ mv ffmpeg-*-amd64-static/ffprobe /usr/local/bin/ffprobe && \
19
+ chmod +x /usr/local/bin/ffmpeg /usr/local/bin/ffprobe && \
20
+ rm -rf ffmpeg-* && \
21
+ ln -sf /usr/local/bin/ffmpeg /usr/bin/ffmpeg && \
22
+ ln -sf /usr/local/bin/ffprobe /usr/bin/ffprobe && \
23
+ ffmpeg -version
24
+
25
+ # Install nginx
26
+ RUN apt-get update && apt-get install -y nginx wget && apt-get clean && rm -rf /var/lib/apt/lists/*
27
+
28
+ # Expose ports
29
+ EXPOSE 7860 3000 8083
30
+ RUN mkdir /app || true
31
+ RUN chown 1000 /app
32
+
33
+ COPY --chown=1000 . /app
34
+ COPY --chown=1000 package.ci.json /app/package.json
35
+
36
+ # Ensure writable directories
37
+ RUN mkdir -p /app/public /app/out /app/frames /app/uploads || true
38
+ RUN chmod -R 777 /app/public /app/out /app/uploads /app/frames || true
39
+ RUN chmod 777 /app/index.html || true
40
+ RUN mkdir -p /tmp/client_body /tmp/proxy_temp /tmp/fastcgi_temp /tmp/uwsgi_temp /tmp/scgi_temp && chmod -R 777 /tmp || true
41
+ RUN chmod -R 777 /var || true
42
+ RUN chmod -R 777 /app/node_modules/.cache || true
43
+
44
+ # Build app
45
+ WORKDIR /app
46
+
47
+ # RUN npm run bundle || true
48
+ # RUN npm run skip-font-warn || true
49
+
50
+ # Copy nginx config and start script
51
+ COPY --chown=1000 nginx.conf /etc/nginx/nginx.conf
52
+ COPY --chown=1000 start.sh /app/start.sh
53
+ RUN chmod +x /app/start.sh
54
+
55
+ # Ensure nginx runs as root
56
+ RUN sed -i 's/^user .*;/user root;/' /etc/nginx/nginx.conf || true
57
+
58
+ # Set up Xvfb virtual display environment variable
59
+ ENV DISPLAY=:99
60
+
61
+ # Start Xvfb and then your app
62
+ USER 1000
63
+
64
+ CMD ["sh", "/app/start.sh"]
65
+
common-utils CHANGED
@@ -1 +1 @@
1
- Subproject commit d8e83ba4748273a696d23d0a11df0dc1ae7fae32
 
1
+ Subproject commit 6137795c68524d7ee3083df49c6f4d499a6d107b