forked from vpalmisano/webrtcperf
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
111 lines (102 loc) · 3.53 KB
/
Dockerfile
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
FROM ubuntu:jammy
LABEL org.opencontainers.image.title webrtcperf
LABEL org.opencontainers.image.description WebRTC performance and quality evaluation tool.
LABEL org.opencontainers.image.source https://github.com/vpalmisano/webrtcperf
LABEL org.opencontainers.image.authors Vittorio Palmisano <[email protected]>
RUN \
apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
git \
python3 \
bash \
ffmpeg \
curl \
xvfb \
unzip \
procps \
xauth \
sudo \
net-tools \
iproute2 \
mesa-va-drivers \
gnupg \
apt-utils \
apt-transport-https \
ca-certificates \
fonts-liberation \
libasound2 \
libatk-bridge2.0-0 \
libatk1.0-0 \
libc6 \
libcairo2 \
libcups2 \
libdbus-1-3 \
libexpat1 \
libfontconfig1 \
libgbm1 \
libgcc1 \
libglib2.0-0 \
libgtk-3-0 \
libnspr4 \
libnss3 \
libpango-1.0-0 \
libpangocairo-1.0-0 \
libstdc++6 \
libx11-6 \
libx11-xcb1 \
libxcb1 \
libxcomposite1 \
libxcursor1 \
libxdamage1 \
libxext6 \
libxfixes3 \
libxi6 \
libxrandr2 \
libxrender1 \
libxss1 \
libxtst6 \
libvulkan1 \
lsb-release \
openssl \
wget \
xdg-utils \
libgles1 \
libgles2 \
libegl1 \
libegl1-mesa \
fonts-noto-color-emoji \
libu2f-udev
RUN \
curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash -; \
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -; \
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list; \
wget -q -O- https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/3bf863cc.pub | gpg --dearmor -o /usr/share/keyrings/nvidia-drivers.gpg; \
echo 'deb [signed-by=/usr/share/keyrings/nvidia-drivers.gpg] https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/ /' | sudo tee /etc/apt/sources.list.d/nvidia-drivers.list; \
apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
nodejs \
yarn \
libnvidia-gl-515 \
nvidia-utils-515
# RUN wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | sudo apt-key add -; \
# echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" > /etc/apt/sources.list.d/google-chrome.list; \
# apt-get update && apt-get install -y google-chrome-stable && apt-get clean
# chromium-browser-unstable
RUN curl -Lo /chromium-browser-unstable.deb "https://github.com/vpalmisano/webrtcperf/releases/download/chromium-115.0.5782/chromium-browser-unstable_115.0.5782.0-1_amd64.deb"
RUN dpkg -i /chromium-browser-unstable.deb && rm chromium-browser-unstable.deb
RUN apt-get clean \
&& rm -rf /var/cache/apt/* \
&& rm -rf /var/lib/apt/lists/*
RUN mkdir -p /app/
RUN curl -Lo /app/video.mp4 "https://github.com/vpalmisano/webrtcperf/releases/download/v2.0.4/video.mp4" \
&& ffprobe /app/video.mp4
#
WORKDIR /app
ENV DEBUG_LEVEL=WARN
ENV VIDEO_PATH=/app/video.mp4
ENV CHROMIUM_PATH=/usr/bin/chromium-browser-unstable
ENTRYPOINT ["/app/entrypoint.sh"]
COPY package.json yarn.lock /app/
RUN PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true yarn --production=true
COPY scripts /app/scripts/
COPY app.min.js entrypoint.sh /app/