Unity-Technologies / com.unity.perception

Perception toolkit for sim2real training and validation in Unity
Other
920 stars 177 forks source link

m_DistortedTexture.enableRandomWrite on Docker #511

Open victorjourne opened 2 years ago

victorjourne commented 2 years ago

Dear Perception team, Thanks for your great project! I am trying to use perception on a dockerized unity version and with the untiy CLI.

The error I got in Perception is (full log) :

RenderTexture.Create failed: format unsupported for random writes - RGBA32 SFloat (52).
UnityEngine.StackTraceUtility:ExtractStackTrace () (at /home/bokken/buildslave/unity/build/Runtime/Export/Scripting/StackTrace.cs:37)

This comes from this line in perception codebase. m_DistortedTexture.enableRandomWrite = true

It was working in my host, without docker. I am suspecting it is because of the lack of physical screen in the container or the nvidia driver, but with no clue; do you have an idea?

Thanks in advance,

++++++ SYSTEM CONFIGURATION ++++++

Host : Ubuntu desktop 18.04 Docker container : Ubuntu desktop 18.04 (with or without nvidia runtime) Unity 2020.3.27f1 perception 0.11.2-preview.2 GPU : P100 or RTX 3070 | GTX 1060 Nvidia driver : 470.103.01 | 418.226.00

StevenBorkman commented 2 years ago

Hi Victor,

We do not really have much experience, and do not officially support, running perception in a Docker container. When you say that you are using the CLI, does that mean you are working with the Unity Editor via the CLI, or have you made a built perception "game" that you are executing via the CLI?

victorjourne commented 2 years ago

Hello Steven,

Thanks for your answer. We develop via Unity Editor, then on a headless server, the CLI is used to build and play the scene with perception.

Our investigations drive us to think that the issue is related to the lack of a physical monitor on the server. In this case, Unity is unable to work with our GPU, and the rendering computations are made with an outdated version of OpenGL, executed by LLVM pipe driver (which is basically CPU drivers).

So at this date, no solution found to make perception work in a headless server.

StevenBorkman commented 2 years ago

Hi Victor,

We do have a product here at Unity that allows for headless rendering. I'm not sure about the exact configuration of GPU, OpenGL version, etc. but you could contact James Fort (james.fort@unity3d.com) to get more information.