-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
25 lines (23 loc) · 1023 Bytes
/
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
FROM sitespeedio/node:ubuntu-22-04-nodejs-20.10.0
ARG TARGETPLATFORM
ENV DEBIAN_FRONTEND noninteractive
# Lets install all dependencies for VisualMetrics
RUN export BUILD=$(if [ "$TARGETPLATFORM" = "linux/amd64" ] ; then echo "amd64"; else echo "arm64"; fi) \
buildDeps='wget ca-certificates build-essential' && \
apt-get update -y && apt-get install -y \
libjpeg-dev \
imagemagick \
python3 \
python3-dev \
python3-pip \
python-is-python3 \
xz-utils \
$buildDeps \
--no-install-recommends --force-yes && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* && \
python -m pip install --upgrade pip && \
python -m pip install --upgrade setuptools && \
python -m pip install pyssim OpenCV-Python Numpy image && \
wget https://johnvansickle.com/ffmpeg/releases/ffmpeg-release-$BUILD-static.tar.xz && \
tar --strip-components 1 -C /usr/bin -xf ffmpeg-release-$BUILD-static.tar.xz --wildcards ffmpeg*/ff* && \
rm ffmpeg-release-$BUILD-static.tar.xz && \
apt-get purge -y --auto-remove $buildDeps