I would like to install Docker on my ReSpeaker V2 by following your installation guide.
<LINK_TEXT text=“https://github.com/respeaker/get_starte … n_guide.md”>https://github.com/respeaker/get_started_with_respeaker/blob/master/docs/ReSpeaker_Core_V2/docker_installation_guide.md</LINK_TEXT>
Is this guide still relevant for installing Docker?
This is not mentioned in the guide but we must first put a ReSpeaker image on the map sd? If so, it’s done.
Subsequently, I have a problem when I edit the daemon.json file.
I can insert the content:
{
“storage driver”: “overlay2”
}
but I can not and do not know how to save.
Every time I read the file to check it, it does not contain anything. In addition, I think files are created every time I edit the daemon.json file. I have about 12, is this normal? How to delete them?
I do not know if you know, but I would like to install Gladys assistant who uses Docker
https://documentation.gladysassistant.com
https://github.com/GladysAssistant/Gladys
Thank you very much for your help.
Hi There
daemon.json can be modified by using sudo .
eg :
</s><i>
</i> sudo nano /etc/docker/daemon.json
<e>
and you can save it by typing Ctrl+o
Thanks, with the modification of the command, I can save the script.
By cons these two commands do absolutely nothing.
Is there change at this level?
</s>curl -fsSL https://download.docker.com/linux/raspbian/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=armhf] https://download.docker.com/linux/raspbian $(lsb_release -cs) stable"
<e>
This one too I have an error after:
</s>docker run arm32v7/hello-world<e>
Thanks
This little elegant case is probabaly the most suitable case which you can get for ReSpeaker. The design is compact while at the same time provides enough space for one ReSpeaker core plus one ReSpeaker Far-field MIC array. There isn’t much ornament except the rounding aperture that makes your voice more reachable and the translucent circular ring that indicates the light being generated from the ReSpeaker inside. ReSpeaker Core v2.0 is designed for voice interface applications. It is based on the Rockchip RK3229, a quad-core ARM Cortex A7, running up to 1.5GHz, with 1GB RAM.
I’m sorry that I resumed the old topic, but I purchased this device Raspeaker Core v2.0 on 03/19/2023 and figured it out on my own, but unfortunately there is no normal instruction. Therefore, I want to add instructions so that it is here and it can help others. The device itself is interesting, but it has little space, and thanks to Docker, I was able to install Rhasspy and Home Assistant. It turned out to be an excellent mini computer with voice control and home control. I would also like to add how to put Docker on an external media, for example, on an SD card, since there is little space on the built-in media
Preparation
sudo apt-get update
sudo apt-get install apt-transport-https ca-certificates curl gnupg2 lsb-release software-properties-common
curl -fsSL https://download.docker.com/linux/raspbian/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=armhf] https://download.docker.com/linux/raspbian $(lsb_release -cs) stable"
Install the docker-ce package
sudo apt-get update
sudo apt-get install docker-ce
Let’s configure docker to use the overlay 2 file system driver
sudo nano /etc/docker/daemon.json
It is recommended to mount the SD card and put the containers on the SD card. Otherwise, there won’t be enough space on the built-in emmc.
If we do not plan to transfer to the SD card. Detailed installation here
{
"storage-driver": "overlay2"
}
If we plan to transfer to an SD card. After that, be sure to configure the automatic mounting of the SD card (read below)
{
"data-root": "/mnt/sd/docker",
"storage-driver": "overlay2"
}
Adding the current user to the docker group
sudo groupadd docker
sudo usermod -aG docker $USER
Do not run Docker yet, as we need to mount the disk and make some settings
Since there is only 4GB of space in Raspeaker Core v2.0, this is very small and the size of the images is simply not enough. To use Docker, connect the SD card and transfer Docker there.
Docker transferring a directory with images and containers to another partition
Output a list of sections
df -h
Output a list of disks
fdisk -l
Outputs a tree-like output that includes all block devices connected to the operating system
lsblk
Having found out the name of your SD card or the media you want to connect, now you need to prepare the media for the docker. We will prepare the SD card before we mount it. mf format the SD card to ext4 format
sudo parted -s /dev/mmcblk0 mklabel gpt
sudo parted -s /dev/mmcblk0 mkpart primary ext4 2 100%
sudo parted -s /dev/mmcblk0 align-check optimal 1
sudo mkfs.ext4 /dev/mmcblk0
Having prepared the media, now we will configure the automatic mounting of the disk. Again, you need to find out the media name or find out the UUID.
View the list of disks
lsblk
Viewing the assigned UUIDs to devices
blkid
An example of what the UUID of an SD card looks like
/dev/mmcblk0: UUID=“1a02612c-4343-4298-95f1-67a294cba01a” TYPE=“ext4”
Opening fstab
nano /etc/fstab
Adding an entry for auto-editing
UUID="6b6cff22-35f9-4b12-83f5-61135df0df8c" /mnt/sd ext4 auto,rw,relatime 0 0
или
/dev/mmcblk0 /mnt/sd ext4 auto,rw,relatime 0 0
Create an sd folder in /mnt to mount the SD card
mkdir /mnt/sd
Starting disk mounting
mount -a
Check if the disk is successfully mounted, where we should see /dev/mmcblk0 /mnt/sdcard
df -h
To check, we can reboot Re Speaker Core v2.0 to make sure that the disk is mounted automatically
sudo systemctl reboot
Before starting Docker, we first check where the directory for images and containers is located, the path should be Docker Root Dir: /mnt/sd/docker
docker info |grep "Root Dir"
Enabling docker to run on boot
sudo systemctl enable docker
Launching docker
sudo systemctl restart docker
If desired, you can install Portainer
docker run -d -p 8000:8000 -p 9000:9000 --name=portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer
Install Home Assistant via Docker Stacks
version: "3.8"
services:
homeassistant:
container_name: home-assistant
restart: unless-stopped
image: homeassistant/home-assistant:stable
privileged: true
network_mode: bridge
ports:
- 8123:8123
devices:
- /dev/ttyACM0:/dev/ttyACM0
volumes:
- /home/docker/homeassistant/config:/config
- /home/docker/homeassistant/media:/media
- /etc/localtime:/etc/localtime:ro
environment:
- TZ=Europe/Moscow
Install Rhasspy via Docker Stacks
version: "3.8"
services:
rhasspy:
image: rhasspy/rhasspy
container_name: rhasspy
privileged: true
network_mode: bridge
restart: always
ports:
- 12101:12101
devices:
- /dev/snd:/dev/snd
volumes:
- /home/docker/rhasspy/.config/rhasspy/profiles:/profiles
- /etc/localtime:/etc/localtime:ro
command: --user-profiles /profiles --profile ru