mirror of
https://github.com/m1k1o/neko.git
synced 2024-07-24 14:40:50 +12:00
Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
8604a30744 | |||
957e893cf6 |
@ -4,9 +4,13 @@ FROM $BASE_IMAGE
|
|||||||
#
|
#
|
||||||
# install neko chromium
|
# install neko chromium
|
||||||
RUN set -eux; \
|
RUN set -eux; \
|
||||||
echo "deb http://ftp.de.debian.org/debian bookworm main" >> /etc/apt/sources.list; \
|
|
||||||
apt-get update; \
|
apt-get update; \
|
||||||
apt-get install -y --no-install-recommends unzip chromium chromium-common chromium-sandbox openbox; \
|
apt-get install -y --no-install-recommends software-properties-common; \
|
||||||
|
# chromium-browser from default repo needs snap to be installed
|
||||||
|
# and nvidia base is ubuntu not debian
|
||||||
|
add-apt-repository ppa:system76/pop; \
|
||||||
|
apt-get update; \
|
||||||
|
apt-get install -y --no-install-recommends unzip chromium openbox; \
|
||||||
#
|
#
|
||||||
# install widevine module
|
# install widevine module
|
||||||
CHROMIUM_DIR="/usr/lib/chromium"; \
|
CHROMIUM_DIR="/usr/lib/chromium"; \
|
||||||
|
@ -17,9 +17,22 @@ if [ ! -f "${BINARY_PATH}" ] || [ "$1" == "-r" ]; then
|
|||||||
./rebuild-server
|
./rebuild-server
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# if image starts with nvidia- add --gpus all
|
||||||
|
if [[ "${SERVER_TAG}" == "nvidia-"* ]]; then
|
||||||
|
GPU_FLAG="--gpus all"
|
||||||
|
echo "Nvidia GPU acceleration enabled"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# if image starts with intel- add --device /dev/dri
|
||||||
|
if [[ "${SERVER_TAG}" == "intel-"* ]]; then
|
||||||
|
GPU_FLAG="--device /dev/dri"
|
||||||
|
echo "Intel GPU acceleration enabled"
|
||||||
|
fi
|
||||||
|
|
||||||
# use --gpus all to enable GPU acceleration
|
# use --gpus all to enable GPU acceleration
|
||||||
docker run --rm -it \
|
docker run --rm -it \
|
||||||
--name "neko_dev" \
|
--name "neko_dev" \
|
||||||
|
$GPU_FLAG \
|
||||||
-p "${SERVER_PORT}:8080" \
|
-p "${SERVER_PORT}:8080" \
|
||||||
-p "${SERVER_EPR}:${SERVER_EPR}/udp" \
|
-p "${SERVER_EPR}:${SERVER_EPR}/udp" \
|
||||||
-e "NEKO_SCREEN=1920x1080@60" \
|
-e "NEKO_SCREEN=1920x1080@60" \
|
||||||
|
Reference in New Issue
Block a user