Skip to content

Commit

Permalink
build(docker): add fedora 39 and drop fedora 37 (#1827)
Browse files Browse the repository at this point in the history
  • Loading branch information
ReenigneArcher authored Dec 11, 2023
1 parent ef9ec40 commit 88fc8f8
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 29 deletions.
56 changes: 29 additions & 27 deletions docker/fedora-37.dockerfile → docker/fedora-39.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# platforms_pr: linux/amd64
# no-cache-filters: sunshine-base,artifacts,sunshine
ARG BASE=fedora
ARG TAG=37
ARG TAG=39
FROM ${BASE}:${TAG} AS sunshine-base

FROM sunshine-base as sunshine-build
Expand All @@ -30,10 +30,10 @@ set -e
dnf -y update
dnf -y group install "Development Tools"
dnf -y install \
boost-devel-1.78.* \
boost-devel-1.81.0* \
cmake-3.27.* \
gcc-12.2.* \
gcc-c++-12.2.* \
gcc-13.2.* \
gcc-c++-13.2.* \
git \
libappindicator-gtk3-devel \
libcap-devel \
Expand Down Expand Up @@ -67,27 +67,28 @@ dnf clean all
rm -rf /var/cache/yum
_DEPS

# install cuda
WORKDIR /build/cuda
# versions: https://developer.nvidia.com/cuda-toolkit-archive
ENV CUDA_VERSION="12.0.0"
ENV CUDA_BUILD="525.60.13"
# 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 - enable cuda once it's supported for gcc 13 and fedora 39
## install cuda
#WORKDIR /build/cuda
## versions: https://developer.nvidia.com/cuda-toolkit-archive
#ENV CUDA_VERSION="12.0.0"
#ENV CUDA_BUILD="525.60.13"
## 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

# copy repository
WORKDIR /build/sunshine/
Expand All @@ -100,19 +101,20 @@ RUN npm install
WORKDIR /build/sunshine/build

# cmake and cpack
# todo - add cmake argument back in for cuda support "-DCMAKE_CUDA_COMPILER:PATH=/build/cuda/bin/nvcc \"
# todo - re-enable "DSUNSHINE_ENABLE_CUDA"
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 \
-DSUNSHINE_ENABLE_CUDA=OFF \
/build/sunshine
make -j "$(nproc)"
cpack -G RPM
Expand Down
2 changes: 1 addition & 1 deletion docs/source/about/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ CUDA is used for NVFBC capture.
sunshine_{arch}.flatpak 12.0.0 525.60.13 50;52;60;61;62;70;75;80;86;90
sunshine-debian-bookworm-{arch}.deb 12.0.0 525.60.13 50;52;60;61;62;70;75;80;86;90
sunshine-debian-bullseye-{arch}.deb 11.8.0 450.80.02 35;50;52;60;61;62;70;75;80;86;90
sunshine-fedora-37-{arch}.rpm 12.0.0 525.60.13 50;52;60;61;62;70;75;80;86;90
sunshine-fedora-38-{arch}.rpm unavailable unavailable none
sunshine-fedora-39-{arch}.rpm unavailable unavailable none
sunshine-ubuntu-20.04-{arch}.deb 11.8.0 450.80.02 35;50;52;60;61;62;70;75;80;86;90
sunshine-ubuntu-22.04-{arch}.deb 11.8.0 450.80.02 35;50;52;60;61;62;70;75;80;86;90
=========================================== ============== ============== ================================
Expand Down
2 changes: 1 addition & 1 deletion docs/source/building/linux.rst
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Install Requirements
nvidia-cuda-dev \ # Cuda, NvFBC
nvidia-cuda-toolkit # Cuda, NvFBC
Fedora 37, 38
Fedora 38, 39
^^^^^^^^^^^^^

Install Requirements
Expand Down

2 comments on commit 88fc8f8

@qdrop17
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, if I have some time tonight I might also try this workaround: https://jchuynh.medium.com/how-to-solve-cuda-incompatibility-with-high-versions-of-gcc-f47ef966bb15

@ReenigneArcher
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@qdrop17 thanks for sharing. Please let me know how it works. We could possibly incorporate this directly into our docker files. Although I suspect we might need to skip that for arm builds, those builds are already 4-5 hours for some reason. No idea why arm emulation is slow for the Fedora images, but not the Debian based images.

Please sign in to comment.