apollo icon indicating copy to clipboard operation
apollo copied to clipboard

Docker steps

Open Eulerianial opened this issue 9 years ago • 9 comments

I was trying to build the apollo on Mac and I already have Docker installed. Do I still need to run install_docker.sh script.

I tried without the install script and hitting error on unable to add user. Any tips to circumvent this issue?

Eulerianial avatar Jul 08 '17 19:07 Eulerianial

No need to run install_docker.sh. Mac support is tracked at #47

ycool avatar Jul 08 '17 22:07 ycool

You should be able to use docker/scripts/dev_start.sh and docker/scripts/dev_into.sh as a temp workaround. release_start.sh doesn't quite work with MAC for some reason. @wanglei828 for SA.

siyangy avatar Jul 09 '17 05:07 siyangy

I had succeed buliding apollo in MBP(2015,OS: 10.2.5),but I can't visit localhost:8887, it says"ERR_CONNECTION_REFUSED".the fellowing is my step: 1. I had install docker deamon in my MBP, so I jump "bash docker/scripts/install_docker.sh" step, when I execute "bash docker/scripts/dev_start.sh",there are some error:

-  find: /dev/fd/scripts: No such file or directory
- find: /dev/fd/scripts: No such file or directory
- \e[33m[WARNING] Failed to find device with pattern "ram*" ...
- find: /dev/fd/scripts: No such file or directory
- find: /dev/fd/scripts: No such file or directory
- \e[33m[WARNING] Failed to find device with pattern "loop*" ...
- docker: Error response from daemon: Bad response from Docker engine.
- See 'docker run --help'.
- Error response from daemon: Bad response from Docker engine
 I changed docker source and try serval times,"bash docker/scripts/dev_start.sh" executes succeed with following message:
- 505679240dc6: Pull complete 
- Digest: sha256:09aeb7850578a877fdb855bfe7319c857289faa1f68df3eede1a548a09783d09
- Status: Downloaded newer image for apolloauto/apollo:dev-20170707_1129
- Error response from daemon: No such container: apollo_dev
- Error response from daemon: No such container: apollo_dev
I try to pull the image by hand, it shows message:-docker pull apolloauto/apollo:dev-20170707_1129
- dev-20170707_1129: Pulling from apolloauto/apollo
- Digest: sha256:09aeb7850578a877fdb855bfe7319c857289faa1f68df3eede1a548a09783d09
- Status: Image is up to date for apolloauto/apollo:dev-20170707_1129
then I fellow the step,execute "./dev_into.sh ",the terminal show nothing.
then I execute "bash apollo.sh build",It execute success:
- WARNING: Running Bazel server needs to be killed, because the startup options are different.
- INFO: Found 190 targets...
- Slow read: a 194-byte read from /apollo/modules/perception/conf/adapter.conf took 7200ms.
- INFO: Elapsed time: 713.802s, Critical Path: 206.74s
- ============================
- [ OK ] Build passed!
- [INFO] Took 1816.160 seconds
- ============================

then I exectue "bash scripts/hmi.sh",the terminal show message:

-    Start roscore...
- HMI ros node service running at localhost:8887
- HMI running at http://localhost:8887
But I still can't visit "http://localhost:8887", Can you give me some advice?

Regards.

zx08uestc avatar Jul 09 '17 08:07 zx08uestc

Yes. I met the same issue "http://localhost:8887 can't be visited" after build it successfully. I followed the instructions in the page step by step. Any suggestion for that?

yipinp avatar Jul 09 '17 15:07 yipinp

@zx08uestc @yipinp can you check if there is any error in the logs which are located in data/log/ ? Thank you.

startcode avatar Jul 09 '17 15:07 startcode

In data/log/ . I found the files below:

hmi.out
hmi_ros_node_service.out
ros_node_service.INFO
ros_node_service.in_dev_docker.zhangxin.log.INFO.20170709-083132.8429
roscore.out

the message in each files is:

zhangxindeMacBook-Pro:log zhangxin$ cat hmi.out 
Traceback (most recent call last):
  File "modules/hmi/web/hmi_main.py", line 20, in <module>
    import gflags
ImportError: No module named gflags
zhangxindeMacBook-Pro:log zhangxin$ cat hmi_ros_node_service.out 
nohup: /Users/zhangxin/apollo/apollo/modules/hmi/ros_node/ros_node_service: No such file or directory

zhangxindeMacBook-Pro:log zhangxin$ cat ros_node_service.INFO 
Log file created at: 2017/07/09 08:31:32
Running on machine: in_dev_docker
Log line format: [IWEF]mmdd hh:mm:ss.uuuuuu threadid file:line] msg
I0709 08:31:32.895217  8446 ros_node_service.cc:65] [INFO] Server listening on 127.0.0.1:8897

zhangxindeMacBook-Pro:log zhangxin$ cat ros_node_service.in_dev_docker.zhangxin.log.INFO.20170709-083132.8429 
Log file created at: 2017/07/09 08:31:32
Running on machine: in_dev_docker
Log line format: [IWEF]mmdd hh:mm:ss.uuuuuu threadid file:line] msg
I0709 08:31:32.895217  8446 ros_node_service.cc:65] [INFO] Server listening on 127.0.0.1:8897
zhangxindeMacBook-Pro:log zhangxin$ cat roscore.out 
nohup: roscore: No such file or directory

This day morning, I execute "bash scripts/hmi.sh" again, it needs super permission, when I input the password: it shows the below message:

zhangxindeMacBook-Pro:apollo zhangxin$ bash scripts/hmi.sh
/Users/zhangxin/apollo/apollo/scripts/apollo_base.sh: line 22: 1499648011N: value too great for base (error token is "1499648011N")
/Users/zhangxin/apollo/apollo/scripts/apollo_base.sh: line 22: 1499648011N: value too great for base (error token is "1499648011N")
Password:
mknod: illegal option -- -
usage: mknod [-F format] name [b | c] major minor
       mknod [-F format] name [b | c] major unit subunit
       mknod name [b | c] number
       mknod name w
Start roscore...
HMI ros node service running at localhost:8887
HMI running at http://localhost:8887

@startcode @ycool

zx08uestc avatar Jul 10 '17 00:07 zx08uestc

@zx08uestc This problem: ImportError: No module named gflags can be addressed by installing the python-gflags package sudo pip install python-gflags

You can try run this command bash scripts/hmi.sh inside docker. The bash script does not work well on Mac.

startcode avatar Jul 10 '17 01:07 startcode

I have some problems in building the apollo. After I bash apollo.sh build, it always shows that Running Bazel server needs to be killed, because the startup options are different. And some errors following. In some forum, some people said that please make sure you have nuked your local cache and it no longer refers to boringssl-master-with-bazel, a version that will cause the issue. But I find that it is very difficult to nuke local cache. Does anyone knows how to nuke cache?

JoelinChee avatar Jul 26 '17 06:07 JoelinChee

Sorry that the question is hung on for a long time. I will close it after this reply. Please open another issue if it's not solved.

Generally you could try the following commands to refresh bazel:

bazel clean
rm -fr ~/.cache/bazel

xiaoxq avatar Apr 16 '18 16:04 xiaoxq