Closed david-gwa closed 4 years ago
Can you check 'ifconfig' in your docker command?
I think you should enable '--net=host' option
I'm not completely sure, but you might need to edit config.yml and put *
for hostname
. Otherwise simulator listens on localhost interface, which is not forward to host. *
will make it to listen on all interfaces, including internal docker interface.
Alternative is to use --net=host
for docker which will not isolate network and everything will run same as on host.
Error message in logfile probably is shown when you pressed button "Open Browser". Because there is no browser installed inside docker image.
Also - simulator is not using cuda, so having that in docker image is not necessary. It should be possible to create image based on NVidia OpenGL docker image.
@sm-auto and @martins-mozeiko , --net=host
works it out. thank you guys !
Also - simulator is not using cuda, so having that in docker image is not necessary. It should be possible to create image based on NVidia OpenGL docker image.
the only reason has cuda
is to use the existing nvidia docker image, will cut it off later.
@david-gwa How do you build the docker? I start the nvidia vulkan docker and mount the build files in docker. Run the simulator in it, then I get errors below:
The screen:
The error log:
root@:/home/test/build# cat /root/.config/unity3d/Editor/Player.log
Preloaded type GtkListStore
Preloaded type GtkWindow
Preloaded type GtkVBox
Preloaded type GtkImage
Preloaded type GtkNotebook
Preloaded type GtkHBox
Preloaded type GtkFrame
Preloaded type GtkAlignment
Preloaded type GtkTreeView
Preloaded type GtkLabel
Preloaded type GtkCheckButton
Preloaded type GtkScrolledWindow
Preloaded type GtkComboBox
Desktop is 1920 x 1080 @ 60 Hz
[Vulkan init] extensions: count=2
[Vulkan init] extensions: name=VK_EXT_debug_report, enabled=0
[Vulkan init] extensions: name=VK_EXT_debug_utils, enabled=0
Vulkan error VK_ERROR_INCOMPATIBLE_DRIVER (-9) file: ./Runtime/GfxDevice/vulkan/VKContext.cpp, line: 333
Vulkan error./Runtime/GfxDevice/vulkan/VKContext.cpp:333
Vulkan detection: 0
No supported renderers found, exiting
(Filename: ./PlatformDependent/LinuxStandalone/main.cpp Line: 639)
I can run the build simulator in my host. Below is the "nvidia-smi": ubuntu 18.04
(base) @:~/.config/unity3d/Editor$ nvidia-smi
Thu Nov 21 14:52:55 2019
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 390.116 Driver Version: 390.116 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
|===============================+======================+======================|
| 0 GeForce MX130 Off | 00000000:02:00.0 Off | N/A |
| N/A 54C P0 N/A / N/A | 680MiB / 2004MiB | 22% Default |
+-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Processes: GPU Memory |
| GPU PID Type Process name Usage |
|=============================================================================|
| 0 1365 G /usr/lib/xorg/Xorg 236MiB |
| 0 2354 G /usr/bin/gnome-shell 178MiB |
| 0 2774 G ...uest-channel-token=10550127980518401327 214MiB |
| 0 13340 G ...quest-channel-token=1948050608421370042 49MiB |
+-----------------------------------------------------------------------------+
in your player.log it said Vulkan detection: 0
, I think that maybe the problem.
check the base vulakn image
add vulkan lib image , if vkcube works well, you should be good to run lgsvl
I actually build lgsvl image based on these two.
I also try to run lgsvl image in docker swarm cluster, check issue, it doesn't work well.
or it's a bad idea to run vulkan lgsvl in docker swarm, do you guys have any suggestions ?
I think you are missing -v /tmp/.X11-unix:/tmp/.X11-unix
argument. This is required to be able to talk X11. --env DISPLAY
is not enough.
@david-gwa Thanks for you help! I find some problem and solve it.
Then I can run the simulator, but when I select the resolution to start, my entire computer screen will be black, and log out. Then there is a box with a ubuntu system error to report.
The dockerfile:
FROM nvidia/vulkan:1.1.121-cuda-10.1-alpha
RUN set -ex \
&& apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y \
curl zip ca-certificates osslsigncode \
gconf-service lib32gcc1 lib32stdc++6 libasound2 libc6 libc6-i386 libcairo2 libcap2 libcups2 \
libdbus-1-3 libexpat1 libfontconfig1 libfreetype6 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 \
libgl1 libglib2.0-0 libglu1 libgtk2.0-0 libgtk-3-0 libnspr4 libnss3 libpango1.0-0 libstdc++6 \
libx11-6 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 \
libxrender1 libxtst6 zlib1g debconf npm libsoup2.4-1 libarchive13 libpng16-16 \
libcanberra-gtk-module \
&& apt-get clean
The run script:
#!/usr/bin/env bash
xhost +
sudo nvidia-docker run -it \
-p 8080:8080 \
-e DISPLAY=unix$DISPLAY \
-v /tmp/LG\ Silicon\ Valley\ Lab/LGSVL\ Simulator/:/tmp/LG\ Silicon\ Valley\ Lab/LGSVL\ Simulator/ \
-v /tmp/.X11-unix:/tmp/.X11-unix \
-v /home/07TmpSpace/CItest/docker:/home/test \
--cap-add=SYS_PTRACE \
--security-opt seccomp=unconfined \
simulator:v1 /bin/bash
@daohu527 ,
can you build and run vulkan sample ? to append runtime vulkan libs to your container
then check the glxgears image, to append runtime openGL libs to your container
looks lgsvl need both vulkan and openGL libs to run the container
also as mentioned previously, there needs a --net=host
parameter when run.
the dockerfile is not enough to run the container, I thought
@david-gwa I do build from "nvidia/vulkan:1.1.121-cuda-10.1-alpha" which contains "OpenGL (glvnd 1.1) + Vulkan 1.1.121".
FROM nvidia/vulkan:1.1.121-cuda-10.1-alpha
Then I need to install some packages that the simulator needs.
When I run the simulator in the docker, it looks like it’s flashing back. The log is below:
Preloaded type GtkListStore
Preloaded type GtkWindow
Preloaded type GtkVBox
Preloaded type GtkImage
Preloaded type GtkNotebook
Preloaded type GtkHBox
Preloaded type GtkFrame
Preloaded type GtkAlignment
Preloaded type GtkTreeView
Preloaded type GtkLabel
Preloaded type GtkCheckButton
Preloaded type GtkScrolledWindow
Preloaded type GtkComboBox
Desktop is 1920 x 1080 @ 60 Hz
[Vulkan init] extensions: count=16
[Vulkan init] extensions: name=VK_KHR_device_group_creation, enabled=0
[Vulkan init] extensions: name=VK_KHR_display, enabled=1
[Vulkan init] extensions: name=VK_KHR_external_fence_capabilities, enabled=0
[Vulkan init] extensions: name=VK_KHR_external_memory_capabilities, enabled=0
[Vulkan init] extensions: name=VK_KHR_external_semaphore_capabilities, enabled=0
[Vulkan init] extensions: name=VK_KHR_get_display_properties2, enabled=0
[Vulkan init] extensions: name=VK_KHR_get_physical_device_properties2, enabled=0
[Vulkan init] extensions: name=VK_KHR_get_surface_capabilities2, enabled=0
[Vulkan init] extensions: name=VK_KHR_surface, enabled=1
[Vulkan init] extensions: name=VK_KHR_xcb_surface, enabled=0
[Vulkan init] extensions: name=VK_KHR_xlib_surface, enabled=1
[Vulkan init] extensions: name=VK_EXT_acquire_xlib_display, enabled=0
[Vulkan init] extensions: name=VK_EXT_debug_report, enabled=0
[Vulkan init] extensions: name=VK_EXT_debug_utils, enabled=0
[Vulkan init] extensions: name=VK_EXT_direct_mode_display, enabled=0
[Vulkan init] extensions: name=VK_EXT_display_surface_counter, enabled=0
Vulkan detection: 2
Initialize engine version: 2019.1.10f1 (f007ed779b7a)
GfxDevice: creating device client; threaded=1
[Vulkan init] extensions: count=16
[Vulkan init] extensions: name=VK_KHR_device_group_creation, enabled=0
[Vulkan init] extensions: name=VK_KHR_display, enabled=1
[Vulkan init] extensions: name=VK_KHR_external_fence_capabilities, enabled=0
[Vulkan init] extensions: name=VK_KHR_external_memory_capabilities, enabled=0
[Vulkan init] extensions: name=VK_KHR_external_semaphore_capabilities, enabled=0
[Vulkan init] extensions: name=VK_KHR_get_display_properties2, enabled=0
[Vulkan init] extensions: name=VK_KHR_get_physical_device_properties2, enabled=0
[Vulkan init] extensions: name=VK_KHR_get_surface_capabilities2, enabled=0
[Vulkan init] extensions: name=VK_KHR_surface, enabled=1
[Vulkan init] extensions: name=VK_KHR_xcb_surface, enabled=0
[Vulkan init] extensions: name=VK_KHR_xlib_surface, enabled=1
[Vulkan init] extensions: name=VK_EXT_acquire_xlib_display, enabled=0
[Vulkan init] extensions: name=VK_EXT_debug_report, enabled=0
[Vulkan init] extensions: name=VK_EXT_debug_utils, enabled=0
[Vulkan init] extensions: name=VK_EXT_direct_mode_display, enabled=0
[Vulkan init] extensions: name=VK_EXT_display_surface_counter, enabled=0
[Vulkan init] extensions: count=59
[Vulkan init] extensions: name=VK_KHR_8bit_storage, enabled=0
[Vulkan init] extensions: name=VK_KHR_16bit_storage, enabled=0
[Vulkan init] extensions: name=VK_KHR_bind_memory2, enabled=0
[Vulkan init] extensions: name=VK_KHR_create_renderpass2, enabled=0
[Vulkan init] extensions: name=VK_KHR_dedicated_allocation, enabled=1
[Vulkan init] extensions: name=VK_KHR_depth_stencil_resolve, enabled=0
[Vulkan init] extensions: name=VK_KHR_descriptor_update_template, enabled=0
[Vulkan init] extensions: name=VK_KHR_device_group, enabled=0
[Vulkan init] extensions: name=VK_KHR_draw_indirect_count, enabled=0
[Vulkan init] extensions: name=VK_KHR_driver_properties, enabled=0
[Vulkan init] extensions: name=VK_KHR_external_fence, enabled=0
[Vulkan init] extensions: name=VK_KHR_external_fence_fd, enabled=0
[Vulkan init] extensions: name=VK_KHR_external_memory, enabled=0
[Vulkan init] extensions: name=VK_KHR_external_memory_fd, enabled=0
[Vulkan init] extensions: name=VK_KHR_external_semaphore, enabled=0
[Vulkan init] extensions: name=VK_KHR_external_semaphore_fd, enabled=0
[Vulkan init] extensions: name=VK_KHR_get_memory_requirements2, enabled=1
[Vulkan init] extensions: name=VK_KHR_image_format_list, enabled=1
[Vulkan init] extensions: name=VK_KHR_maintenance1, enabled=1
[Vulkan init] extensions: name=VK_KHR_maintenance2, enabled=0
[Vulkan init] extensions: name=VK_KHR_maintenance3, enabled=0
[Vulkan init] extensions: name=VK_KHR_multiview, enabled=0
[Vulkan init] extensions: name=VK_KHR_push_descriptor, enabled=0
[Vulkan init] extensions: name=VK_KHR_relaxed_block_layout, enabled=0
[Vulkan init] extensions: name=VK_KHR_sampler_mirror_clamp_to_edge, enabled=1
[Vulkan init] extensions: name=VK_KHR_sampler_ycbcr_conversion, enabled=0
[Vulkan init] extensions: name=VK_KHR_shader_atomic_int64, enabled=0
[Vulkan init] extensions: name=VK_KHR_shader_draw_parameters, enabled=0
[Vulkan init] extensions: name=VK_KHR_shader_float16_int8, enabled=0
[Vulkan init] extensions: name=VK_KHR_shader_float_controls, enabled=0
[Vulkan init] extensions: name=VK_KHR_storage_buffer_storage_class, enabled=0
[Vulkan init] extensions: name=VK_KHR_swapchain, enabled=1
[Vulkan init] extensions: name=VK_KHR_swapchain_mutable_format, enabled=0
[Vulkan init] extensions: name=VK_KHR_variable_pointers, enabled=0
[Vulkan init] extensions: name=VK_KHR_vulkan_memory_model, enabled=0
[Vulkan init] extensions: name=VK_EXT_blend_operation_advanced, enabled=0
[Vulkan init] extensions: name=VK_EXT_buffer_device_address, enabled=0
[Vulkan init] extensions: name=VK_EXT_conditional_rendering, enabled=0
[Vulkan init] extensions: name=VK_EXT_depth_clip_enable, enabled=0
[Vulkan init] extensions: name=VK_EXT_depth_range_unrestricted, enabled=0
[Vulkan init] extensions: name=VK_EXT_descriptor_indexing, enabled=0
[Vulkan init] extensions: name=VK_EXT_discard_rectangles, enabled=0
[Vulkan init] extensions: name=VK_EXT_display_control, enabled=0
[Vulkan init] extensions: name=VK_EXT_global_priority, enabled=0
[Vulkan init] extensions: name=VK_EXT_host_query_reset, enabled=0
[Vulkan init] extensions: name=VK_EXT_inline_uniform_block, enabled=0
[Vulkan init] extensions: name=VK_EXT_memory_budget, enabled=0
[Vulkan init] extensions: name=VK_EXT_pci_bus_info, enabled=0
[Vulkan init] extensions: name=VK_EXT_scalar_block_layout, enabled=0
[Vulkan init] extensions: name=VK_EXT_shader_subgroup_ballot, enabled=0
[Vulkan init] extensions: name=VK_EXT_shader_subgroup_vote, enabled=0
[Vulkan init] extensions: name=VK_EXT_transform_feedback, enabled=0
[Vulkan init] extensions: name=VK_EXT_vertex_attribute_divisor, enabled=0
[Vulkan init] extensions: name=VK_NV_dedicated_allocation, enabled=0
[Vulkan init] extensions: name=VK_NV_dedicated_allocation_image_aliasing, enabled=0
[Vulkan init] extensions: name=VK_NV_device_diagnostic_checkpoints, enabled=0
[Vulkan init] extensions: name=VK_NV_shader_subgroup_partitioned, enabled=0
[Vulkan init] extensions: name=VK_NVX_device_generated_commands, enabled=0
[Vulkan init] extensions: name=VK_NVX_multiview_per_view_attributes, enabled=0
Vulkan API version 1.1.99
Vulkan vendor=[NVIDIA] id=[10de]
Vulkan renderer=[GeForce MX130] id=[174d]
Vulkan device type 2
Vulkan driverversion=[0x6b8c8000] uint=[1804369920]
Vulkan PSO: cache data not found [path=/tmp/LG Silicon Valley Lab/LGSVL Simulator/vulkan_pso_cache.bin]
FMOD failed to initialize the output device.: "Error initializing output device. " (60)
(Filename: ./Modules/Audio/Public/AudioManager.cpp Line: 1524)
Forced to initialize FMOD to to the device driver's system output rate 48000, this may impact performance and/or give inconsistent experiences compared to selected sample rate 48000
(Filename: ./Modules/Audio/Public/AudioManager.cpp Line: 1469)
FMOD failed to initialize the output device.: "Error initializing output device. " (60)
(Filename: ./Modules/Audio/Public/AudioManager.cpp Line: 1524)
FMOD failed to initialize any audio devices, running on emulated software output with no sound. Please check your audio drivers and/or hardware for malfunction.
Begin MonoManager ReloadAssembly
- Completed reload, in 0.044 seconds
WARNING: Shader Unsupported: 'Hidden/Nature/Terrain/Utilities' - All passes removed
ERROR: Shader Shader is not supported on this GPU (none of subshaders/fallbacks are suitable)WARNING: Shader Unsupported: 'Hidden/Nature/Terrain/Utilities' - Setting to default shader.
WARNING: Shader Unsupported: 'HDRP/Lit' - Pass 'IndirectDXR' has no vertex shader
WARNING: Shader Unsupported: 'HDRP/Lit' - Pass 'ForwardDXR' has no vertex shader
WARNING: Shader Unsupported: 'HDRP/Lit' - Pass 'VisibilityDXR' has no vertex shader
WARNING: Shader Unsupported: 'HDRP/Lit' - All passes removed
requesting resize 1024 x 768
resizing window to 1024 x 768
Desktop is 1920 x 1080 @ 60 Hz
InitializeOrResetSwapChain 1024x768 samples=1
I run the simultor in the host, and compare with the failed log. I will continue to execute under normal condition, I don’t know what went wrong. Below is log will go right.
WARNING: Shader Unsupported: 'Hidden/PostProcessing/FinalPass' - Pass '' has no vertex shader
WARNING: Shader Unsupported: 'Hidden/PostProcessing/FinalPass' - Pass '' has no vertex shader
WARNING: Shader Unsupported: 'Hidden/PostProcessing/FinalPass' - Pass '' has no vertex shader
WARNING: Shader Unsupported: 'Hidden/PostProcessing/Uber' - Pass '' has no vertex shader
WARNING: Shader Unsupported: 'Hidden/PostProcessing/Uber' - Pass '' has no vertex shader
UnloadTime: 0.425261 ms
WARNING: Shader Unsupported: 'HDRP/Unlit' - Pass 'IndirectDXR' has no vertex shader
WARNING: Shader Unsupported: 'HDRP/Unlit' - Pass 'ForwardDXR' has no vertex shader
WARNING: Shader Unsupported: 'HDRP/Unlit' - Pass 'VisibilityDXR' has no vertex shader
WARNING: Shader Unsupported: 'HDRP/Unlit' - All passes removed
Current Database Version: 3
(Filename: ./Runtime/Export/Debug/Debug.bindings.h Line: 48)
Final Database Version: 3
(Filename: ./Runtime/Export/Debug/Debug.bindings.h Line: 48)
MySqlDB: Success connect to 192.168.1.101 sql server
(Filename: ./Runtime/Export/Debug/Debug.bindings.h Line: 48)
Setting up 6 worker threads for Enlighten.
Thread -> id: 7fd9d77fe700 -> priority: 1
Thread -> id: 7fd9d6ffd700 -> priority: 1
Thread -> id: 7fd9d67fc700 -> priority: 1
Thread -> id: 7fd9d5ffb700 -> priority: 1
Thread -> id: 7fd9d57fa700 -> priority: 1
Thread -> id: 7fd9d4ff9700 -> priority: 1
Opening in existing browser session.
Getting current user
(Filename: ./Runtime/Export/Debug/Debug.bindings.h Line: 48)
Fallback handler could not load library /home/07TmpSpace/CItest/docker/build/simulator_Data/Mono/libKernel32
Fallback handler could not load library /home/07TmpSpace/CItest/docker/build/simulator_Data/Mono/libKernel32.so
Fallback handler could not load library /home/07TmpSpace/CItest/docker/build/simulator_Data/Mono/Kernel32
Fallback handler could not load library /home/07TmpSpace/CItest/docker/build/simulator_Data/Mono/libKernel32
Fallback handler could not load library /home/07TmpSpace/CItest/docker/build/simulator_Data/Mono/libKernel32.so
Fallback handler could not load library /home/07TmpSpace/CItest/docker/build/simulator_Data/Mono/libKernel32
Vulkan PSO: Inconsistent pipeline cache header size[0], newDataSize[80118]
GarbageCollector disposing of ComputeBuffer. Please use ComputeBuffer.Release() or .Dispose() to manually release the buffer.
(Filename: ./Runtime/Export/Debug/Debug.bindings.h Line: 48)
Culling group was not disposed. You have to call Dispose explicitly from the main thread. This will likely result in a crash.
(Filename: /home/builduser/buildslave/unity/build/Runtime/Export/Camera/CullingGroup.bindings.cpp
What do you mean by "flashing back"?
Here is a Dockerfile that creates minimal image (no CUDA) with Vulkan capabilities, and downloads & unpacks our simulator:
# install dependencies
FROM ubuntu:18.04 AS base
RUN set -ex \
&& apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get upgrade -y \
&& DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y \
unzip \
ca-certificates \
libx11-6 \
libxau6 \
libxcb1 \
libxdmcp6 \
libxext6 \
libvulkan1 \
libgl1 \
&& apt-get clean
ENV NVIDIA_VISIBLE_DEVICES all
ENV NVIDIA_DRIVER_CAPABILITIES graphics,display
ADD "https://gitlab.com/nvidia/container-images/vulkan/raw/master/nvidia_icd.json" /etc/vulkan/icd.d/nvidia_icd.json
# unzip LGSVL Simulator
FROM base AS unzipper
ARG LGSVL_SIMULATOR_VERSION=2019.11-rc1
ADD "https://github.com/lgsvl/simulator/releases/download/${LGSVL_SIMULATOR_VERSION}/lgsvlsimulator-linux64-${LGSVL_SIMULATOR_VERSION}.zip" /tmp/lgsvlsimulator.zip
RUN set -ex \
&& cd /tmp \
&& unzip "lgsvlsimulator.zip" \
&& mv "lgsvlsimulator-linux64-${LGSVL_SIMULATOR_VERSION}" lgsvlsimulator
# final image
FROM base
COPY --from=unzipper /tmp/lgsvlsimulator /opt/lgsvlsimulator
CMD /opt/lgsvlsimulator/simulator
Put it inside Dockerfile
file and run docker build -t lgsvlsimulator .
in same folder that will build lgsvlsimulator
image.
To run it use following command:
docker run -ti \
--runtime=nvidia \
--net=host \
-e DISPLAY \
-e XAUTHORITY=/tmp/.Xauthority \
-v ${XAUTHORITY}:/tmp/.Xauthority \
-v /tmp/.X11-unix:/tmp/.X11-unix \
-v lgsvlsimulator:/root/.config/unity3d \
lgsvlsimulator
Replace --runtime=nvidia
with --gpus all
if you are on Docker >=19.03.
This will run simulator and will store persistent data in lgsvlsimulator
volume (database, downloaded maps/vehicles, logfile). WebUI can be accessed on http://localhost:8080
This docker image should work on Ubuntu 18.04 and on ArchLinux.
hey, @martins-mozeiko , a little more about this question
does the new lgsvl still have a static configure, so no need go to the server page to select resolution and etc.
It is still displayed. But I you don't install libgtk2.0-0
then this dialog won't be shown.
following the discussion at issue #382,
it's easy to build lg based on nvidia vulkan docker, and simple run.sh :
after running ./simulator in docker, but when access the webUI from host brower, it has issues:
the
Player.log
show:can you guys give some help ?
Thanks David