How to compile Shaders by command line on Linux

Hi guys,

to install Unreal (4.17) on Linux, the installation can be done using scripts without any problem.

Since it can be done with scripts, I can put it on a Docker.

The problem is that when we open Unreal for the first time, we have more than 2k shaders compiling. If I put this on a Docker, whenever I run the Docker container, it’s going to compile from zero again.

So my question is: How can I compile the shaders using Command Line to be able to put it on a Docker?

Hi,

As this is the Editor and not a packaged game you would want to use a shared DerivedDataCache. If you take a look at the guide here Derived Data Cache | Unreal Engine Documentation you will find more information on this. Adapting this for Linux, would be run as follows:

./Binaries/Linux/UE4Editor -run=DerivedDataCache -fill -DDC=CreatePak