byu-holoocean / holoocean-docs

Documentation for HoloOcean
4 stars 0 forks source link

Run HoloOcean 1.0.0 in Docker or WSL #6

Open Jayzhang2333 opened 2 months ago

Jayzhang2333 commented 2 months ago

Hi there,

I was trying to run HoloOcean 1.0.0 inside docker or WSL as I need to use the ROS2 wrapper, which needs ROS2 Iron and it cannot run on ubuntu20.04. I both docker container or WSL, when i tried to run holoocean.make("xxxx"), it always ran into error like: `Traceback (most recent call last): File "/home/jay/.local/lib/python3.10/site-packages/holoocean/environments.py", line 863, in linux_start_process loading_semaphore.acquire(30) posix_ipc.BusyError: Semaphore is busy

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "", line 1, in File "/home/jay/.local/lib/python3.10/site-packages/holoocean/holoocean.py", line 103, in make return HoloOceanEnvironment(**param_dict) File "/home/jay/.local/lib/python3.10/site-packages/holoocean/environments.py", line 175, in init self.linux_start_process( File "/home/jay/.local/lib/python3.10/site-packages/holoocean/environments.py", line 865, in linux_start_process raise HoloOceanException( holoocean.exceptions.HoloOceanException: Timed out waiting for binary to load. Ensure that holoocean is not being run with root priveleges.`

When I am using docker, I am 100% sure that I did not run with root priveleges and I received the same thing even with WSL. I saw when moving from HoloOcean 0.5.0 to 1.0.0, the docker support is no longer there. The ROS wrapper is also and still linking to HoloOcean 0.5.0. I also suspect it might be some changes from Epic Game, rather than HoloOcean.

Anyway, were anyone able to run HoloOcean inside docker?

Jayzhang2333 commented 2 months ago

I just find out BYU is also developing a ROS wrapper, but it seems like it is still under development. I'll try the dockerfile in this repo to see if i can get holoocean working in docker

Jayzhang2333 commented 2 months ago

I tried that dockerfile, but I still cannot run holoocean in docker. It shows the same error.

BradenMeyers commented 2 months ago

Hello, Can you please describe what kind of system you are trying to run this on? Windows, Linux, WSL? Currently the docker file should only work on a linux host system becasue of the host system configuration you have to run The ROS2 wrapper is being worked on at the moment as well as the docker setup. We are still working on documenting but it works on our computers

Jayzhang2333 commented 2 months ago

Hi Braden, I was working on a host system of Ubuntu20.04 with a base docker image of Ubuntu22. I also tried on windows with WSL (ubuntu 22). I can only run holoocean with graphic off in docker or WSL. The simualtion works perfectly on both ubuntu and windows host machine without docker or WSL.

BradenMeyers commented 2 months ago

It sounds like it could be a problem with the docker container not having access to the gpu or screen. I have not had success with WSL and know the nvidia container toolkit does not support windows yet.

Can you explain your gpu setup? On Linux you can get driver information with nvidia-smi command.

Can you also tell me about what docker run command or docker compose to start the container. Any volumes or flags?

BradenMeyers commented 2 months ago

https://github.com/byu-holoocean/holoocean-ros/blob/main/ros_container/Holoocean%20Setup%20Instructions

You can ignore the parts about ros2 setup but there are some information about my setup.