Skip to content

Commit 0899b34

Browse files
build(linux): add ubuntu 26.04 support (#5051)
1 parent 8362d58 commit 0899b34

4 files changed

Lines changed: 301 additions & 63 deletions

File tree

docker/ubuntu-26.04.dockerfile

Lines changed: 133 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,133 @@
1+
# syntax=docker/dockerfile:1
2+
# artifacts: true
3+
# platforms: linux/amd64,linux/arm64/v8
4+
# platforms_pr: linux/amd64
5+
# no-cache-filters: sunshine-base,artifacts,sunshine
6+
ARG BASE=ubuntu
7+
ARG TAG=26.04
8+
FROM ${BASE}:${TAG} AS sunshine-base
9+
10+
ENV DEBIAN_FRONTEND=noninteractive
11+
12+
FROM sunshine-base AS sunshine-deps
13+
14+
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
15+
16+
# Copy only the build script first for better layer caching
17+
WORKDIR /build/sunshine/
18+
COPY --link scripts/linux_build.sh ./scripts/linux_build.sh
19+
20+
# Install dependencies first - this layer will be cached
21+
RUN <<_DEPS
22+
#!/bin/bash
23+
set -e
24+
chmod +x ./scripts/linux_build.sh
25+
./scripts/linux_build.sh \
26+
--step=deps \
27+
--sudo-off
28+
apt-get clean
29+
rm -rf /var/lib/apt/lists/*
30+
_DEPS
31+
32+
FROM sunshine-deps AS sunshine-build
33+
34+
ARG BRANCH
35+
ARG BUILD_VERSION
36+
ARG COMMIT
37+
# note: BUILD_VERSION may be blank
38+
39+
ENV BRANCH=${BRANCH}
40+
ENV BUILD_VERSION=${BUILD_VERSION}
41+
ENV COMMIT=${COMMIT}
42+
43+
# Now copy the full repository
44+
COPY --link .. .
45+
46+
# Configure, validate, build and package
47+
RUN <<_BUILD
48+
#!/bin/bash
49+
set -e
50+
./scripts/linux_build.sh \
51+
--step=cmake \
52+
--publisher-name='LizardByte' \
53+
--publisher-website='https://app.lizardbyte.dev' \
54+
--publisher-issue-url='https://app.lizardbyte.dev/support' \
55+
--sudo-off
56+
57+
./scripts/linux_build.sh \
58+
--step=validation \
59+
--sudo-off
60+
61+
./scripts/linux_build.sh \
62+
--step=build \
63+
--sudo-off
64+
65+
./scripts/linux_build.sh \
66+
--step=package \
67+
--sudo-off
68+
_BUILD
69+
70+
# run tests
71+
WORKDIR /build/sunshine/build/tests
72+
RUN <<_TEST
73+
#!/bin/bash
74+
set -e
75+
export DISPLAY=:1
76+
Xvfb ${DISPLAY} -screen 0 1024x768x24 &
77+
./test_sunshine --gtest_color=yes
78+
_TEST
79+
80+
FROM sunshine-base AS sunshine
81+
82+
ARG BASE
83+
ARG TAG
84+
ARG TARGETARCH
85+
86+
# artifacts to be extracted in CI
87+
COPY --link --from=sunshine-build /build/sunshine/build/cpack_artifacts/Sunshine.deb /artifacts/sunshine-${BASE}-${TAG}-${TARGETARCH}.deb
88+
89+
# copy deb from builder
90+
COPY --link --from=sunshine-build /build/sunshine/build/cpack_artifacts/Sunshine.deb /sunshine.deb
91+
92+
# install sunshine
93+
RUN <<_INSTALL_SUNSHINE
94+
#!/bin/bash
95+
set -e
96+
apt-get update -y
97+
apt-get install -y --no-install-recommends /sunshine.deb
98+
apt-get clean
99+
rm -rf /var/lib/apt/lists/*
100+
_INSTALL_SUNSHINE
101+
102+
# network setup
103+
EXPOSE 47984-47990/tcp
104+
EXPOSE 48010
105+
EXPOSE 47998-48000/udp
106+
107+
# setup user
108+
ARG PGID=1001
109+
ENV PGID=${PGID}
110+
ARG PUID=1001
111+
ENV PUID=${PUID}
112+
ENV TZ="UTC"
113+
ARG UNAME=lizard
114+
ENV UNAME=${UNAME}
115+
116+
ENV HOME=/home/$UNAME
117+
118+
# setup user
119+
RUN <<_SETUP_USER
120+
#!/bin/bash
121+
set -e
122+
groupadd -f -g "${PGID}" "${UNAME}"
123+
useradd -lm -d ${HOME} -s /bin/bash -g "${PGID}" -u "${PUID}" "${UNAME}"
124+
mkdir -p ${HOME}/.config/sunshine
125+
ln -s ${HOME}/.config/sunshine /config
126+
chown -R ${UNAME} ${HOME}
127+
_SETUP_USER
128+
129+
USER ${UNAME}
130+
WORKDIR ${HOME}
131+
132+
# entrypoint
133+
ENTRYPOINT ["/usr/bin/sunshine"]

docs/building.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ Sunshine requires CUDA Toolkit for NVFBC capture. There are two caveats to CUDA:
6969

7070
1. The version installed depends on the version of GCC.
7171
2. The version of CUDA you use will determine compatibility with various GPU generations.
72-
At the time of writing, the recommended version to use is CUDA ~12.9.
72+
At the time of writing, the recommended version to use is CUDA ~13.1.
7373
See [CUDA compatibility](https://docs.nvidia.com/deploy/cuda-compatibility/index.html) for more info.
7474

7575
> [!NOTE]

docs/getting_started.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,8 @@ CUDA is used for NVFBC capture.
6868
<th>Package</th>
6969
</tr>
7070
<tr>
71-
<td rowspan="8">12.9.1</td>
72-
<td rowspan="8">575.57.08</td>
71+
<td rowspan="8">13.1.1</td>
72+
<td rowspan="8">590.48.01</td>
7373
<td rowspan="8">50;52;60;61;62;70;72;75;80;86;87;89;90;100;101;103;120;121</td>
7474
<td>sunshine.AppImage</td>
7575
</tr>

0 commit comments

Comments
 (0)