-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile copy
50 lines (45 loc) · 1.09 KB
/
Dockerfile copy
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
# Use an official lightweight Python Alpine image
FROM python:3.9-alpine
# Copy only necessary files
COPY ./app.py /app/
COPY ./requirements.txt /app/
# Install system packages, build tools, and python dependencies
RUN apk update && \
# Basic build dependencies
apk add --no-cache \
gcc \
g++ \
make \
musl-dev \
python3-dev \
# For numpy and scipy (linear algebra libraries)
openblas-dev \
# For Pillow (image processing)
zlib-dev \
jpeg-dev \
freetype-dev \
lcms2-dev \
openjpeg-dev \
tiff-dev \
tk-dev \
tcl-dev \
ninja \
nasm \
doxygen \
# Install python packages
&& pip install --no-cache-dir -r /app/requirements.txt \
git clone https://github.com/Netflix/vmaf.git \
cd vmaf \
pip install meson \
meson build --buildtype release \
ninja -vC build -v \
ninja -vC build test -v \
cd .. \
git clone https://github.com/FFmpeg/FFmpeg.git \
./configure --enable-libvmaf \
make -j4 \
make install
# Set the working directory
WORKDIR /app
# Run your script
CMD ["python", "app.py"]