forked from feederbox826/stash-s6
-
Notifications
You must be signed in to change notification settings - Fork 0
/
hwaccel-base.Dockerfile
73 lines (68 loc) · 1.9 KB
/
hwaccel-base.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
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
# syntax=docker/dockerfile:1
FROM debian:bookworm
ARG DEBIAN_FRONTEND="noninteractive"
# debian environment variables
ENV HOME="/root" \
TZ="Etc/UTC" \
LANG="en_US.UTF-8" \
LANGUAGE="en_US:en" \
# stash environment variables
STASH_CONFIG_FILE="/config/config.yml" \
USER="stash" \
# python env
PIP_INSTALL_TARGET="/pip-install" \
PIP_CACHE_DIR="/pip-install/cache" \
PYTHONPATH=${PIP_INSTALL_TARGET} \
# hardware acceleration env
HWACCEL="NONE" \
NVIDIA_DRIVER_CAPABILITIES="compute,video,utility" \
NVIDIA_VISIBLE_DEVICES="all" \
# Logging
LOGGER_LEVEL="1"
RUN \
echo "**** setup stash user for render ****" && \
usermod -a -G video stash && \
echo "**** add contrib to sources ****" && \
sed -i 's/main/main contrib/g' /etc/apt/sources.list.d/debian.sources && \
echo "**** install apt-utils and locales ****" && \
apt-get update && \
apt-get install -y \
apt-utils \
locales && \
echo "**** install packages ****" && \
apt-get install -y \
--no-install-recommends \
--no-install-suggests \
ca-certificates \
curl \
gnupg \
gosu \
libvips-tools \
python3 \
python3-pip \
tzdata \
wget \
yq && \
echo "**** link su-exec to gosu ****" && \
ln -s /usr/sbin/gosu /sbin/su-exec && \
echo "**** generate locale ****" && \
locale-gen en_US.UTF-8 && \
echo "**** create stash user and make our folders ****" && \
useradd -u 1000 -U -d /config -s /bin/false stash && \
usermod -G users stash && \
mkdir -p \
/config \
/defaults && \
echo "**** cleanup ****" && \
apt-get autoremove && \
apt-get clean && \
rm -rf \
/tmp/* \
/var/lib/apt/lists/* \
/var/tmp/* \
/var/log/*
COPY stash/root/ /
COPY --from=stashapp/stash --chmod=755 /usr/bin/stash /app/stash
VOLUME /pip-install
EXPOSE 9999
CMD ["/bin/bash", "/opt/entrypoint.sh"]