docker: updates to docker images (#942)

This commit is contained in:
ReenigneArcher
2023-02-20 15:03:03 -05:00
committed by GitHub
parent e5d5256aed
commit 77deff12a6
13 changed files with 96 additions and 379 deletions

View File

@@ -57,6 +57,8 @@ body:
- macOS - macOS
- Windows - Windows
- other, n/a - other, n/a
validations:
required: true
- type: input - type: input
id: os-version id: os-version
attributes: attributes:
@@ -73,11 +75,13 @@ body:
- 64 bit - 64 bit
- arm - arm
- other, n/a - other, n/a
validations:
required: true
- type: input - type: input
id: version id: version
attributes: attributes:
label: Sunshine commit or version label: Sunshine commit or version
placeholder: eg. 0.16.0 placeholder: eg. 0.18.0
validations: validations:
required: true required: true
- type: dropdown - type: dropdown
@@ -87,20 +91,28 @@ body:
description: The package you installed description: The package you installed
options: options:
- Linux - AppImage - Linux - AppImage
- Linux - AUR - Linux - AUR (Third Party)
- Linux - 20.04-deb - Linux - deb
- Linux - 22.04-deb
- Linux - Docker - Linux - Docker
- Linux - flatpak - Linux - flatpak
- Linux - nixpkgs (Third Party)
- Linux - PKGBUILD
- Linux - pkg.tar.zst
- Linux - rpm - Linux - rpm
- Linux - solus (Third Party)
- macOS - dmg - macOS - dmg
- macOS - Portfile - macOS - Portfile
- macOS - pkg - macOS - pkg
- Windows - Chocolatey (Third Party)
- Windows - installer - Windows - installer
- Windows - portable - Windows - portable
- Windows - Scoop (Third Party)
- Windows - Winget (Third Party)
- other (not listed) - other (not listed)
- other (self built) - other (self built)
- other (fork of this repo) - other (fork of this repo)
validations:
required: true
- type: dropdown - type: dropdown
id: graphics_type id: graphics_type
attributes: attributes:
@@ -111,6 +123,8 @@ body:
- Intel - Intel
- Nvidia - Nvidia
- none (software encoding) - none (software encoding)
validations:
required: true
- type: input - type: input
id: graphics_model id: graphics_model
attributes: attributes:
@@ -135,6 +149,24 @@ body:
placeholder: e.g. PipeWire/KVM/X11/KMS placeholder: e.g. PipeWire/KVM/X11/KMS
validations: validations:
required: false required: false
- type: textarea
id: config
attributes:
label: Config
description: |
Please copy and paste your config (`sunshine.conf`) file.
render: Shell
validations:
required: true
- type: textarea
id: apps
attributes:
label: Apps
description: |
If this is an issue with launching a game or app, please copy and paste your `apps.json` file.
render: json
validations:
required: false
- type: textarea - type: textarea
id: logs id: logs
attributes: attributes:
@@ -142,9 +174,6 @@ body:
description: | description: |
Please copy and paste any relevant log output. This will be automatically formatted into code, Please copy and paste any relevant log output. This will be automatically formatted into code,
so no need for backticks. so no need for backticks.
render: Shell render: shell
- type: markdown validations:
attributes: required: true
value: |
Make sure to close your issue when it's solved! If you found the solution yourself please comment
so that others benefit from it.

View File

@@ -269,7 +269,10 @@ jobs:
elif [[ $line == "# artifacts: "* && $ARTIFACTS == "" ]]; then elif [[ $line == "# artifacts: "* && $ARTIFACTS == "" ]]; then
# echo the line and use `sed` to remove the custom directive # echo the line and use `sed` to remove the custom directive
ARTIFACTS=$(echo -e "$line" | sed 's/# artifacts: //') ARTIFACTS=$(echo -e "$line" | sed 's/# artifacts: //')
elif [[ $PLATFORMS != "" && $ARTIFACTS != "" ]]; then elif [[ $line == "# no-cache-filters: "* && $NO_CACHE_FILTERS == "" ]]; then
# echo the line and use `sed` to remove the custom directive
NO_CACHE_FILTERS=$(echo -e "$line" | sed 's/# no-cache-filters: //')
elif [[ $PLATFORMS != "" && $ARTIFACTS != "" && $NO_CACHE_FILTERS != "" ]]; then
# break while loop once all custom directives are found # break while loop once all custom directives are found
break break
fi fi
@@ -290,6 +293,7 @@ jobs:
echo "clone_url=${CLONE_URL}" >> $GITHUB_OUTPUT echo "clone_url=${CLONE_URL}" >> $GITHUB_OUTPUT
echo "release=${RELEASE}" >> $GITHUB_OUTPUT echo "release=${RELEASE}" >> $GITHUB_OUTPUT
echo "artifacts=${ARTIFACTS}" >> $GITHUB_OUTPUT echo "artifacts=${ARTIFACTS}" >> $GITHUB_OUTPUT
echo "no_cache_filters=${NO_CACHE_FILTERS}" >> $GITHUB_OUTPUT
echo "platforms=${PLATFORMS}" >> $GITHUB_OUTPUT echo "platforms=${PLATFORMS}" >> $GITHUB_OUTPUT
echo "push=${PUSH}" >> $GITHUB_OUTPUT echo "push=${PUSH}" >> $GITHUB_OUTPUT
echo "tags=${TAGS}" >> $GITHUB_OUTPUT echo "tags=${TAGS}" >> $GITHUB_OUTPUT
@@ -345,6 +349,7 @@ jobs:
tags: ${{ steps.prepare.outputs.tags }} tags: ${{ steps.prepare.outputs.tags }}
cache-from: type=local,src=/tmp/.buildx-cache cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache
no-cache-filters: ${{ steps.prepare.outputs.no_cache_filters }}
- name: Build and push - name: Build and push
id: build id: build
@@ -361,13 +366,10 @@ jobs:
COMMIT=${{ steps.prepare.outputs.commit }} COMMIT=${{ steps.prepare.outputs.commit }}
CLONE_URL=${{ steps.prepare.outputs.clone_url }} CLONE_URL=${{ steps.prepare.outputs.clone_url }}
RELEASE=${{ steps.prepare.outputs.release }} RELEASE=${{ steps.prepare.outputs.release }}
secrets: |
"AUR_EMAIL=${{ secrets.AUR_EMAIL }}"
"AUR_SSH_PRIVATE_KEY=${{ secrets.AUR_SSH_PRIVATE_KEY }}"
"AUR_USERNAME=${{ secrets.AUR_USERNAME }}"
tags: ${{ steps.prepare.outputs.tags }} tags: ${{ steps.prepare.outputs.tags }}
cache-from: type=local,src=/tmp/.buildx-cache cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache
no-cache-filters: ${{ steps.prepare.outputs.no_cache_filters }}
- name: Arrange Artifacts - name: Arrange Artifacts
if: ${{ steps.prepare.outputs.artifacts == 'true' }} if: ${{ steps.prepare.outputs.artifacts == 'true' }}
@@ -378,6 +380,9 @@ jobs:
# https://unix.stackexchange.com/a/52816 # https://unix.stackexchange.com/a/52816
find ./ -type f -exec mv -t ./ -n '{}' + find ./ -type f -exec mv -t ./ -n '{}' +
# remove provenance file
rm -f ./provenance.json
- name: Upload Artifacts - name: Upload Artifacts
if: ${{ steps.prepare.outputs.artifacts == 'true' }} if: ${{ steps.prepare.outputs.artifacts == 'true' }}
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v3

View File

@@ -1,5 +1,10 @@
# Changelog # Changelog
## [0.18.4] - 2023-02-20
### Fixed
- (Linux/AUR) Drop support of AUR package
- (Docker) General enhancements to docker images
## [0.18.3] - 2023-02-13 ## [0.18.3] - 2023-02-13
### Added ### Added
- (Linux) Added PKGBUILD for Archlinux based distros to releases - (Linux) Added PKGBUILD for Archlinux based distros to releases

View File

@@ -123,10 +123,6 @@ Stats
:alt: GitHub stars :alt: GitHub stars
:target: https://github.com/LizardByte/Sunshine :target: https://github.com/LizardByte/Sunshine
.. image:: https://img.shields.io/badge/dynamic/json?color=blue&label=AUR&style=for-the-badge&query=$.results.0.NumVotes&url=https%3A%2F%2Fapp.lizardbyte.dev%2Funo%2Faur%2Fsunshine.json&logo=archlinux
:alt: AUR votes
:target: https://aur.archlinux.org/packages/sunshine
.. _nvenc support matrix: https://developer.nvidia.com/video-encode-and-decode-gpu-support-matrix-new .. _nvenc support matrix: https://developer.nvidia.com/video-encode-and-decode-gpu-support-matrix-new
.. _obs-amd hardware support: https://github.com/obsproject/obs-amd-encoder/wiki/Hardware-Support .. _obs-amd hardware support: https://github.com/obsproject/obs-amd-encoder/wiki/Hardware-Support
.. _VAAPI hardware support: https://www.intel.com/content/www/us/en/developer/articles/technical/linuxmedia-vaapi.html .. _VAAPI hardware support: https://www.intel.com/content/www/us/en/developer/articles/technical/linuxmedia-vaapi.html

View File

@@ -2,6 +2,7 @@
# artifacts: true # artifacts: true
# platforms: linux/amd64 # platforms: linux/amd64
# archlinux does not have an arm64 base image # archlinux does not have an arm64 base image
# no-cache-filters: sunshine-base,artifacts,sunshine
ARG BASE=archlinux ARG BASE=archlinux
ARG TAG=base-devel ARG TAG=base-devel
FROM ${BASE}:${TAG} AS sunshine-base FROM ${BASE}:${TAG} AS sunshine-base
@@ -11,31 +12,13 @@ RUN <<_DEPS
#!/bin/bash #!/bin/bash
set -e set -e
pacman -Syu --noconfirm \ pacman -Syu --noconfirm \
archlinux-keyring \ archlinux-keyring
git
_DEPS _DEPS
# Setup builder user, arch prevents running makepkg as root # Setup builder user, arch prevents running makepkg as root
RUN useradd -m builder && \ RUN useradd -m builder && \
echo 'builder ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers echo 'builder ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers
WORKDIR /home/builder # makepkg is used in sunshine-build and uploader build stages
USER builder
# install paru
WORKDIR /tmp
RUN git clone https://aur.archlinux.org/paru.git
WORKDIR /tmp/paru
RUN makepkg -si --noconfirm
# install optional dependencies
RUN paru -Syu --noconfirm \
cuda \
libcap \
libdrm
# switch back to root user, hadolint will complain if last user is root
# hadolint ignore=DL3002
USER root
FROM sunshine-base as sunshine-build FROM sunshine-base as sunshine-build
@@ -46,12 +29,16 @@ ARG CLONE_URL
SHELL ["/bin/bash", "-o", "pipefail", "-c"] SHELL ["/bin/bash", "-o", "pipefail", "-c"]
# install dependencies # install dependencies
# cuda, libcap, and libdrm are optional dependencies for PKGBUILD
RUN <<_DEPS RUN <<_DEPS
#!/bin/bash #!/bin/bash
set -e set -e
pacman -Syu --noconfirm \ pacman -Syu --noconfirm \
base-devel \ base-devel \
cmake \ cmake \
cuda \
libcap \
libdrm \
namcap namcap
_DEPS _DEPS
@@ -60,7 +47,7 @@ USER builder
# copy repository # copy repository
WORKDIR /build/sunshine/ WORKDIR /build/sunshine/
COPY .. . COPY --link .. .
# setup build directory # setup build directory
WORKDIR /build/sunshine/build WORKDIR /build/sunshine/build
@@ -97,96 +84,13 @@ _PKGBUILD
FROM scratch as artifacts FROM scratch as artifacts
COPY --from=sunshine-build /build/sunshine/pkg/PKGBUILD /PKGBUILD COPY --link --from=sunshine-build /build/sunshine/pkg/PKGBUILD /PKGBUILD
COPY --from=sunshine-build /build/sunshine/pkg/sunshine*.pkg.tar.zst /sunshine.pkg.tar.zst COPY --link --from=sunshine-build /build/sunshine/pkg/sunshine*.pkg.tar.zst /sunshine.pkg.tar.zst
FROM sunshine-base as uploader
# most of this stage is borrowed from
# https://github.com/KSXGitHub/github-actions-deploy-aur/blob/master/build.sh
ARG BUILD_VERSION
ARG RELEASE
ARG TARGETPLATFORM
# Setup builder user
WORKDIR /home/builder
USER builder
# hadolint ignore=SC3010
RUN <<_SSH_CONFIG
#!/bin/bash
set -e
if [[ "${TARGETPLATFORM}" == 'linux/amd64' ]]; then
echo "Host aur.archlinux.org"; echo " IdentityFile ~/.ssh/aur"; echo " User aur" >>~/.ssh/config
fi
_SSH_CONFIG
# create and apply secrets, hadolint is giving a false positive
# hadolint ignore=SC1133
RUN --mount=type=secret,id=AUR_EMAIL,target=/secrets/AUR_EMAIL \
--mount=type=secret,id=AUR_SSH_PRIVATE_KEY,target=/secrets/AUR_SSH_PRIVATE_KEY \
--mount=type=secret,id=AUR_USERNAME,target=/secrets/AUR_USERNAME && \
cat /secrets/AUR_SSH_PRIVATE_KEY >~/.ssh/aur && \
git config --global user.name "$(cat /secrets/AUR_USERNAME)" && \
git config --global user.email "$(cat /secrets/AUR_EMAIL)"
WORKDIR /tmp
# hadolint ignore=SC3010
RUN <<_AUR_SETUP
#!/bin/bash
set -e
if [[ "${TARGETPLATFORM}" == 'linux/amd64' ]]; then
# Adding aur.archlinux.org to known hosts
ssh_keyscan_types="rsa,dsa,ecdsa,ed25519"
ssh-keyscan -v -t "$ssh_keyscan_types" aur.archlinux.org >>~/.ssh/known_hosts
# Importing private key
chmod -vR 600 ~/.ssh/aur*
ssh-keygen -vy -f ~/.ssh/aur >~/.ssh/aur.pub
# Clone AUR package
mkdir -p /tmp/local-repo
git clone -v "https://aur.archlinux.org/sunshine.git" /tmp/local-repo
# Copy built package
COPY --from=artifacts /PRKBUILD /tmp/local-repo/
fi
_AUR_SETUP
WORKDIR /tmp/local-repo
# aur upload if release event
# hadolint ignore=SC3010
RUN <<_AUR_UPLOAD
#!/bin/bash
set -e
if [[ "${RELEASE}" == "true" && "${TARGETPLATFORM}" == 'linux/amd64' ]]; then
# update package checksums
updpkgsums
# generate srcinfo
makepkg --printsrcinfo >.SRCINFO
# commit changes
git add --all
# check if there are any changes and commit/push
if [[ $(git diff-index --quiet HEAD) != "" ]]; then
git commit -m "${BUILD_VERSION}"
git remote add aur "https://aur.archlinux.org/sunshine.git"
git push -v aur master
fi
fi
_AUR_UPLOAD
# remove secrets
RUN rm -rf /secrets
FROM sunshine-base as sunshine FROM sunshine-base as sunshine
COPY --from=artifacts /sunshine*.pkg.tar.zst /sunshine.pkg.tar.zst # copy from uploader instead of artifacts or uploader stage will not run
COPY --link --from=artifacts /sunshine.pkg.tar.zst /
# install sunshine # install sunshine
RUN <<_INSTALL_SUNSHINE RUN <<_INSTALL_SUNSHINE
@@ -216,7 +120,7 @@ ENV HOME=/home/$UNAME
RUN <<_SETUP_USER RUN <<_SETUP_USER
#!/bin/bash #!/bin/bash
set -e set -e
# first delete the builder # first delete the builder user
userdel -r builder userdel -r builder
# then create the lizard user # then create the lizard user

View File

@@ -2,6 +2,7 @@
# artifacts: true # artifacts: true
# platforms: linux/amd64,linux/arm64/v8 # platforms: linux/amd64,linux/arm64/v8
# platforms_pr: linux/amd64 # platforms_pr: linux/amd64
# no-cache-filters: sunshine-base,artifacts,sunshine
ARG BASE=debian ARG BASE=debian
ARG TAG=bullseye ARG TAG=bullseye
FROM ${BASE}:${TAG} AS sunshine-base FROM ${BASE}:${TAG} AS sunshine-base
@@ -80,7 +81,7 @@ _INSTALL_CUDA
# copy repository # copy repository
WORKDIR /build/sunshine/ WORKDIR /build/sunshine/
COPY .. . COPY --link .. .
# setup npm dependencies # setup npm dependencies
RUN npm install RUN npm install
@@ -111,12 +112,12 @@ FROM scratch AS artifacts
ARG BASE ARG BASE
ARG TAG ARG TAG
ARG TARGETARCH ARG TARGETARCH
COPY --from=sunshine-build /build/sunshine/build/cpack_artifacts/Sunshine.deb /sunshine-${BASE}-${TAG}-${TARGETARCH}.deb COPY --link --from=sunshine-build /build/sunshine/build/cpack_artifacts/Sunshine.deb /sunshine-${BASE}-${TAG}-${TARGETARCH}.deb
FROM sunshine-base as sunshine FROM sunshine-base as sunshine
# copy deb from builder # copy deb from builder
COPY --from=artifacts /sunshine*.deb /sunshine.deb COPY --link --from=artifacts /sunshine*.deb /sunshine.deb
# install sunshine # install sunshine
RUN <<_INSTALL_SUNSHINE RUN <<_INSTALL_SUNSHINE

View File

@@ -2,6 +2,7 @@
# artifacts: true # artifacts: true
# platforms: linux/amd64,linux/arm64/v8 # platforms: linux/amd64,linux/arm64/v8
# platforms_pr: linux/amd64 # platforms_pr: linux/amd64
# no-cache-filters: sunshine-base,artifacts,sunshine
ARG BASE=fedora ARG BASE=fedora
ARG TAG=36 ARG TAG=36
FROM ${BASE}:${TAG} AS sunshine-base FROM ${BASE}:${TAG} AS sunshine-base
@@ -78,7 +79,7 @@ _INSTALL_CUDA
# copy repository # copy repository
WORKDIR /build/sunshine/ WORKDIR /build/sunshine/
COPY .. . COPY --link .. .
# setup npm dependencies # setup npm dependencies
RUN npm install RUN npm install
@@ -109,12 +110,12 @@ FROM scratch AS artifacts
ARG BASE ARG BASE
ARG TAG ARG TAG
ARG TARGETARCH ARG TARGETARCH
COPY --from=sunshine-build /build/sunshine/build/cpack_artifacts/Sunshine.rpm /sunshine-${BASE}-${TAG}-${TARGETARCH}.rpm COPY --link --from=sunshine-build /build/sunshine/build/cpack_artifacts/Sunshine.rpm /sunshine-${BASE}-${TAG}-${TARGETARCH}.rpm
FROM sunshine-base as sunshine FROM sunshine-base as sunshine
# copy deb from builder # copy deb from builder
COPY --from=artifacts /sunshine*.rpm /sunshine.rpm COPY --link --from=artifacts /sunshine*.rpm /sunshine.rpm
# install sunshine # install sunshine
RUN <<_INSTALL_SUNSHINE RUN <<_INSTALL_SUNSHINE

View File

@@ -2,6 +2,7 @@
# artifacts: true # artifacts: true
# platforms: linux/amd64,linux/arm64/v8 # platforms: linux/amd64,linux/arm64/v8
# platforms_pr: linux/amd64 # platforms_pr: linux/amd64
# no-cache-filters: sunshine-base,artifacts,sunshine
ARG BASE=fedora ARG BASE=fedora
ARG TAG=37 ARG TAG=37
FROM ${BASE}:${TAG} AS sunshine-base FROM ${BASE}:${TAG} AS sunshine-base
@@ -78,7 +79,7 @@ _INSTALL_CUDA
# copy repository # copy repository
WORKDIR /build/sunshine/ WORKDIR /build/sunshine/
COPY .. . COPY --link .. .
# setup npm dependencies # setup npm dependencies
RUN npm install RUN npm install
@@ -109,12 +110,12 @@ FROM scratch AS artifacts
ARG BASE ARG BASE
ARG TAG ARG TAG
ARG TARGETARCH ARG TARGETARCH
COPY --from=sunshine-build /build/sunshine/build/cpack_artifacts/Sunshine.rpm /sunshine-${BASE}-${TAG}-${TARGETARCH}.rpm COPY --link --from=sunshine-build /build/sunshine/build/cpack_artifacts/Sunshine.rpm /sunshine-${BASE}-${TAG}-${TARGETARCH}.rpm
FROM sunshine-base as sunshine FROM sunshine-base as sunshine
# copy deb from builder # copy deb from builder
COPY --from=artifacts /sunshine*.rpm /sunshine.rpm COPY --link --from=artifacts /sunshine*.rpm /sunshine.rpm
# install sunshine # install sunshine
RUN <<_INSTALL_SUNSHINE RUN <<_INSTALL_SUNSHINE

View File

@@ -1,218 +0,0 @@
# syntax=docker/dockerfile:1.4
# artifacts: true
# platforms: linux/amd64,linux/arm64/v8
# platforms_pr: linux/amd64
ARG BASE=ubuntu
ARG TAG=18.04
FROM ${BASE}:${TAG} AS sunshine-base
ENV DEBIAN_FRONTEND=noninteractive
FROM sunshine-base as sunshine-build
ARG TARGETPLATFORM
RUN echo "target_platform: ${TARGETPLATFORM}"
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
# install dependencies
RUN <<_DEPS
#!/bin/bash
set -e
apt-get update -y
apt-get install -y --no-install-recommends \
software-properties-common=0.96.24.32.18
add-apt-repository ppa:ubuntu-toolchain-r/test
apt-get install -y --no-install-recommends \
bison=2:3.0.4* \
build-essential=12.4* \
gcc-10=10.3.0* \
g++-10=10.3.0* \
libavdevice-dev=7:3.4.* \
libcap-dev=1:2.25* \
libcurl-openssl1.0-dev=7.58.0* \
libdrm-dev=2.4.101* \
libevdev-dev=1.5.8* \
libnuma-dev=2.0.11* \
libopus-dev=1.1.2* \
libpulse-dev=1:11.1* \
libssl1.0-dev=1.0.2* \
libva-dev=2.1.0* \
libvdpau-dev=1.1.1* \
libwayland-dev=1.16.0* \
libx11-dev=2:1.6.4* \
libxcb-shm0-dev=1.13* \
libxcb-xfixes0-dev=1.13* \
libxcb1-dev=1.13* \
libxfixes-dev=1:5.0.3* \
libxrandr-dev=2:1.5.1* \
libxtst-dev=2:1.2.3* \
npm=3.5.2* \
node-gyp=3.6.2* \
nodejs-dev=8.10.0* \
wget=1.19.4*
apt-get clean
rm -rf /var/lib/apt/lists/*
_DEPS
# Update gcc alias
# https://stackoverflow.com/a/70653945/11214013
RUN <<_GCC_ALIAS
#!/bin/bash
set -e
update-alternatives --install \
/usr/bin/gcc gcc /usr/bin/gcc-10 100 \
--slave /usr/bin/g++ g++ /usr/bin/g++-10 \
--slave /usr/bin/gcov gcov /usr/bin/gcov-10 \
--slave /usr/bin/gcc-ar gcc-ar /usr/bin/gcc-ar-10 \
--slave /usr/bin/gcc-ranlib gcc-ranlib /usr/bin/gcc-ranlib-10
_GCC_ALIAS
# install boost
# cannot install boost for aarch64 using ppa:savoury1/boost-defaults-1.71
# otherwise add the repository and the following packages
# libboost-filesystem1.71-dev=1.71.0* \
# libboost-log1.71-dev=1.71.0* \
# libboost-program-options1.71-dev=1.71.0* \
# libboost-regex1.71-dev=1.71.0* \
# libboost-thread1.71-dev=1.71.0* \
WORKDIR /build/tmp
RUN <<_INSTALL_BOOST
url="https://boostorg.jfrog.io/artifactory/main/release/1.74.0/source/boost_1_74_0.tar.bz2"
wget "${url}" --progress=bar:force:noscroll -q --show-progress -O ./boost.tar.bz2
tar --bzip2 -xf boost.tar.bz2 --directory /build
mv /build/boost_*/ /build/boost
ls -a /build/boost
cd /build/boost
./bootstrap.sh --with-libraries=system,thread,log,program_options && \
./b2 install variant=release link=static,shared runtime-link=shared -j "$(nproc)"
_INSTALL_BOOST
# install cmake
# sunshine requires cmake >= 3.18
WORKDIR /build/cmake
# https://cmake.org/download/
ENV CMAKE_VERSION="3.25.1"
# hadolint ignore=SC3010
RUN <<_INSTALL_CMAKE
#!/bin/bash
set -e
cmake_prefix="https://github.com/Kitware/CMake/releases/download/v"
if [[ "${TARGETPLATFORM}" == 'linux/amd64' ]]; then
cmake_arch="x86_64"
elif [[ "${TARGETPLATFORM}" == 'linux/arm64' ]]; then
cmake_arch="aarch64"
fi
url="${cmake_prefix}${CMAKE_VERSION}/cmake-${CMAKE_VERSION}-linux-${cmake_arch}.sh"
echo "cmake url: ${url}"
wget "$url" --progress=bar:force:noscroll -q --show-progress -O ./cmake.sh
sh ./cmake.sh --prefix=/usr/local --skip-license
cmake --version
_INSTALL_CMAKE
# install cuda
WORKDIR /build/cuda
# versions: https://developer.nvidia.com/cuda-toolkit-archive
ENV CUDA_VERSION="11.8.0"
ENV CUDA_BUILD="520.61.05"
# hadolint ignore=SC3010
RUN <<_INSTALL_CUDA
#!/bin/bash
set -e
cuda_prefix="https://developer.download.nvidia.com/compute/cuda/"
cuda_suffix=""
if [[ "${TARGETPLATFORM}" == 'linux/arm64' ]]; then
cuda_suffix="_sbsa"
fi
url="${cuda_prefix}${CUDA_VERSION}/local_installers/cuda_${CUDA_VERSION}_${CUDA_BUILD}_linux${cuda_suffix}.run"
echo "cuda url: ${url}"
wget "$url" --progress=bar:force:noscroll -q --show-progress -O ./cuda.run
chmod a+x ./cuda.run
./cuda.run --silent --toolkit --toolkitpath=/build/cuda --no-opengl-libs --no-man-page --no-drm
rm ./cuda.run
_INSTALL_CUDA
# todo - install libmfx
# https://github.com/Intel-Media-SDK/MediaSDK
# copy repository
WORKDIR /build/sunshine/
COPY .. .
# setup npm dependencies
RUN npm install
# setup build directory
WORKDIR /build/sunshine/build
# cmake and cpack
RUN <<_MAKE
#!/bin/bash
set -e
cmake \
-DCMAKE_CUDA_COMPILER:PATH=/build/cuda/bin/nvcc \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr \
-DSUNSHINE_ASSETS_DIR=share/sunshine \
-DSUNSHINE_EXECUTABLE_PATH=/usr/bin/sunshine \
-DSUNSHINE_ENABLE_WAYLAND=ON \
-DSUNSHINE_ENABLE_X11=ON \
-DSUNSHINE_ENABLE_DRM=ON \
-DSUNSHINE_ENABLE_CUDA=ON \
/build/sunshine
make -j "$(nproc)"
cpack -G DEB
_MAKE
FROM scratch AS artifacts
ARG BASE
ARG TAG
ARG TARGETARCH
COPY --from=sunshine-build /build/sunshine/build/cpack_artifacts/Sunshine.deb /sunshine-${BASE}-${TAG}-${TARGETARCH}.deb
FROM sunshine-base as sunshine
# copy deb from builder
COPY --from=artifacts /sunshine*.deb /sunshine.deb
# install sunshine
RUN <<_INSTALL_SUNSHINE
#!/bin/bash
set -e
apt-get update -y
apt-get install -y --no-install-recommends /sunshine.deb
apt-get clean
rm -rf /var/lib/apt/lists/*
_INSTALL_SUNSHINE
# network setup
EXPOSE 47984-47990/tcp
EXPOSE 48010
EXPOSE 47998-48000/udp
# setup user
ARG PGID=1000
ENV PGID=${PGID}
ARG PUID=1000
ENV PUID=${PUID}
ENV TZ="UTC"
ARG UNAME=lizard
ENV UNAME=${UNAME}
ENV HOME=/home/$UNAME
# setup user
RUN <<_SETUP_USER
#!/bin/bash
set -e
groupadd -f -g "${PGID}" "${UNAME}"
useradd -lm -d ${HOME} -s /bin/bash -g "${PGID}" -G input -u "${PUID}" "${UNAME}"
mkdir -p ${HOME}/.config/sunshine
ln -s ${HOME}/.config/sunshine /config
chown -R ${UNAME} ${HOME}
_SETUP_USER
USER ${UNAME}
WORKDIR ${HOME}
# entrypoint
ENTRYPOINT ["/usr/bin/sunshine"]

View File

@@ -2,6 +2,7 @@
# artifacts: true # artifacts: true
# platforms: linux/amd64,linux/arm64/v8 # platforms: linux/amd64,linux/arm64/v8
# platforms_pr: linux/amd64 # platforms_pr: linux/amd64
# no-cache-filters: sunshine-base,artifacts,sunshine
ARG BASE=ubuntu ARG BASE=ubuntu
ARG TAG=20.04 ARG TAG=20.04
FROM ${BASE}:${TAG} AS sunshine-base FROM ${BASE}:${TAG} AS sunshine-base
@@ -116,7 +117,7 @@ _INSTALL_CUDA
# copy repository # copy repository
WORKDIR /build/sunshine/ WORKDIR /build/sunshine/
COPY .. . COPY --link .. .
# setup npm dependencies # setup npm dependencies
RUN npm install RUN npm install
@@ -147,12 +148,12 @@ FROM scratch AS artifacts
ARG BASE ARG BASE
ARG TAG ARG TAG
ARG TARGETARCH ARG TARGETARCH
COPY --from=sunshine-build /build/sunshine/build/cpack_artifacts/Sunshine.deb /sunshine-${BASE}-${TAG}-${TARGETARCH}.deb COPY --link --from=sunshine-build /build/sunshine/build/cpack_artifacts/Sunshine.deb /sunshine-${BASE}-${TAG}-${TARGETARCH}.deb
FROM sunshine-base as sunshine FROM sunshine-base as sunshine
# copy deb from builder # copy deb from builder
COPY --from=artifacts /sunshine*.deb /sunshine.deb COPY --link --from=artifacts /sunshine*.deb /sunshine.deb
# install sunshine # install sunshine
RUN <<_INSTALL_SUNSHINE RUN <<_INSTALL_SUNSHINE

View File

@@ -2,6 +2,7 @@
# artifacts: true # artifacts: true
# platforms: linux/amd64,linux/arm64/v8 # platforms: linux/amd64,linux/arm64/v8
# platforms_pr: linux/amd64 # platforms_pr: linux/amd64
# no-cache-filters: sunshine-base,artifacts,sunshine
ARG BASE=ubuntu ARG BASE=ubuntu
ARG TAG=22.04 ARG TAG=22.04
FROM ${BASE}:${TAG} AS sunshine-base FROM ${BASE}:${TAG} AS sunshine-base
@@ -80,7 +81,7 @@ _INSTALL_CUDA
# copy repository # copy repository
WORKDIR /build/sunshine/ WORKDIR /build/sunshine/
COPY .. . COPY --link .. .
# setup npm dependencies # setup npm dependencies
RUN npm install RUN npm install
@@ -111,12 +112,12 @@ FROM scratch AS artifacts
ARG BASE ARG BASE
ARG TAG ARG TAG
ARG TARGETARCH ARG TARGETARCH
COPY --from=sunshine-build /build/sunshine/build/cpack_artifacts/Sunshine.deb /sunshine-${BASE}-${TAG}-${TARGETARCH}.deb COPY --link --from=sunshine-build /build/sunshine/build/cpack_artifacts/Sunshine.deb /sunshine-${BASE}-${TAG}-${TARGETARCH}.deb
FROM sunshine-base as sunshine FROM sunshine-base as sunshine
# copy deb from builder # copy deb from builder
COPY --from=artifacts /sunshine*.deb /sunshine.deb COPY --link --from=artifacts /sunshine*.deb /sunshine.deb
# install sunshine # install sunshine
RUN <<_INSTALL_SUNSHINE RUN <<_INSTALL_SUNSHINE

View File

@@ -35,8 +35,7 @@ CUDA is used for NVFBC capture.
=========================================== ============== ============== ================================ =========================================== ============== ============== ================================
Package CUDA Version Min Driver CUDA Compute Capabilities Package CUDA Version Min Driver CUDA Compute Capabilities
=========================================== ============== ============== ================================ =========================================== ============== ============== ================================
https://aur.archlinux.org/packages/sunshine User dependent User dependent User dependent PKGBUILD User dependent User dependent User dependent
PKGBUILD 11.8.0 450.80.02 50;52;60;61;62;70;75;80;86;90;35
sunshine.AppImage 11.8.0 450.80.02 50;52;60;61;62;70;75;80;86;90;35 sunshine.AppImage 11.8.0 450.80.02 50;52;60;61;62;70;75;80;86;90;35
sunshine.pkg.tar.zst 11.8.0 450.80.02 50;52;60;61;62;70;75;80;86;90;35 sunshine.pkg.tar.zst 11.8.0 450.80.02 50;52;60;61;62;70;75;80;86;90;35
sunshine_{arch}.flatpak 11.8.0 450.80.02 50;52;60;61;62;70;75;80;86;90;35 sunshine_{arch}.flatpak 11.8.0 450.80.02 50;52;60;61;62;70;75;80;86;90;35
@@ -80,21 +79,6 @@ Uninstall:
./sunshine.AppImage --remove ./sunshine.AppImage --remove
Archlinux AUR Package
^^^^^^^^^^^^^^^^^^^^^
#. Open terminal and run the following code.
.. code-block:: bash
git clone https://aur.archlinux.org/sunshine.git
cd sunshine
makepkg -fi
Uninstall:
.. code-block:: bash
pacman -R sunshine
Archlinux PKGBUILD Archlinux PKGBUILD
^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^
#. Open terminal and run the following code. #. Open terminal and run the following code.

View File

@@ -3,10 +3,17 @@ Third Party Packages
.. Danger:: These packages are not maintained by LizardByte. Use at your own risk. .. Danger:: These packages are not maintained by LizardByte. Use at your own risk.
AUR
---
.. image:: https://img.shields.io/badge/dynamic/json?color=blue&label=AUR&style=for-the-badge&query=$.results.0.NumVotes&url=https%3A%2F%2Fapp.lizardbyte.dev%2Funo%2Faur%2Fsunshine.json&logo=archlinux
:alt: AUR votes
:target: https://aur.archlinux.org/packages/sunshine
Chocolatey Chocolatey
---------- ----------
.. image:: https://img.shields.io/chocolatey/v/Sunshine?style=for-the-badge&logo=chocolatey .. image:: https://img.shields.io/chocolatey/v/sunshine?style=for-the-badge&logo=chocolatey
:alt: Chocolatey Version :alt: Chocolatey Version
:target: https://community.chocolatey.org/packages/sunshine :target: https://community.chocolatey.org/packages/sunshine