-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
83 lines (65 loc) · 2 KB
/
Dockerfile
File metadata and controls
83 lines (65 loc) · 2 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
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
# Build stage
FROM oven/bun:1 AS builder
WORKDIR /app
COPY package.json ./
RUN bun install
COPY src/ ./src/
COPY public/ ./public/
RUN bun build src/index.ts --outfile rabbit-encoder --target bun --compile --production
# Runtime stage
FROM debian:13-slim
USER root
ENV DEBIAN_FRONTEND=noninteractive
ENV RUSTICL_ENABLE=radeonsi,iris
# Install packages
RUN apt-get update && apt-get install -y --no-install-recommends \
ca-certificates \
curl \
gpgv \
&& rm -rf /var/lib/apt/lists/*
# Install deb-multimedia keyring
RUN curl -fsSLo /tmp/deb-multimedia-keyring.deb \
https://www.deb-multimedia.org/pool/main/d/deb-multimedia-keyring/deb-multimedia-keyring_2024.9.1_all.deb \
&& dpkg -i /tmp/deb-multimedia-keyring.deb \
&& rm -f /tmp/deb-multimedia-keyring.deb
RUN cat >/etc/apt/sources.list.d/dmo.sources <<'EOF'
Types: deb
URIs: https://www.deb-multimedia.org
Suites: trixie
Components: main non-free
Signed-By: /usr/share/keyrings/deb-multimedia-keyring.pgp
Enabled: yes
EOF
# Install packages
RUN apt-get update && apt-get install -y --no-install-recommends \
python3 \
python3-pip \
vapoursynth \
python3-vapoursynth-jetpack \
vapoursynth-akarin \
vapoursynth-ffms2 \
ffmpeg \
mediainfo \
opus-tools \
mkvtoolnix \
ocl-icd-libopencl1 \
mesa-opencl-icd \
&& pip3 install --no-cache-dir --break-system-packages --no-deps vstools \
&& rm -f /etc/OpenCL/vendors/mesa.icd \
&& rm -rf /var/lib/apt/lists/*
# Copy binaries
COPY binaries/ /app/binaries/
RUN chmod +x /app/binaries/language-detector /app/binaries/x86_64_v2/SvtAv1EncApp /app/binaries/x86_64_v3/SvtAv1EncApp
# Entrypoint
COPY docker/entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
# Auto-Boost-Essential script
RUN mkdir -p /opt/Auto-Boost-Essential
COPY scripts/Auto-Boost-Essential.py /opt/Auto-Boost-Essential/
# Application
WORKDIR /app
COPY --from=builder /app/rabbit-encoder /app/
RUN mkdir -p /data/input /data/output /data/temp
EXPOSE 3000
ENTRYPOINT ["/entrypoint.sh"]
CMD ["/app/rabbit-encoder"]