-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDockerfile.v132
48 lines (39 loc) · 1.35 KB
/
Dockerfile.v132
1
2
3
4
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
41
42
43
44
45
46
47
48
FROM nvidia/opengl:1.2-glvnd-runtime-ubuntu20.04
# Set noninteractive installation
ENV DEBIAN_FRONTEND=noninteractive
# install curl for nodejs package
RUN apt-get update
RUN apt-get install -y curl wget gnupg
# Install specific version of Chrome
# https://www.ubuntuupdates.org/package/google_chrome/stable/main/base/google-chrome-stable
RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - && \
echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list && \
apt-get update && \
apt-get install -y google-chrome-stable=132.0.6834.* && \
apt-mark hold google-chrome-stable
# set node source
RUN curl -sL https://deb.nodesource.com/setup_16.x -o nodesource_setup.sh
RUN bash nodesource_setup.sh
# install dependencies
RUN DEBIAN_FRONTEND=noninteractive \
apt-get install -y \
xorg \
xserver-xorg \
xvfb \
libx11-dev \
libxext-dev \
nodejs
RUN npm install --global yarn
# tells puppeteer to use the chrome binaries
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true \
PUPPETEER_EXECUTABLE_PATH=/usr/bin/google-chrome
# instructs the container to have access to all the GPUs
ENV NVIDIA_VISIBLE_DEVICES all
ENV NVIDIA_DRIVER_CAPABILITIES all
# setup modules & project
WORKDIR /app
RUN rm -rf *
COPY package.json ./
COPY yarn.lock ./
RUN yarn install
COPY . .