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!
@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!
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!