ApolloAuto / apollo

An open autonomous driving platform
Apache License 2.0
25.24k stars 9.72k forks source link

map volumes not mounted #15583

Open xudooo opened 1 week ago

xudooo commented 1 week ago

Describe the bug map volumes not mounted

To Reproduce Steps to reproduce the behavior:

  1. ./docker/scripts/dev_start.sh
  2. ./docker/scripts/dev_into.sh
  3. ls modules/map/data/sunnyvale
  4. nothing listed, and no map showed in Dreamview image

Expected behavior some map files are listed, and there is the map sunnyvale in dreamview

Additional context we downloaded registry.baidubce.com/apolloauto/apollo:map_volume-sunnyvale-latest, but used apolloauto/apollo:map_volume-sunnyvale-latest to mount map volume, so this helps: https://github.com/ApolloAuto/apollo/blob/master/docker/scripts/dev_start.sh#L368

--- a/docker/scripts/dev_start.sh
+++ b/docker/scripts/dev_start.sh
@@ -365,6 +365,7 @@ function docker_restart_volume() {
   info "Create volume ${volume} from image: ${image}"
   docker_pull "${image}"
   docker volume rm "${volume}" > /dev/null 2>&1
+  image=$(docker images --format "{{.Repository}}:{{.Tag}}" | grep "${image}" | head -n 1)
   docker run -v "${volume}":"${path}" --rm "${image}" true > /dev/null
 }