Update Rhasspy 2.5.5 docker image

Hello,

I try to update Rhasspy version 2.5.1 to 2.5.5 with docker command

docker pull rhasspy/rhasspy

But when I open web interface, I always have 2.5.1
2020-08-12_09-17

I noob in docker, I thinck I forget one command to take that update

Yes, this may seem a bit strange when you start with Docker: docker pull only downloads the new image, but the current Rhasspy container is still based on the old image. So you have to:

  • Stop the container: docker stop rhasspy
  • Remove the container: docker rm rhasspy
  • Create the container again with your original docker run command.

After this, the Rhasspy container is running from the newest image you downloaded with the docker pull command.

1 Like

Yeah what @koan said : )

Thank you, it works better

No problem, I have updated the documentation now to make this clearer.

You should also check which images you have installed but are unused (the old rhasspy one for example).
You can check the images by typing docker image ls.
If you see a unused image you can remove it by typing docker rmi First4DigitsOfImageId
(e.g. docker rmi a2b5)
This will save you quite some discspace because images tend to be pretty big in size.

There is a official Docker cheat sheet aswell, so maybe you take a look at it.

2 Likes

Dear Koan,
Could you also explain how to update the Rhasspy docker image properly (and safely) when docker-compose is used as in the articles you wrote in the Dutch magazine Computer!totaal july/august 2020 .
I tried it as follows:
docker stop rhasspy
docker rm rhasspy
docker pull rhasspy/rhasspy
docker-compose pull
docker compose restart

but that seemed a bad idea, it broke the installation (fortunately I did backup my SD-card).

kind regards,
hugo

In what way did it break the installation? If youā€™re using Docker Compose, a docker-compose pull and docker-compose up -d (to be sure that the image is recreated from scratch) should suffice. And make sure to specify rhasspy/rhasspy as the image in the Docker Compose file, as that article was written when Rhasspy 2.5 was still a pre-release and needed the rhasspy/rhasspy:2.5.0-pre image tag.

1 Like

The webinterface of Rhasspy just displayed an extra message: ā€œerrorā€ without any extra comment.
There was nothing in the log-section (as Rhasspy didnā€™t run I presume)
Unfortunately I canā€™t reproduce this again as I already rewrote the SD-card. This time I proceeded
as follows:
I changed in docker-compose.yml the line
image: rhasspy/rhasspy:2.5.0
to
image: rhasspy/rhasspy

then I used the following commands:
docker-compose pull
docker-compose up -d

Unfortunately the Rhasspy webpage still shows Rhasspy 2.5.0, so the update is not running

This is the output of the command docker-images:

pi@rhasspy:~ $ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
nodered/node-red latest fa3bc6f20464 8 days ago 376MB
rhasspy/rhasspy latest f8f6882da094 2 weeks ago 1.15GB
nodered/node-red b7b447a3e061 4 weeks ago 377MB
rhasspy/rhasspy 2.5.0 8dcdffe70099 2 months ago 871MB
containous/whoami latest 4c628a667044 5 months ago 6.64MB
hello-world latest 851163c78e4a 7 months ago 4.85kB

How can I make the latest version of rhasspy start?

kind regards,
Hugo

If you run docker ps it will output all the running containers and the images they are using.

Maybe the version 2.5.5 is now actually running and your browser is not displaying the correct number. In that case it should show the correct number after clearing the browser cache.

2 Likes

This is what I found out:
pi@rhasspy:~ $ docker ps

CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
ef30abb627dd b7b447a3e061 ā€œnpm start --cache /Ć¢Ā€Ā¦ā€ 11 days ago Up 46 minutes (healthy) 0.0.0.0:1880->1880/tcp, 0.0.0.0:1883->1883/tcp node-red
496d0eefa910 rhasspy/rhasspy:2.5.0 ā€œbash /usr/bin/rhassĆ¢Ā€Ā¦ā€ 2 weeks ago Up 46 minutes 0.0.0.0:12101->12101/tcp rhasspy

So, it is definitely still 2.5.0 which is running :frowning:

I just did docker-compose pull and docker-compose up -d with my Rhasspy 2.5.4 satellite and afterwards I see 2.5.5 running.

Your docker ps output shows the 2.5.0 version indeed from your previous version of the Docker Compose file. I would first do docker-compose down now to stop and remove all running containers created by Docker Compose. Then see with docker ps if thereā€™s still a container running. If so, stop and remove it. Then do the docker-compose pull and docker-compose up -d again.

1 Like

Did you make sure to save the changes you made to you docker-compose file.

Yes I surely did save the changes. Here is the file:

version: ā€˜3.7ā€™

services:
rhasspy:
image: rhasspy/rhasspy
container_name: rhasspy
restart: always
volumes:

  • /home/pi/containers/rhasspy/profiles:/profiles
    ports:
  • 12101:12101
    devices:
  • /dev/snd:/dev/snd
    command: --user-profiles /profiles --profile nl
    node-red:
    image: nodered/node-red
    container_name: node-red
    restart: always
    volumes:
  • ./node-red:/data
    ports:
  • 1880:1880
  • 1883:1883
    environment:
  • TZ=Europe/Brussels

I followed your instructions as you can see here below:

pi@rhasspy:~ $ docker-compose down
Stopping node-red ā€¦ done
Stopping rhasspy ā€¦ done
Removing node-red ā€¦ done
Removing rhasspy ā€¦ done
Removing network pi_default

pi@rhasspy:~ $ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES

pi@rhasspy:~ $ docker-compose pull
Pulling rhasspy ā€¦ done
Pulling node-red ā€¦ done

pi@rhasspy:~ $ docker-compose up -d
Creating network ā€œpi_defaultā€ with the default driver
Creating node-red ā€¦ done
Creating rhasspy ā€¦ done

i@rhasspy:~ $ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
cfca1ee75c55 nodered/node-red ā€œnpm start --cache /ā€¦ā€ 48 seconds ago Up 44 seconds (healthy) 0.0.0.0:1880->1880/tcp, 0.0.0.0:1883->1883/tcp node-red
6f830ed2e261 rhasspy/rhasspy ā€œbash /usr/lib/rhassā€¦ā€ 48 seconds ago Up 44 seconds 0.0.0.0:12101->12101/tcp rhasspy

And 2.5.5 popped up!

My conclusion is that to update rhasspy properly using docker-compose, the first step of the following
three is also necessary (as that is the only difference with what I did the first time --after correcting the yml-fileā€“):
docker-compose down
docker-compose pull
docker-compose up -d

kind regards,
Hugo

Well, I thought that I would throw 2 cent more into this mix. There is a docker out there which is called Watchtower:

https://containrrr.dev/watchtower/

This docker will automatically update your docker containers, and you can set it up to only update certain dockers or all of them. It can also be made to clean up the old docker containers, so they arenā€™t left around taking up space. You could leave this running all the time and your dockers will get updated when a new one is released. But, for those of you that donā€™t want this to happen all the time, just keep the Watchtower docker stopped. When you want to update a docker then start it and let the docker(s) update and then stop the Watchtower docker after they have finished updating. I use this all the time, and I think it is wonderful, I hope some of you find it useful as well.

2 Likes

and maybe remove the old imagesā€¦
And think about if you still need the example images:

  • hello-world 8511
  • chinatainous/whoami 4c62
  • rhasspy/rhasspy 2.5.0 8dcd

Youā€™ll save nearly 1 GB

1 Like