Skip to content

feat(apps): add unigine benchmarks image #239

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

shawly
Copy link
Contributor

@shawly shawly commented Jun 8, 2025

This image allows benchmarking inside a Wolf setup, which will make overclocking, undervolting gpus or optimizing Wolf settings easier. Since packaging the Unigine Engines inside a Docker image violates their EULA, the image simply downloads them on-demand when starting the runtime. The installation is saved in the userhome so subsequent starts will take less time. The software can be re-installed using the FORCE_REINSTALL=1 env var or by removing the installation inside the $HOME/.unigine folder.

The jsoncq.sh script helps editing the waybar config using jq. This is much better than parsing the file manually and it's less bloating than adding any python packages for jsonc parsing.

I made sure to create an _index.md for Wildlife, but I did not find the template you were using for the icons hosted, can you share the template @ABeltramo here on GitHub?

Test Configs

These configs use my image I already built for testing ghcr.io/shawly/gow/unigine-benchmark:edge, but feel free to build it yourself!

[[apps]]
title = "Unigine Heaven"
icon_png_path = "https://games-on-whales.github.io/wildlife/apps/unigine-benchmark/assets/icon.png"

[apps.runner]
type = "docker"
name = "WolfUnigineHeaven"
image = "ghcr.io/shawly/gow/unigine-benchmark:edge"
env = [
    "UNIGINE_BENCHMARK=heaven",
    "RUN_SWAY=true",
    "GOW_REQUIRED_DEVICES=/dev/input/* /dev/dri/* /dev/nvidia*"
]
devices = []
mounts = []
ports = []
base_create_json = """
{
  "HostConfig": {
    "IpcMode": "host",
    "Privileged": false,
    "CapAdd": ["SYS_ADMIN", "SYS_NICE", "SYS_PTRACE", "NET_RAW", "MKNOD", "NET_ADMIN"],
    "SecurityOpt": ["seccomp=unconfined", "apparmor=unconfined"],
    "DeviceCgroupRules": ["c 13:* rmw", "c 244:* rmw"]
  }
}
\
"""

[[apps]]
title = "Unigine Valley"
icon_png_path = "https://games-on-whales.github.io/wildlife/apps/unigine-benchmark/assets/icon.png"

[apps.runner]
type = "docker"
name = "WolfUnigineValley"
image = "ghcr.io/shawly/gow/unigine-benchmark:edge"
env = [
    "UNIGINE_BENCHMARK=valley",
    "RUN_SWAY=true",
    "GOW_REQUIRED_DEVICES=/dev/input/* /dev/dri/* /dev/nvidia*"
]
devices = []
mounts = []
ports = []
base_create_json = """
{
  "HostConfig": {
    "IpcMode": "host",
    "Privileged": false,
    "CapAdd": ["SYS_ADMIN", "SYS_NICE", "SYS_PTRACE", "NET_RAW", "MKNOD", "NET_ADMIN"],
    "SecurityOpt": ["seccomp=unconfined", "apparmor=unconfined"],
    "DeviceCgroupRules": ["c 13:* rmw", "c 244:* rmw"]
  }
}
\
"""

[[apps]]
title = "Unigine Superposition"
icon_png_path = "https://games-on-whales.github.io/wildlife/apps/unigine-benchmark/assets/icon.png"

[apps.runner]
type = "docker"
name = "WolfUnigineSuperposition"
image = "ghcr.io/shawly/gow/unigine-benchmark:edge"
env = [
    "UNIGINE_BENCHMARK=superposition",
    "RUN_SWAY=true",
    "GOW_REQUIRED_DEVICES=/dev/input/* /dev/dri/* /dev/nvidia*"
]
devices = []
mounts = []
ports = []
base_create_json = """
{
  "HostConfig": {
    "IpcMode": "host",
    "Privileged": false,
    "CapAdd": ["SYS_ADMIN", "SYS_NICE", "SYS_PTRACE", "NET_RAW", "MKNOD", "NET_ADMIN"],
    "SecurityOpt": ["seccomp=unconfined", "apparmor=unconfined"],
    "DeviceCgroupRules": ["c 13:* rmw", "c 244:* rmw"]
  }
}
\
"""

@@ -70,7 +70,7 @@ jobs:
GHCR_NAMESPACE="${{ github.repository_owner }}/gow"
fi
DOCKERHUB_NAMESPACE="${{ env.DOCKERHUB_NAMESPACE }}"
ARM64_RUNNER=${{ env.ARM64_RUNNER != '' && env.ARM64_RUNNER || 'ubuntu-latest' }}
ARM64_RUNNER=${{ env.ARM64_RUNNER != '' && env.ARM64_RUNNER || 'ubuntu-24.04-arm' }}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

BTW, GitHub provides public runners for arm64 since January (https://github.blog/changelog/2025-01-16-linux-arm64-hosted-runners-now-available-for-free-in-public-repositories-public-preview/)

I tested it on my repo and its pretty much as fast as the amd64 runner!

@ABeltramo
Copy link
Member

Thanks for opening this (and the other PRs). I'm deep in the woods with the zero copy pipeline, bear with me to properly review these..

Btw icons are generated with this little script: https://github.com/games-on-whales/gow/blob/master/bin%2Fgen-moonlight-image.sh

This image allows benchmarking inside a Wolf setup, which will make overclocking, undervolting gpus or optimizing Wolf settings easier.
Since packaging the Unigine Engines inside a Docker image violates their EULA, the image simply downloads them on-demand when starting the runtime.
The installation is saved in the userhome so subsequent starts will take less time.
The software can be re-installed using the FORCE_REINSTALL=1 env var or by removing the installation inside the $HOME/.unigine folder.

* feat(waybar): added jsoncq.sh

This script helps editing the waybar config using jq. This is much better than parsing the file manually and it's less bloating than adding any python packages for jsonc parsing.
@shawly shawly force-pushed the feature/apps/unigine-benchmarks branch from 53b138d to b313152 Compare June 9, 2025 05:38
@shawly
Copy link
Contributor Author

shawly commented Jun 9, 2025

No pressure! Since the workflows now work flawlessly on my fork, I can always use my images temporarily so take your time.

Thanks for linking the script, I just added the icons now. 👌

@shawly shawly force-pushed the feature/apps/unigine-benchmarks branch from 9cc0fba to 16c5a71 Compare June 11, 2025 18:40
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