Sunshine icon indicating copy to clipboard operation
Sunshine copied to clipboard

Working Docker cross-compiling for Fedora 39

Open chewi opened this issue 1 year ago • 6 comments

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 avatar Jan 23 '24 23:01 chewi

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

Before: 902MB After: 591MB :partying_face:

chewi avatar Jan 24 '24 21:01 chewi

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.

chewi avatar Jan 25 '24 08:01 chewi

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

ReenigneArcher avatar Jan 25 '24 14:01 ReenigneArcher

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.

chewi avatar Jan 26 '24 23:01 chewi

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

ReenigneArcher avatar Jan 26 '24 23:01 ReenigneArcher

Okay, think I'm about done now.

chewi avatar Jan 28 '24 13:01 chewi

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.

ReenigneArcher avatar Mar 30 '24 20:03 ReenigneArcher