Apollo: Apollo 3.5 and 3.0.0 on the same machine

Created on 15 Mar 2019  Β·  2Comments  Β·  Source: ApolloAuto/apollo

Hi!

Now I try to migrate Apollo 3.5 from 3.0.0 and have an issue, when sequentially starting two dockers (for 3.0.0 and 3.5).

When I build, for example, v 3.0.0, and then start 3.5, I need to rebuild it. I think, it is related with bazel cache common for both.
Am I right and how could I change it?

Thanks!

Build Question

Most helpful comment

@frontw Yes, it's about bazel cache! Both the two containers mapping ~/.cache to the container's ~/.cache, bazel's output directory is under ~/.cache/bazel, you would check the bash script dev_start.sh, like this:
volumes="-v $APOLLO_ROOT_DIR:/apollo
-v $HOME/.cache:${DOCKER_HOME}/.cache"

So we can map bazel to another location, just like this:
volumes="-v $APOLLO_ROOT_DIR:/apollo
-v $HOME/.cache:${DOCKER_HOME}/.cache
-v ${APOLLO_ROOT_DIR}/../bazel:${DOCKER_HOME}/.cache/bazel"

Then, the directory structure would be like this:
.
β”œβ”€β”€ ApolloAuto3.0
β”‚Β Β  β”œβ”€β”€ apollo
β”‚Β Β  └── bazel
└── ApolloAuto3.5
Β  Β  β”œβ”€β”€ apollo
Β Β  └── bazel
Hope this may help you!

All 2 comments

@frontw Yes, it's about bazel cache! Both the two containers mapping ~/.cache to the container's ~/.cache, bazel's output directory is under ~/.cache/bazel, you would check the bash script dev_start.sh, like this:
volumes="-v $APOLLO_ROOT_DIR:/apollo
-v $HOME/.cache:${DOCKER_HOME}/.cache"

So we can map bazel to another location, just like this:
volumes="-v $APOLLO_ROOT_DIR:/apollo
-v $HOME/.cache:${DOCKER_HOME}/.cache
-v ${APOLLO_ROOT_DIR}/../bazel:${DOCKER_HOME}/.cache/bazel"

Then, the directory structure would be like this:
.
β”œβ”€β”€ ApolloAuto3.0
β”‚Β Β  β”œβ”€β”€ apollo
β”‚Β Β  └── bazel
└── ApolloAuto3.5
Β  Β  β”œβ”€β”€ apollo
Β Β  └── bazel
Hope this may help you!

Closing this issue as it appears to be resolved!

Was this page helpful?
0 / 5 - 0 ratings