Error when running a game through CLI on Docker

Hi,
I am facing some issues when trying to build the game and then run through CLI (headless) on Docker image to capture frames from my game (moving camera).
I tried to build with Linux Server and then start the capture but still the same issue. I have done this:

docker run -it --rm --gpus all my_image bash

following this:

and this:

But still have the following errors:

WARNING: Shader Did you use #pragma only_renderers and omit this platform?
WARNING: Shader If subshaders removal was intentional, you may have forgotten turning Fallback off?
WARNING: Shader Unsupported: ‘Universal Render Pipeline/Particles/Lit’ - All subshaders removed
WARNING: Shader Did you use #pragma only_renderers and omit this platform?
WARNING: Shader If subshaders removal was intentional, you may have forgotten turning Fallback off?
ERROR: Shader Universal Render Pipeline/Particles/Lit shader is not supported on this GPU (none of subshaders/fallbacks are suitable)
WARNING: Shader Unsupported: ‘Universal Render Pipeline/Particles/Lit’ - All subshaders removed
WARNING: Shader Did you use #pragma only_renderers and omit this platform?
WARNING: Shader If subshaders removal was intentional, you may have forgotten turning Fallback off?
[PhysX] Initialized MultithreadedTaskDispatcher with 20 workers.
UnloadTime: 0.628234 ms
ERROR: Shader UI/Default shader is not supported on this GPU (none of subshaders/fallbacks are suitable)

etc…

Is this a unity bug? I am using unity version 2022.3.41f1

thanks

You can take a look at how game.ci builds unity apps inside container, or even use it if it meets your needs.

What is the exact command you used to start the Unity build?

You can look at one sample command here: https://gitlab.com/game-ci/unity3d-gitlab-ci-example/-/blob/main/ci/build.sh

do I need to use xvfb-run --auto-servernum --server-args='-screen 0 640x480x24' to build the game?

why are you having the server run graphics? if you build the unity game server you can omit all of that, it doesnt actually need xvfb either…

I am not running graphics, I want to build the game and then start capturing frames in a separate command (headless) to get a folder with different frames at the end.

So my problem is not during the build. It is during starting the capture.

did you try the dedicated server package? it allows you to strip so much out

I did, I installed unity with -m linux-server and inside my buildPlayerOptions I added this:
buildPlayerOptions.subtarget = (int)StandaloneBuildSubtarget.Server;

No thats a build target, Im talking the package
image

What do you mean by “start capturing frames”?
Is it capturing screenshots (images, png/jpg) of your game? You can’t if you are not running graphics and/or stripping shaders by doing a server build.

Unity - Manual: Build your application for Dedicated Server i did something like that.

Are you sure? I remember i did something similar with UE. When i did it, i guess it was via a plugin