kapsikkum-unmanic – Blame information for rev 1

Subversion Repositories:
Rev:
Rev Author Line No. Line
1 office 1 FROM lsiobase/ubuntu:jammy
2 LABEL maintainer="Josh.5 <jsunnex@gmail.com>"
3  
4  
5 # Env variables
6 ENV \
7 LIBVA_DRIVERS_PATH="/usr/lib/x86_64-linux-gnu/dri" \
8 NVIDIA_DRIVER_CAPABILITIES="compute,video,utility" \
9 NVIDIA_VISIBLE_DEVICES="all"
10  
11  
12 # Install the runtime dependencies
13 # TODO: Remove intel-opencl-icd and replace with suggested build by Jellyfin
14 # https://jellyfin.org/docs/general/administration/hardware-acceleration.html
15 # https://github.com/jellyfin/jellyfin/blob/master/Dockerfile
16 RUN \
17 echo "**** Install build dependencies requirements ****" \
18 && apt-get update \
19 && apt-get install -y \
20 ca-certificates \
21 curl \
22 gnupg \
23 wget \
24 && \
25 echo "**** Install runtime packages ****" \
26 && apt-get install -y \
27 libexpat1=2.4.7-1ubuntu0.2 \
28 libglib2.0-0=2.72.4-0ubuntu2.2 \
29 libgomp1=12.3.0-1ubuntu1~22.04 \
30 libharfbuzz0b=2.7.4-1ubuntu3.1 \
31 libmediainfo0v5=21.09+dfsg-4 \
32 libv4l-0=1.22.1-2build1 \
33 libx11-6=2:1.7.5-1ubuntu0.3 \
34 libxcb1=1.14-3ubuntu3 \
35 libxext6=2:1.3.4-1build1 \
36 libxml2=2.9.13+dfsg-1ubuntu0.4 \
37 && \
38 echo "**** Install all available media acceleration packages ****" \
39 # va-driver-all:
40 # A meta-package for installing all available Video Acceleration API (VAAPI) drivers. Includes packages like:
41 # - i965-va-driver
42 # - intel-media-va-driver
43 # - mesa-va-drivers
44 # - libdrm2
45 # - etc
46 && apt-get install -y \
47 va-driver-all \
48 && \
49 echo "**** Install arch specific packages for $(uname -m) ****" \
50 && sleep 2 \
51 && \
52 if uname -m | grep -q x86; then \
53 echo "**** Add Intel Graphics repository ****" \
54 && wget -qO - https://repositories.intel.com/gpu/intel-graphics.key | gpg --dearmor --output /usr/share/keyrings/intel-graphics.gpg \
55 && echo "deb [arch=amd64,i386 signed-by=/usr/share/keyrings/intel-graphics.gpg] https://repositories.intel.com/gpu/ubuntu jammy client" | tee /etc/apt/sources.list.d/intel-gpu-jammy.list \
56 && \
57 echo "**** Install Intel Media Drivers ****" \
58 && apt-get update \
59 # intel-media-va-driver-non-free:
60 # This is the primary driver for Intel's Video Acceleration API on Linux, which provides support for video encoding and decoding on Intel graphics hardware.
61 # libigdgmm12:
62 # A part of the Intel Graphics Memory Management Library, which is used for managing graphics memory in an efficient and optimized way on Intel GPUs.
63 # libmfx1:
64 # This is a library for Intel Media SDK runtime. It is necessary for applications that use Intel Quick Sync Video technology.
65 # libmfxgen1:
66 # Similar to libmfx1, it's a part of the Intel Media SDK.
67 # libva-drm2 and libva2:
68 # These are additional libraries needed for VAAPI to interface with the Direct Rendering Manager (DRM) and to provide the main API for VAAPI.
69 # libvpl2:
70 # This is the successor to the Media SDK and provides a library for video processing.
71 && apt-get install -y \
72 intel-media-va-driver-non-free \
73 libigdgmm12 \
74 libmfx1 \
75 libmfxgen1 \
76 libva-drm2 \
77 libva2 \
78 libvpl2 \
79 && \
80 echo ; \
81 fi \
82 && \
83 echo "**** Install hardware info tools packages ****" \
84 # hwinfo:
85 # A hardware identification system that provides detailed information about all the hardware components of a computer.
86 # vainfo:
87 # This utility displays information about the VAAPI capabilities of your hardware.
88 && apt-get install -y \
89 hwinfo \
90 vainfo \
91 && \
92 echo "**** Section cleanup ****" \
93 && apt-get clean autoclean -y \
94 && apt-get autoremove -y \
95 && rm -rf \
96 /var/lib/apt/lists/* \
97 /var/tmp/* \
98 /tmp/*
99  
100  
101 # Install commonly used command line tools
102 ARG JELLYFIN_FFMPEG_VERSION="6"
103 ARG NODE_MAJOR="20"
104 RUN \
105 echo "**** Install FFmpeg for $(uname -m) ****" \
106 && sleep 2 \
107 && apt-get update \
108 && \
109 if uname -m | grep -q x86; then \
110 echo "**** Add Jellyfin repository ****" \
111 && wget -qO - https://repo.jellyfin.org/jellyfin_team.gpg.key | gpg --dearmor --output /usr/share/keyrings/jellyfin_team.gpg \
112 && echo "deb [arch=$( dpkg --print-architecture ) signed-by=/usr/share/keyrings/jellyfin_team.gpg] https://repo.jellyfin.org/ubuntu jammy main" | tee /etc/apt/sources.list.d/jellyfin.list \
113 && \
114 echo "**** Install jellyfin-ffmpeg and linked 3rd party libs ****" \
115 && apt-get update \
116 && apt-get install --no-install-recommends --no-install-suggests -y \
117 openssl \
118 locales \
119 && apt-get install -y \
120 jellyfin-ffmpeg${JELLYFIN_FFMPEG_VERSION} \
121 && ln -s /usr/lib/jellyfin-ffmpeg/ffmpeg /usr/local/bin/ffmpeg \
122 && ln -s /usr/lib/jellyfin-ffmpeg/ffprobe /usr/local/bin/ffprobe \
123 && \
124 echo ; \
125 fi \
126 && \
127 if uname -m | grep -q aarch64; then \
128 echo "**** Add Jellyfin repository ****" \
129 && wget -qO - https://repo.jellyfin.org/jellyfin_team.gpg.key | gpg --dearmor --output /usr/share/keyrings/jellyfin_team.gpg \
130 && echo "deb [arch=$( dpkg --print-architecture ) signed-by=/usr/share/keyrings/jellyfin_team.gpg] https://repo.jellyfin.org/ubuntu jammy main" | tee /etc/apt/sources.list.d/jellyfin.list \
131 && \
132 echo "**** Install jellyfin-ffmpeg and linked 3rd party libs ****" \
133 && apt-get update \
134 && apt-get install --no-install-recommends --no-install-suggests -y \
135 locales \
136 libssl-dev \
137 libfontconfig1 \
138 libfreetype6 \
139 libomxil-bellagio0 \
140 libomxil-bellagio-bin \
141 && apt-get install -y \
142 jellyfin-ffmpeg${JELLYFIN_FFMPEG_VERSION} \
143 && ln -s /usr/lib/jellyfin-ffmpeg/ffmpeg /usr/local/bin/ffmpeg \
144 && ln -s /usr/lib/jellyfin-ffmpeg/ffprobe /usr/local/bin/ffprobe \
145 && \
146 echo ; \
147 fi \
148 && \
149 echo "**** Install startup script requirements ****" \
150 && apt-get install -y \
151 jq \
152 nano \
153 sqlite3 \
154 && \
155 echo "**** Add NodeJS repository ****" \
156 && wget -qO - https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor --output /usr/share/keyrings/nodesource.gpg \
157 && echo "deb [signed-by=/usr/share/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list \
158 && \
159 echo "**** Install NodeJS for $(uname -m) ****" \
160 && apt-get update \
161 && apt-get install -y \
162 nodejs \
163 && \
164 echo "**** Install exiftool for $(uname -m) ****" \
165 && apt-get install -y \
166 libimage-exiftool-perl \
167 && \
168 echo "**** Section cleanup ****" \
169 && apt-get clean autoclean -y \
170 && apt-get autoremove -y \
171 && rm -rf \
172 /var/lib/apt/lists/* \
173 /var/tmp/* \
174 /tmp/*
175  
176  
177 # Add pip requirements
178 COPY /requirements.txt /tmp/requirements.txt
179  
180  
181 # Install Unmanic python dependencies.
182 RUN \
183 echo "**** Install Unmanic application dependencies ****" \
184 && sleep 2 \
185 && \
186 echo "**** Update sources ****" \
187 && apt-get update \
188 && \
189 echo "**** Install python ****" \
190 && apt-get install -y --no-install-recommends \
191 grc \
192 gcc \
193 python3 \
194 python3-dev \
195 python3-pip \
196 python3-setuptools \
197 unzip \
198 && \
199 echo "**** Install pip packages ****" \
200 && python3 -m pip install --no-cache-dir -r /tmp/requirements.txt \
201 && \
202 echo "**** Section cleanup ****" \
203 && apt-get clean autoclean -y \
204 && apt-get autoremove -y \
205 && rm -rf \
206 /var/lib/apt/lists/* \
207 /var/tmp/* \
208 /tmp/*
209  
210  
211 # Install pre-built Unmanic wheel
212 # Must first run `python3 ./setup.py bdist_wheel` on host to build package
213 COPY /dist/ /src/
214 RUN \
215 echo "**** Install Unmanic ****" \
216 && sleep 2 \
217 && \
218 echo "**** Install unmanic from pre-built wheel ****" \
219 && ls -l /src/ \
220 && python3 -m pip install --no-cache-dir /src/*.whl \
221 && \
222 echo "**** Move unmanic executable so we can wrap a bash script around it for developers ****" \
223 && mv -f /usr/local/bin/unmanic /usr/local/bin/unmanic-service \
224 && \
225 echo "**** Make default paths for unmanic library ****" \
226 && mkdir -p /library
227  
228  
229 # Add local files
230 COPY /docker/root /
231  
232  
233 # Unmanic runs on port 8888
234 EXPOSE 8888/tcp