Closed Ludea closed 6 years ago
The executable for AutomationTool is built automatically the first time RunUAT.bat
(or RunUAT.sh
under Linux) is run. However, this script is not added to the system PATH
environment variable, so you will need to provide the full path to the script in order to execute it.
The full path to the RunUAT
script is as follows:
C:\UnrealEngine\Engine\Build\BatchFiles\RunUAT.bat
/home/ue4/UnrealEngine/Engine/Build/BatchFiles/RunUAT.sh
Alternatively, you can use the ue4 uat
command from ue4cli to invoke UAT without needing to worry about the platform-specific script path. The ue4cli executable is added to the system PATH
, so it can be invoked directly by name.
If I use full path, ie C:\UnrealEngine\Engine\BatchFiles\RunUAT.bat I have an issue.
Error : Visual Studio and/or AutomationTool.csproj wad not found, nor was Engine\Binaries\Dotnet\AutomationTool.exe. Can't run the automation tool.
If I use ue4 uat, I have the same message.
Any idea what is wrong?
Are you running those commands from an interactive prompt inside the container or directly from the docker run
command? Could you please provide the full docker run
commands used to launch the containers (plus any additional commands entered if you used an interactive prompt) so that I can attempt to reproduce the error?
I run directly from docker run
command.
The full comand is :
docker run -it powershell C:\UnrealEngine\Engine\BatchFiles\RunUAT.bat BuildCookRun -nocompile -nocompileeditor -installed -nop4 -project=myproject.uproject -cook -stage -archive -archivedirectory=myrpject -package -clientconfig=Shipping -ue4exe=UE4Editor-Cmd.exe -clean -pak -prereqs -distribution -targetplatform=Win64 -build -utf8output
I try docker run -it powershell ue4 uat BuildCookRun -nocompile -nocompileeditor -installed -nop4 -project=myproject.uproject -cook -stage -archive -archivedirectory=myrpject -package -clientconfig=Shipping -ue4exe=UE4Editor-Cmd.exe -clean -pak -prereqs -distribution -targetplatform=Win64 -build -utf8output
, I have the same issue
`
A couple of minor points:
docker run
commands, since they are missing required arguments such as the image name. I am assuming you are using the image adamrehn/ue4-build:4.20.2
.RunUAT.bat
is missing the Build
directory. The correct path is C:\UnrealEngine\Engine\Build\BatchFiles\RunUAT.bat
.However, with the image name added and the correct path used, I am indeed able to reproduce the error you have described when running both commands. The cause of the issue appears to be the inclusion of the -nocompile
flag, which instructs RunUAT.bat to not compile the executable or scripts for AutomationTool. This flag is only appropriate when using an installed build of the Engine, as demonstrated by the fact that it works correctly with the adamrehn/ue4-package:4.20.2
image.
Solution: removing the -nocompile
flag fixes the problem and both commands then run successfully.
Yes, sorry, I did not copy all docker command (damm ctrl c / ctrl v !)
I remove the -no-compile flag.
But I can't still build my project.
Failed to find command C:\UnrealEngine\Engine\Build\BatchFiles\RunUAT.bat (see C:\UnrealEngine\Engine\Programs\AutomationTool\Saved\Logs\Log.txt for full exception trace)
My full command :
docker run -it adamrehn/ue4-build:4.20.2 powershell ue4 uat C:\UnrealEngine\Engine\Build\BatchFiles\RunUAT.bat BuildCookRun -nocompileeditor -nop4 -project=Z:/myproject/myproject.uproject -cook -stage -archive -archivedirectory=Z:/myproject -package -clientconfig=Shipping -ue4exe=UE4Editor-Cmd.exe -clean -pak -prereqs -distribution -targetplatform=Win64 -build -utf8output
Maybe another flag issue ?
Update : Fix (delete RunUAT path)
I don't know how share volume between windows server and windows container. (I know how do that on Linux).
I try docker run -v fullue4projectpath:C:/-it adamrehn/ue4-build:4.20.2 powershell ls C:/
But I cannot bind by this way :
invalid bind mount spec "Z:/ue4:C/:": invalid volume specification: 'Z:/ue4:C/:': invalid mount config for type "bind": destination path cannot be
c:or
c:`: c:.`
The error message already tells you exactly what the problem is: you cannot bind-mount a host path to the root of the C:\
drive, you need to specify a directory name. This is also not an issue specific to the UE4 containers but to all Windows Docker containers, and the ue4-docker
issues list is not the appropriate place to ask questions about general Docker features such as bind-mounting.
I keep getting RunUAT.sh: not found too. here is my
FROM --platform=${BUILDPLATFORM:-linux/amd64} ghcr.io/epicgames/unreal-engine:dev-5.0.3 AS builder
# Copy UE4 project (assumes `.uproject` in this directory)
COPY --chown=ue4:ue4 . /media/bm/Linux/temp
WORKDIR /media/bm/Linux/temp
# Package the example Unreal project
RUN /media/bm/Linux/Engine/Build/BatchFiles/RunUAT.sh BuildCookRun \
-clientconfig=Development -serverconfig=Development \
-project=/media/bm/Linux/temp/Car.uproject \
-utf8output -nodebuginfo -allmaps -noP4 -cook -build -stage -prereqs -pak -archive \
-archivedirectory=/media/bm/Linux/temp/dist \
-platform=Linux
# Copy the packaged files into a container image that includes CUDA but doesn't include any Unreal Engine components
FROM --platform=${BUILDPLATFORM:-linux/amd64} ghcr.io/epicgames/unreal-engine:runtime-pixel-streaming
WORKDIR /home/ue5/project
COPY --from=builder /media/bm/Linux/temp/dist/LinuxNoEditor ./
# Establish ENV
ENV RES_X=1920 \
RES_Y=1080 \
SIGNAL_URL=ws://127.0.0.1:8888
# Start pixel streaming
CMD ["/bin/bash", "-c", "./Car.sh -PixelStreamingURL=${SIGNAL_URL} -RenderOffscreen -Unattended -ForceRes -ResX=${RES_X} -ResY=${RES_Y} -AllowPixelStreamingCommands ${EXTRA_ARGS}" ]
`
@WSPluta: To make a code-block, use triple-backticks (```) rather than single-backticks.
As far as your actual issue goes, does /media/bm/Linux/Engine/Build/BatchFiles/RunUAT.sh
exist? I'm not actually familiar with the official images from epicgames, so I don't know if /media/bm/Linux/Engine
is where the installed Engine is normally found. I would expect from the Epic docs that this path should be /home/ue4/UnrealEngine/Engine/Build/BatchFiles/RunUAT.sh
, the same as normal ue4-docker usage.
thanks. Yes it definitely exists and I can cd
into it from my terminal
I have downloaded latest ue5 for linux, and installed it on my dedicated spare drive (called Linux) - so it is not located on the drive that I use to host my Ubuntu OS.
user@user:/media/bm/Linux/Car$ cd /media/bm/Linux/Engine/Build/BatchFiles/
user@user:/media/bm/Linux/Engine/Build/BatchFiles$ ls
Linux Mac RunUAT.sh RunUBT.sh
user@user:/media/bm/Linux/Engine/Build/BatchFiles$ cd /media/bm/Linux/Car/
user@user:/media/bm/Linux/Car$ ls
Car.uproject Config Content DerivedDataCache Dockerfile Intermediate Saved
bm@bm-X570-AORUS-ELITE:/media/bm/Linux/Car$ docker build -t my-pixelstream:latest .
Sending build context to Docker daemon 1.177GB
Step 1/2 : FROM --platform=${BUILDPLATFORM:-linux/amd64} ghcr.io/epicgames/unreal-engine:dev-5.0.3 AS builder
---> 6a60f71034bc
Step 2/2 : RUN /media/bm/Linux/Engine/Build/BatchFiles/RunUAT.sh BuildCookRun -clientconfig=Development -serverconfig=Development -project=/media/bm/Linux/temp/Car.uproject -utf8output -nodebuginfo -allmaps -noP4 -cook -build -stage -prers -pak -archive -archivedirectory=/media/bm/Linux/temp/dist -platform=Linux
---> Running in 08632a980f93
/bin/sh: 1: /media/bm/Linux/Engine/Build/BatchFiles/RunUAT.sh: not found
The command '/bin/sh -c /media/bm/Linux/Engine/Build/BatchFiles/RunUAT.sh BuildCookRun -clientconfig=Development -serverconfig=Development -project=/media/bm/Linux/temp/Car.uproject -utf8output -nodebuginfo -allmaps -noP4 -cook -build -stage -prers -pak -archive -archivedirectory=/media/bm/Linux/temp/dist -platform=Linux' returned a non-zero code: 127
Ah, are you trying to use a UE5 install from outside the container? Your DockerFile's COPY
isn't including the engine from your host, just the project.
If you're using a UE5 install from outside the container, then you're probably using the wrong container image, the point of the dev
image is that it bundles a build of the engine. I think you maybe want to be using the Runtime container?
Anyway, this is a different issue from this ticket (which is about finding the RunUAT.sh
inside the container), so I suggest you open a new ticket so it's visible to more people, although it's really general "DockerFile" help you need at this point.
When using
docker run - it adamrehn/ue4-build powershell RunUAT buildCookRun my uproject
the build fail because it don't find UAT.exe.I need to compile my project with ue4 source, not the installed engine (build in adamrehn/ue4-package image).