-
Notifications
You must be signed in to change notification settings - Fork 86
Expand file tree
/
Copy pathDockerfile
More file actions
52 lines (45 loc) · 1.27 KB
/
Dockerfile
File metadata and controls
52 lines (45 loc) · 1.27 KB
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
FROM python:3-alpine
WORKDIR /app
COPY . /app
# Install Poetry
RUN set -eux; \
apk add --no-cache curl; \
\
curl -sSL https://install.python-poetry.org | python3 -
ENV PATH="/root/.local/bin:$PATH"
# Build GPAC and Bento4
RUN set -eux; \
apk add --no-cache git g++ make cmake zlib-dev coreutils; \
\
# Build and install GPAC
\
git clone --depth=1 https://github.com/gpac/gpac.git ./build/gpac || exit 1; \
cd ./build/gpac; \
./configure; \
make -j$(nproc); \
make install; \
MP4BOX_PATH=$(command -v MP4Box); \
if [ -n "$MP4BOX_PATH" ]; then ln -sf "$MP4BOX_PATH" "$(dirname "$MP4BOX_PATH")/mp4box"; fi; \
cd /app; \
\
# Build and install Bento4
\
git clone --depth=1 https://github.com/axiomatic-systems/Bento4.git ./build/Bento4 || exit 1; \
mkdir -p ./build/Bento4/cmakebuild; \
cd ./build/Bento4/cmakebuild; \
cmake -DCMAKE_BUILD_TYPE=Release ..; \
make -j$(nproc); \
make install; \
cd /app; \
\
# Clean up
\
rm -rf ./build; \
apk del git g++ make cmake zlib-dev coreutils;
# Install Python dependencies
RUN set -eux; \
apk add --no-cache ffmpeg; \
\
export PATH="/root/.local/bin:$PATH"; \
poetry install;
CMD ["poetry", "run", "python", "main.py"]