Stylique commited on
Commit
8d1511f
·
verified ·
1 Parent(s): 0a900e7

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +32 -37
Dockerfile CHANGED
@@ -1,57 +1,52 @@
1
- FROM nvidia/cuda:12.2.0-runtime-ubuntu22.04
2
 
3
- # Prevent interactive prompts during build
4
- ENV DEBIAN_FRONTEND=noninteractive
5
-
6
- # Update and install basics (curl, etc.)
7
- RUN apt-get update && apt-get install -y \
8
- curl \
9
  wget \
10
  gnupg \
11
- ca-certificates \
12
- git \
13
- unzip \
14
- fontconfig \
15
- locales \
16
- && rm -rf /var/lib/apt/lists/*
17
-
18
- # Install Node.js 20
19
- RUN mkdir -p /etc/apt/keyrings && \
20
- curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \
21
- echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list && \
22
- apt-get update && \
23
- apt-get install -y nodejs && \
24
- npm install -g npm@latest && \
25
- rm -rf /var/lib/apt/lists/*
26
-
27
- # Install Google Chrome Stable
28
- RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - && \
29
- echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list && \
30
- apt-get update && \
31
- apt-get install -y google-chrome-stable && \
32
- rm -rf /var/lib/apt/lists/*
33
-
34
- # Install FFmpeg (Ubuntu 22.04 usually has a decent version, or we can use custom PPA if needed)
35
- RUN apt-get update && apt-get install -y ffmpeg && rm -rf /var/lib/apt/lists/*
36
-
37
- # Install standard fonts for rendering
38
- RUN apt-get update && apt-get install -y fonts-ipafont-gothic fonts-wqy-zenhei fonts-thai-tlwg fonts-kacst fonts-freefont-ttf libxss1 \
39
  && rm -rf /var/lib/apt/lists/*
40
 
41
- # Set Environment Variables
42
  ENV CHROME_BIN=/usr/bin/google-chrome-stable
43
  ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true
44
  ENV PUPPETEER_EXECUTABLE_PATH=/usr/bin/google-chrome-stable
45
 
46
- # Application Setup
47
  WORKDIR /app
48
 
 
49
  COPY package*.json ./
50
 
 
51
  RUN npm install
52
 
 
53
  COPY . .
54
 
 
55
  EXPOSE 7860
56
 
 
57
  CMD ["npm", "start"]
 
1
+ FROM node:20-bookworm
2
 
3
+ # Install Remotion dependencies + FFmpeg + Google Chrome
4
+ RUN apt-get update && \
5
+ apt-get install -y \
6
+ ffmpeg \
 
 
7
  wget \
8
  gnupg \
9
+ libnss3 \
10
+ libnspr4 \
11
+ libatk1.0-0 \
12
+ libatk-bridge2.0-0 \
13
+ libcups2 \
14
+ libdrm2 \
15
+ libdbus-1-3 \
16
+ libxkbcommon0 \
17
+ libxcomposite1 \
18
+ libxdamage1 \
19
+ libxfixes3 \
20
+ libxrandr2 \
21
+ libgbm1 \
22
+ libasound2 \
23
+ libpango-1.0-0 \
24
+ libcairo2 \
25
+ && wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - \
26
+ && echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list \
27
+ && apt-get update \
28
+ && apt-get install -y google-chrome-stable \
29
+ && apt-get clean \
 
 
 
 
 
 
 
30
  && rm -rf /var/lib/apt/lists/*
31
 
32
+ # Set Chrome path for Remotion
33
  ENV CHROME_BIN=/usr/bin/google-chrome-stable
34
  ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true
35
  ENV PUPPETEER_EXECUTABLE_PATH=/usr/bin/google-chrome-stable
36
 
 
37
  WORKDIR /app
38
 
39
+ # Copy package files
40
  COPY package*.json ./
41
 
42
+ # Install dependencies
43
  RUN npm install
44
 
45
+ # Copy application files
46
  COPY . .
47
 
48
+ # Expose port
49
  EXPOSE 7860
50
 
51
+ # Start server
52
  CMD ["npm", "start"]