cedbossneo / openmower-gui

28 stars 17 forks source link

Cannot see containers #3

Closed alexvaut closed 1 year ago

alexvaut commented 1 year ago

Very nice ! I already run it on my openmower it works fine except the container part. I can connect to podman socket with --volume /run/podman/podman.sock:/run/podman/podman.sock --env DOCKER_HOST=unix:///run/podman/podman.sock; I also added the label project=openmower to the openmower container but the openmower container doesn't show up in the UI. it is just empty... Any idea what I'm missing ? There are no erros in the openmower-gui container.

Command used:

sudo /usr/bin/podman run \
  --replace --detach --tty --privileged \
  --name openmower-gui \
  --network=host \
  --volume /run/podman/podman.sock:/run/podman/podman.sock \
  --volume /boot/openmower/mower_config.txt:/config/mower_config.sh \
  --env MOWER_CONFIG_FILE=/config/mower_config.sh \
  --env DOCKER_HOST=unix:///run/podman/podman.sock  \
  --env ROS_MASTER_URI=http://192.168.1.50:11311 \
  local/openmower-ui:latest

image image

cedbossneo commented 1 year ago

You need two labels, project: openmower and app: openmower

alexvaut commented 1 year ago

It works, thank you !

2m commented 1 year ago

I tried running openmower-gui using the command from the first comment, but I was not able to enter the map editing mode. The dots on the map path would not appear. Is there something else I need to do to run openmower-gui?

alexvaut commented 1 year ago

It was working fine for me. For the container part, you need to add 2 labels app and project in openmower container:


ExecStart=/usr/bin/podman run --conmon-pidfile %t/container-openmower.pid --cidfile %t/container-openmower.ctr-id --cgroups=no-conmon \
...
  --label io.containers.autoupdate=registry \
  --label project=openmower \
  --label app=openmower \
  --env ROSOUT_DISABLE_FILE_LOGGING=True \
...
2m commented 1 year ago

Thanks a lot! It works! For anyone else, the service file you need to edit is /etc/systemd/system/openmower.service and after that to load new service file you need to execute sudo systemctl daemon-reload.

After restarting openmower service (sudo systemctl restart openmower) I started openmower-gui with:

sudo podman run --replace --detach --tty --privileged \
  --restart always \
  --name openmower-gui \
  --network host \
  --volume /dev:/dev \
  --volume /run/podman/podman.sock:/run/podman/podman.sock \
  --volume /boot/openmower/mower_config.txt:/config/mower_config.sh \
  --env MOWER_CONFIG_FILE=/config/mower_config.sh \
  --env DOCKER_HOST=unix:///run/podman/podman.sock \
  --env ROS_MASTER_URI=http://localhost:11311 \
  ghcr.io/cedbossneo/openmower-gui:master