apollo: Unable to Access Dreamview When Booted on WSL 2 from Windows 11 Machine.
Hello, I am trying to run apollo on WSL2 in conjunction with LGSVL on Windows 11 Pro on the same machine. I have docker and apollo successfully installed. Additionally, starting up Dreamview in Ubuntu works. However, when I try to access the localhost:8888 link from Edge, Chrome, or Firefox, it refuses to connect. I have not seen this issue for WSL 2 in particular, so I figured it would not hurt to post this issue. Just a heads up, I am not very familiar with Ubuntu or with GitHub either, so you might have to spell things out for me occasionally. I appreciate any help offered.
System information
- OS Platform and Distribution (Linux Ubuntu 18.04 on WSL 2 within Windows 11 Pro Version 21H2):
- Apollo installed from (source):
- Apollo version (6.0):
Steps to reproduce the issue:
- Installed latest NVIDIA driver (511.79)
- Installed LibTorch on Ubuntu
- Updated WSL2 as administrator in Windows CMD
- Tested drivers using “nvidia-smi” command on Ubuntu
- Installed Docker CE on Ubuntu
- Installed Docker Desktop on Windows
- Installed Nvidia Container Toolkit on Ubuntu
- Under Docker Desktop Settings, General - Checked “Use the WSL 2 based Engine”
- Under Docker Desktop Settings, Resources, WSL Integration - Checked box for “Enable integration with my Default WSL Distro”
- Under Docker Desktop Settings, Resources, WSL Integration - Checked “Ubuntu 18.04” box for “Enable integration with additional distros”
- ran docker hello world command in Ubuntu to make sure docker was running smoothly
- Cloned repository in Ubuntu terminal with “git clone https://github.com/ApolloAuto/apollo”
- Typed “cd apollo” in Ubuntu terminal
- Launched container in Ubuntu terminal with “./docker/scripts/dev_start.sh”
- Entered container in Ubuntu terminal with “./docker/scripts/dev_into.sh”
- Built apollo in Ubuntu terminal with “./apollo.sh build_opt_gpu”
- Launched dreamview by typing “./scripts/bootstrap_lgsvl.sh” in the Ubuntu terminal (note that I have also tried it with “./scripts/bootstrap.sh” and it gave me the same local host link, but the link still did not work in the browser)
- Dreamview successfully activates, and the Ubuntu terminal tells me to go to https://localhost:8888
- I open a second Ubuntu terminal and type “sudo ufw allow 8888”
- In this second Ubuntu terminal, I type “sudo ufw disable” to turn off anything that might block the link
- I then run Windows CMD as admin and type “netsh advfirewall set allprofiles state off” to turn off anything that might block the link
- I then type “netsh firewall show state” in CMD to make sure that port 8888 is not being blocked
- I then copy https://localhost:8888 from the Ubuntu terminal and paste it in Microsoft edge (I have also tried pasting it in chrome and Firefox, which yields the same result) (I have tried swapping out localhost for a fair number of different things suggested on the internet, and none have worked thus far)
- I am then told that it refused to connect
Supporting materials (screenshots, command lines, code/script snippets):
The following text appears after running ./docker/scripts/dev_start.sh
ryan@DESKTOP-D6RS2V8:~/apollo$ ./docker/scripts/dev_start.sh
[INFO] Use default GeoLocation settings
[INFO] Start pulling docker image apolloauto/apollo:dev-x86_64-18.04-20210914_1336 …
dev-x86_64-18.04-20210914_1336: Pulling from apolloauto/apollo
Digest: sha256:4c8749787adc30de8d64321589adfde5905c45fc22cfc5aee435e2ca5d20733f
Status: Image is up to date for apolloauto/apollo:dev-x86_64-18.04-20210914_1336
docker.io/apolloauto/apollo:dev-x86_64-18.04-20210914_1336
[INFO] Remove existing Apollo Development container …
[INFO] Removing existing Apollo container: apollo_dev_ryan
apollo_dev_ryan
[INFO] Determine whether host GPU is available …
[INFO] USE_GPU_HOST: 1
[WARNING] No device named /dev/nvidia0
[WARNING] No device named /dev/nvidiactl
[WARNING] No device named /dev/nvidia-uvm
[WARNING] No device named /dev/nvidia-uvm-tools
[WARNING] No device named /dev/nvidia-modeset
[INFO] Starting mounting map volumes …
[INFO] Load map sunnyvale_big_loop from image: apolloauto/apollo:map_volume-sunnyvale_big_loop-latest
[INFO] Create volume apollo_map_volume-sunnyvale_big_loop_ryan from image: apolloauto/apollo:map_volume-sunnyvale_big_loop-latest
[INFO] Start pulling docker image apolloauto/apollo:map_volume-sunnyvale_big_loop-latest …
map_volume-sunnyvale_big_loop-latest: Pulling from apolloauto/apollo
Digest: sha256:0a27ea953198d397fd7bf3b0e670951f6a9d645d362a8bdc707589a26cde8861
Status: Image is up to date for apolloauto/apollo:map_volume-sunnyvale_big_loop-latest
docker.io/apolloauto/apollo:map_volume-sunnyvale_big_loop-latest
[INFO] Load map sunnyvale_loop from image: apolloauto/apollo:map_volume-sunnyvale_loop-latest
[INFO] Create volume apollo_map_volume-sunnyvale_loop_ryan from image: apolloauto/apollo:map_volume-sunnyvale_loop-latest
[INFO] Start pulling docker image apolloauto/apollo:map_volume-sunnyvale_loop-latest …
map_volume-sunnyvale_loop-latest: Pulling from apolloauto/apollo
Digest: sha256:1337ca5d357f33318e38368b6218d343f6138c63a9bb491175ca7cdd39c1a789
Status: Image is up to date for apolloauto/apollo:map_volume-sunnyvale_loop-latest
docker.io/apolloauto/apollo:map_volume-sunnyvale_loop-latest
[INFO] Load map sunnyvale_with_two_offices from image: apolloauto/apollo:map_volume-sunnyvale_with_two_offices-latest
[INFO] Create volume apollo_map_volume-sunnyvale_with_two_offices_ryan from image: apolloauto/apollo:map_volume-sunnyvale_with_two_offices-latest
[INFO] Start pulling docker image apolloauto/apollo:map_volume-sunnyvale_with_two_offices-latest …
map_volume-sunnyvale_with_two_offices-latest: Pulling from apolloauto/apollo
Digest: sha256:5893abb847f7cffb5dd310f9bac307d5c2537797c247eb1c609f36de1943bdf5
Status: Image is up to date for apolloauto/apollo:map_volume-sunnyvale_with_two_offices-latest
docker.io/apolloauto/apollo:map_volume-sunnyvale_with_two_offices-latest
[INFO] Load map san_mateo from image: apolloauto/apollo:map_volume-san_mateo-latest
[INFO] Create volume apollo_map_volume-san_mateo_ryan from image: apolloauto/apollo:map_volume-san_mateo-latest
[INFO] Start pulling docker image apolloauto/apollo:map_volume-san_mateo-latest …
map_volume-san_mateo-latest: Pulling from apolloauto/apollo
Digest: sha256:12b04dbfa947f7f06dc5c3b7604be08988c560e850c037a2571998478f0ccf80
Status: Image is up to date for apolloauto/apollo:map_volume-san_mateo-latest
docker.io/apolloauto/apollo:map_volume-san_mateo-latest
[INFO] Mount other volumes …
[INFO] Create volume apollo_audio_volume_ryan from image: apolloauto/apollo:data_volume-audio_model-x86_64-latest
[INFO] Start pulling docker image apolloauto/apollo:data_volume-audio_model-x86_64-latest …
data_volume-audio_model-x86_64-latest: Pulling from apolloauto/apollo
Digest: sha256:1491b6de2b71bd6bc6326bf70a945da69360e490724df78849f6d70ff4d00f61
Status: Image is up to date for apolloauto/apollo:data_volume-audio_model-x86_64-latest
docker.io/apolloauto/apollo:data_volume-audio_model-x86_64-latest
[INFO] Create volume apollo_yolov4_volume_ryan from image: apolloauto/apollo:yolov4_volume-emergency_detection_model-x86_64-latest
[INFO] Start pulling docker image apolloauto/apollo:yolov4_volume-emergency_detection_model-x86_64-latest …
yolov4_volume-emergency_detection_model-x86_64-latest: Pulling from apolloauto/apollo
Digest: sha256:b7b3dd17adb0c94a7392f32b268d5eb8ec619fa0269e1931846448706518901e
Status: Image is up to date for apolloauto/apollo:yolov4_volume-emergency_detection_model-x86_64-latest
docker.io/apolloauto/apollo:yolov4_volume-emergency_detection_model-x86_64-latest
[INFO] Create volume apollo_faster_rcnn_volume_ryan from image: apolloauto/apollo:faster_rcnn_volume-traffic_light_detection_model-x86_64-latest
[INFO] Start pulling docker image apolloauto/apollo:faster_rcnn_volume-traffic_light_detection_model-x86_64-latest …
faster_rcnn_volume-traffic_light_detection_model-x86_64-latest: Pulling from apolloauto/apollo
Digest: sha256:c57fb57aba718ad948d27d98e50115c6955fbebf054e99c269aa4d1830384846
Status: Image is up to date for apolloauto/apollo:faster_rcnn_volume-traffic_light_detection_model-x86_64-latest
docker.io/apolloauto/apollo:faster_rcnn_volume-traffic_light_detection_model-x86_64-latest
[INFO] Create volume apollo_smoke_volume_ryan from image: apolloauto/apollo:smoke_volume-yolo_obstacle_detection_model-x86_64-latest
[INFO] Start pulling docker image apolloauto/apollo:smoke_volume-yolo_obstacle_detection_model-x86_64-latest …
smoke_volume-yolo_obstacle_detection_model-x86_64-latest: Pulling from apolloauto/apollo
Digest: sha256:848c0bc03e73898155a079576568d640ad6c6b2ec665d2ac2f1c46838f5c3fc9
Status: Image is up to date for apolloauto/apollo:smoke_volume-yolo_obstacle_detection_model-x86_64-latest
docker.io/apolloauto/apollo:smoke_volume-yolo_obstacle_detection_model-x86_64-latest
[INFO] Starting Docker container “apollo_dev_ryan” …
+ docker run --gpus all -itd --privileged --name apollo_dev_ryan -e DISPLAY=:0 -e DOCKER_USER=ryan -e USER=ryan -e DOCKER_USER_ID=1000 -e DOCKER_GRP=ryan -e DOCKER_GRP_ID=1000 -e DOCKER_IMG=apolloauto/apollo:dev-x86_64-18.04-20210914_1336 -e USE_GPU_HOST=1 -e NVIDIA_VISIBLE_DEVICES=all -e NVIDIA_DRIVER_CAPABILITIES=compute,video,graphics,utility --volume apollo_map_volume-sunnyvale_big_loop_ryan:/apollo/modules/map/data/sunnyvale_big_loop --volume apollo_map_volume-sunnyvale_loop_ryan:/apollo/modules/map/data/sunnyvale_loop --volume apollo_map_volume-sunnyvale_with_two_offices_ryan:/apollo/modules/map/data/sunnyvale_with_two_offices --volume apollo_map_volume-san_mateo_ryan:/apollo/modules/map/data/san_mateo --volume apollo_audio_volume_ryan:/apollo/modules/audio/data/ --volume apollo_yolov4_volume_ryan:/apollo/modules/perception/camera/lib/obstacle/detector/yolov4/model/ --volume apollo_faster_rcnn_volume_ryan:/apollo/modules/perception/production/data/perception/camera/models/traffic_light_detection/faster_rcnn_model --volume apollo_smoke_volume_ryan:/apollo/modules/perception/production/data/perception/camera/models/yolo_obstacle_detector/smoke_libtorch_model -v /home/ryan/apollo:/apollo -v /dev:/dev -v /media:/media -v /tmp/.X11-unix:/tmp/.X11-unix:rw -v /etc/localtime:/etc/localtime:ro -v /usr/src:/usr/src -v /lib/modules:/lib/modules --net host -w /apollo --add-host in-dev-docker:127.0.0.1 --add-host DESKTOP-D6RS2V8:127.0.0.1 --hostname in-dev-docker --shm-size 2G --pid=host -v /dev/null:/dev/raw1394 apolloauto/apollo:dev-x86_64-18.04-20210914_1336 /bin/bash
0d269fb1a14584342856d07724ddfb7d530d42f6ba7805d29a047a08b6ea35aa
+ ‘[’ 0 -ne 0 ‘]’
+ set +x
Adding group ryan' (GID 1000) ... Done. Adding user ryan’ …
Adding new user ryan' (1000) with group ryan’ …
Creating home directory /home/ryan' ... Copying files from /etc/skel’ …
[ OK ] Congratulations! You have successfully finished setting up Apollo Dev Environment.
[ OK ] To login into the newly created apollo_dev_ryan container, please run the following command:
[ OK ] bash docker/scripts/dev_into.sh
[ OK ] Enjoy!
Then, the following text appears after running ./docker/scripts/dev_into.sh
ryan@DESKTOP-D6RS2V8:~/apollo$ ./docker/scripts/dev_into.sh To run a command as administrator (user “root”), use “sudo <command>”. See “man sudo_root” for details.
Then, the following text appears after running ./apollo.sh build_opt_gpu
[ryan@in-dev-docker:/apollo]$ ./apollo.sh build_opt_gpu [INFO] Apollo Environment Settings: [INFO] APOLLO_ROOT_DIR: /apollo [INFO] APOLLO_CACHE_DIR: /apollo/.cache [INFO] APOLLO_IN_DOCKER: true [INFO] APOLLO_VERSION: master-2022-02-14-1518cbc9d1 [INFO] DOCKER_IMG: dev-x86_64-18.04-20210914_1336 [INFO] APOLLO_ENV: STAGE=dev USE_ESD_CAN=false [INFO] USE_GPU: USE_GPU_HOST=1 USE_GPU_TARGET=1 [ OK ] Running GPU build on x86_64 platform. [WARNING] ESD CAN library supplied by ESD Electronics doesn’t exist. [WARNING] If you need ESD CAN, please refer to: [WARNING] third_party/can_card_library/esd_can/README.md [INFO] Build Overview: [INFO] USE_GPU: 1 [ 0 for CPU, 1 for GPU ] [INFO] Bazel Options: --config=opt --config=gpu [INFO] Build Targets: //modules/… union //cyber/… [INFO] Disabled: except //modules/drivers/canbus/can_client/esd/… Starting local Bazel server and connecting to it… (05:43:30) INFO: Invocation ID: 2a8814e0-9f85-4af7-ad1a-faebc8b2a873 (05:43:31) INFO: Current date is 2022-02-27 (05:43:35) INFO: Analyzed 5452 targets (687 packages loaded, 20078 targets configured). (05:43:35) INFO: Found 5452 targets… (05:43:54) INFO: Elapsed time: 25.037s, Critical Path: 16.75s (05:43:54) INFO: 1 process: 1 internal. (05:43:54) INFO: Build completed successfully, 1 total action ============================================== [ OK ] Done building apollo. Enjoy! ==============================================
Finally, I start Dreamview with the following command ./scripts/bootstrap_lgsvl.sh
[ryan@in-dev-docker:/apollo]$ ./scripts/bootstrap_lgsvl.sh Starting modules/drivers/tools/image_decompress/launch/image_decompress.launch nohup: appending output to ‘nohup.out’ nohup: appending output to ‘nohup.out’ [ OK ] Launched module monitor. nohup: appending output to ‘nohup.out’ [ OK ] Launched module dreamview. Dreamview is running at http://localhost:8888
When I paste localhost into my browser, the following occurs

About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 15 (3 by maintainers)
@rZapp11
Are you using WSL2 + Docker Desktop for Windows? If yes, maybe you can try using Linux docker or port mapping feature. Because Docker Desktop for Windows not support host net driver, under this condition apollo docker scripts will create host network in an isolate netork namespace which you cannot access. You can see official documents:
I use port mapping to solve the problem:
Then follow the installation section and you can access to dreamview by http://${wsl2 instance ip}:8888. In my case, My wsl2 instance ip is 172.20.88.30, so I can access web service by http://172.20.88.30:8888/:
normally, it should be the same with wsl2. Maybe you can try this command in apollo dev docker to test if dreamview is working:
curl http://localhost:8888If get html code as output, maybe dreamview is working then try to solve docker/wsl2 network configuration problem. Otherwise, make sure your dreamview is working.in my case,just set port mapping,then it works! thanks