Skip to content

Conversation

@chewi
Copy link
Contributor

@chewi chewi commented Jan 23, 2024

Improvements to #2020 so that Fedora 39 now works.

  • Does not require QEMU at all!
  • Caches dnf metadata and downloads between rebuilds.
  • Respects TARGETARCH as a Docker variable, adding DNF_ARCH instead.
  • Reduces downloads and image size by ignoring weak dependencies.

The image is still a little large at 591MB, twice what you have now. I'm not sure why, but I don't think you were doing dnf update before? That can bloat it quite a bit.

I think you may need setcap to give Sunshine the correct permissions, but you didn't seem to have this before?

@chewi
Copy link
Contributor Author

chewi commented Jan 24, 2024

Hah, turns out I was comparing with the compressed size shown on Docker Hub.

Before: 902MB
After: 591MB 🥳

@chewi
Copy link
Contributor Author

chewi commented Jan 25, 2024

Okay, a lot of this is down to me adding --setopt=install_weak_deps=False. This avoid big dependencies like LLVM via Mesa. I'm not sure whether we need such dependencies. If we do, we can maybe be more selective about it.

@ReenigneArcher
Copy link
Member

Thanks for digging into this. I will try to pick work back up on this soon.

@chewi
Copy link
Contributor Author

chewi commented Jan 26, 2024

I've tried to take the same approach for Ubuntu, but APT is not playing ball at all. This doesn't surprise me much, to be honest.

@ReenigneArcher
Copy link
Member

ReenigneArcher commented Jan 26, 2024

I don't think it's as critical for Ubuntu/Debian...

"Build and push" is the install sunshine step... you can see here it's rather quick even with qemu. https://github.com/LizardByte/Sunshine/actions/runs/7664452338/job/20888787801

@chewi chewi force-pushed the build-cross-compile-linux branch 3 times, most recently from ed6eaf3 to 68bf0ef Compare January 28, 2024 11:58
* Does not require QEMU at all!
* Caches dnf metadata and downloads between rebuilds.
* Respects TARGETARCH as a Docker variable, adding DNF_ARCH instead.
* Reduces downloads and image size by ignoring weak dependencies.

CUDA almost works. We borrow RHEL 8 packages for cross-compiling because
this is the only distro with NVIDIA packages for ppc64le. Unfortunately,
the toolkit doesn't support GCC 13, and forcing it leads to errors.
@chewi chewi force-pushed the build-cross-compile-linux branch from 68bf0ef to c7671c4 Compare January 28, 2024 12:58
Works for amd64, arm64, and ppc64le. Unlike Fedora, this does require
QEMU because APT seems incapable of operating on a different root
directory for a different architecture.

As with Fedora, cross-compiling CUDA works by borrowing the RHEL 8
packages because this is the only distro with NVIDIA packages for
ppc64le.
@chewi chewi force-pushed the build-cross-compile-linux branch from c7671c4 to 562a002 Compare January 28, 2024 12:59
@chewi
Copy link
Contributor Author

chewi commented Jan 28, 2024

Okay, think I'm about done now.

@ReenigneArcher ReenigneArcher self-assigned this Feb 4, 2024
@ReenigneArcher ReenigneArcher marked this pull request as draft February 27, 2024 01:21
@ReenigneArcher ReenigneArcher force-pushed the build-cross-compile-linux branch from a79567e to 4e49a8d Compare March 30, 2024 19:19
@ReenigneArcher
Copy link
Member

Sorry, I just can't follow this diff. Half of items marked as new were already in the target branch.

We also can't cache all the dependencies... we only get 10GB of cache, and regularly far exceed this as is.

image

I think I would rather just discuss what needs to change in #2020, rather than having a PR into it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants