hmakelin / gisnav

Estimates airborne drone global position by matching video to map retrieved from onboard GIS server.
https://hmakelin.github.io/gisnav
MIT License
49 stars 21 forks source link

Unsuccessful Installation - Error response from daemon: No such image: gisnav-postgres:latest #113

Closed aranofer closed 3 months ago

aranofer commented 8 months ago

What's the issue Error response from daemon: No such image: gisnav-postgres:latestainers WSL, Ubuntu 22.04.3 LTS.

when executing:

$ make -C docker demo

after ~1 hour of running Make fails, and states missing docker Image.

Error Code: ⠋ Container gisnav-gscam-1 Creating 0.0s Error response from daemon: No such image: gisnav-postgres:latest make: *** [Makefile:172: create-offboard-sitl-dev-px4] Error 1 make: Leaving directory '/home/aranof/Documents/gisnav/docker' /

Note: When I attempted to Run command Again, missing Image changed to: "Error response from daemon: No such image: gisnav-postgres:latestainers" (Unlike gisnav-postgres:latest)

hmakelin commented 8 months ago

Hi Aran,

Thank you for reporting this issue. I see that at least in the docker-compose.yaml file the postgres service is not included under the depends_on key for the gisnav service which might be the cause of this issue - I've submitted https://github.com/hmakelin/gisnav/pull/114 to fix it which I have yet to test. ~1hr build time for the images sounds about right - for example building the gisnav image requires building MAVROS and px4_msgs, and downloading torch and some other large NVIDIA libraries, all of which take quite a lot of time.

In the meantime you could try building, creating and starting the services manually:

cd colcon_ws/src/gisnav/docker
docker compose -p gisnav build gisnav qgc
docker compose -p gisnav create gisnav qgc
make expose-xhost
docker compose -p gisnav start px4

Wait until the PX4 GUI appears - it might need to download some models which may take a while. Then start gisnav and QGC:

docker compose -p gisnav start gisnav qgc

And to stop all containers that have the gisnav prefix:

docker compose -g gisnav stop
JiatengSun commented 5 months ago

Hi Aran,

Thank you for reporting this issue. I see that at least in the docker-compose.yaml file the postgres service is not included under the depends_on key for the gisnav service which might be the cause of this issue - I've submitted #114 to fix it which I have yet to test. ~1hr build time for the images sounds about right - for example building the gisnav image requires building MAVROS and px4_msgs, and downloading torch and some other large NVIDIA libraries, all of which take quite a lot of time.

In the meantime you could try building, creating and starting the services manually:

cd colcon_ws/src/gisnav/docker
docker compose -p gisnav build gisnav qgc
docker compose -p gisnav create gisnav qgc
make expose-xhost
docker compose -p gisnav start px4

Wait until the PX4 GUI appears - it might need to download some models which may take a while. Then start gisnav and QGC:

docker compose -p gisnav start gisnav qgc

And to stop all containers that have the gisnav prefix:

docker compose -g gisnav stop

After following this instruction, I got:

Creating 0/0 ⠋ Container gisnav-mavros-1 Creating 0.0s ⠋ Container gisnav-postgres-1 Creating 0.0s ⠋ Container gisnav-micro-ros-agent-1 Creating 0.0s ⠋ Container gisnav-qgc-1 Creating 0.0s ⠋ Container gisnav-gscam-1 Creating 0.0s ⠋ Container gisnav-mapserver-1 Creating 0.0s Error response from daemon: No such image: gisnav-micro-ros-agent:latest

When trying to run: docker compose -p gisnav create gisnav qgc

And everytime I try to rerun the command, I get different no such image error, with gisnav-mavros:latest, gisnav-mapserver:latest, gisnav-gscam:latest, gisnav-postgres:latest and gisnav-micro-ros-agent:latest.

hmakelin commented 5 months ago

Error response from daemon: No such image: gisnav-micro-ros-agent:latest

This to me suggests that the micro-ros-agent image was not built in the earlier steps so a container could not be created. You can see if some of these commands would help in building the image:

I checked that the v0.67.0 tag docker-compose.yaml file lists micro-ros-agent as a dependency of gisnav so this should build it:

cd colcon_ws/src/gisnav/docker
docker compose -p gisnav build gisnav --with-dependencies

Or try creating and building it directly:

cd colcon_ws/src/gisnav/docker
docker compose -p gisnav create --build micro-ros-agent

Sometimes when building a large number of images, some of the images might not get built because of e.g. connection issues with downloading dependencies, so this second command is useful for building any stragglers.

The expose-xhost recipe should only be run after the containers are created (it looks for containers that require GUI with gisnav in their name and exposes your X server to these specific containers)

hmakelin commented 3 months ago

I am closing this issue since as of release v0.68.0 the recommended way of building the services is using the new gnc Docker Compose wrapper. Hopefully this new CLI tool helps streamline the experience of building and managing the containers.