adamrehn / ue4-docker

Windows and Linux containers for Unreal Engine 4
https://docs.adamrehn.com/ue4-docker/
MIT License
787 stars 171 forks source link

ue4-docker fails to build opengl #179

Closed TravisBowers closed 3 years ago

TravisBowers commented 3 years ago

Output of the ue4-docker info command:

ue4-docker version:         0.0.86 (latest available version is 0.0.86)
Operating system:           Linux (Ubuntu 20.04.2 LTS, 5.4.0-74-generic)
Docker daemon version:      20.10.7
NVIDIA Docker supported:    Yes
Maximum image size:         No limit detected
Available disk space:       439.45 GiB
Total system memory:        15.27 GiB physical, 4 GiB virtual
Number of processors:       16 physical, 16 logical

Additional details:

# python3 --version
Python 3.8.5

(The rest of the issue description goes here. If you're reporting a problem with building container images, be sure to include the full output of the ue4-docker build command, including the initial output lines that display the command line parameters used to invoke the build. If you're making a feature request, you can remove the template contents entirely, since the ue4-docker info output and related information is only needed for helping diagnose and reproduce bugs.) I am attempting to use ue4-docker to build unreal container images on a Ubuntu 20.04 Libvirt VM with a Geforce 3070 GPU exposed via pcie-passthrough; however, all of my attempts are failing with the following:

# ue4-docker build 4.26.2
...
Step 17/22 : RUN sudo apt-get update &&         ./Setup.sh -no-cache &&         sudo rm -rf /var/lib/apt/lists/* && echo '' && echo 'RUN directive complete. Docker will now commit the filesystem layer to disk.' && echo 'Note that for large filesystem layers this can take quite some time.' && echo 'Performing filesystem layer commit...' && echo ''
 ---> Running in e4f19350345e
/bin/sh: 1: sudo: not found
The command '/bin/sh -c sudo apt-get update &&  ./Setup.sh -no-cache &&         sudo rm -rf /var/lib/apt/lists/* && echo '' && echo 'RUN directive complete. Docker will now commit the filesystem layer to disk.' && echo 'Note that for large filesystem layers this can take quite some time.' && echo 'Performing filesystem layer commit...' && echo ''' returned a non-zero code: 127
[ue4-docker build] Error: failed to build image "adamrehn/ue4-source:4.26.2-opengl".

As far as I can tell, Nvidia-Docker has been set up correctly on the system. I am able to run nvidia-smi via Docker:

docker run --runtime=nvidia --rm nvcr.io/nvidia/cuda:11.3.1-devel-ubuntu20.04 nvidia-smi
Wed Jun 23 15:28:45 2021       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 465.27       Driver Version: 465.27       CUDA Version: 11.3     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|===============================+======================+======================|
|   0  NVIDIA GeForce ...  Off  | 00000000:06:00.0 Off |                  N/A |
| 30%   65C    P0    50W / 220W |      0MiB /  7982MiB |      0%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|  No running processes found                                                 |
+-----------------------------------------------------------------------------+

I have tried to build several other branches, but those attempts have also failed to build opengl. I suspect that I'm doing something wrong, but I don't know what it is.

slonopotamus commented 3 years ago

We think that you have ue4-build-prerequisites image that was built with old ue4-docker (before commit 57a600aa7b4899aa806696bbfe22f89947317915). Could you please try removing it and rebuilding?

TravisBowers commented 3 years ago

Thank you. I did have ue4-build-prerequisites. I have removed it and initiated a new build.

TravisBowers commented 3 years ago

# ue4-docker build 4.26.2 appears to have completed successfully with:

[ue4-docker build] Built image "adamrehn/ue4-full:4.26.2-opengl" in 3 minutes and 40.58 seconds

[ue4-docker build] Total execution time: 6 hours, 10 minutes and 28.13 seconds

At one point, I attempted to expedite the build process with --pull-prerequisites. In hindsight, I suspect that this tainted my system and caused the issue that I was having.

slonopotamus commented 3 years ago

Sounds like one more reason why we should remove --pull-prerequisites feature.