kercre123 / wire-pod

Free, fully-featured server software for the Anki Vector robot.
MIT License
467 stars 160 forks source link

[Pull request] Docker installation added to wiki #282

Open Zippy-boy opened 9 months ago

Zippy-boy commented 9 months ago

Iv got the markdown for the docker install for the wiki. Apparently you cant create a pull request for the wiki /:

Guide 5: Docker compose

  1. On the device you would like to install wire-pod on, make sure you have docker installed. This can be done with the command sudo apt install docker-ce for linux.
  2. Verify if the docker engine is working with the command sudo service docker status
  3. Run this command to create and download the wire-pod application
docker compose up -d -f https://raw.githubusercontent.com/kercre123/wire-pod/main/compose.yaml
  1. With a device on the same network as wire-pod, open a browser and head to the configuration page. http://YOUR_IP:8080. In that page, follow the instructions. Wire-pod should then be set up!
  2. Continue on to "Authenticate the bot with wire-pod", near the bottom of this page.

LINK: https://github.com/Zippy-boy/wire-pod/blob/master/Installation.md

g0t4 commented 5 months ago

IIAC you are using linux/amd64?

Zippy-boy commented 5 months ago

I am using linux/amd64 on my server.

TypicalZedF commented 5 months ago

Is this just a suggestion, or does this work?

Zippy-boy commented 5 months ago

This does work for an Ubuntu install. And is very similar for other OS's running docker.

TypicalZedF commented 4 months ago

What if i can't use port 8080...? Every software wants to use port 80 or 8080-

Zippy-boy commented 4 months ago

Then you can curl the compose file and change the port to something else. And then compose up

TypicalZedF commented 4 months ago

Do you think I could get this to work with Casa OS?

Zippy-boy commented 4 months ago

Yep, 100% Just make sure that when you change the port for the web UI change the left port but keep the right one at 8080. Like this 2342:8080

Zippy-boy commented 4 months ago

Command still seems to work for me (aswell as the image pulling). Try curl -O https://raw.githubusercontent.com/kercre123/wire-pod/main/compose.yaml And then docker compose up -d

TypicalZedF commented 4 months ago

Something is wrong with the compose. Try running docker search ghcr.io/kercre123/wire-pod on my terminal to check and well...

permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get "http://%2Fvar%2Frun%2Fdocker.sock/v1.45/images/search?term=ghcr.io%2Fkercre123%2Fwire-pod": dial unix /var/run/docker.sock: connect: permission denied

Then I tried a Sudo:

sudo docker search ghcr.io/kercre123/wire-pod
Error response from daemon: Unexpected status code 404
Zippy-boy commented 4 months ago

Huh, odd. The image should be available to the public as it's a public repo. Try sudo usermod -aG docker ${USER} And sudo chmod 666 /var/run/docker.sock

And then restart the computer.

If this doesn't work, you may have to docker login with github, but I don't think that's the issue.

TypicalZedF commented 4 months ago

This didn't seem to work

Zippy-boy commented 4 months ago

Now that's odd. Il have a look into that later. For now, it might be easier to build the docker image yourself then. Give me a sec and il get you the commands (:

Zippy-boy commented 4 months ago

So, pull the repo git clone https://github.com/kercre123/wire-pod.git cd wire-pod Replace the compose.yml file with

services:
  wire-pod:
    hostname: escapepod
    build: 
      context: .
    restart: unless-stopped
    ports:
      - 443:443
      - 8080:8080
      - 80:80
      - 8084:8084
    volumes:
      - wire-pod-data:/chipper/
      - wire-pod-model:/vosk/
volumes:
  wire-pod-data:
    driver: local
  wire-pod-model:
    driver: local

And then docker compose up -d

YoussefElSayad commented 4 months ago

@Zippy-boy Hello there, I received the error below while attempting to docker compose up on a raspberry pi, is there a way around it?

Error: "no matching manifest for linux/arm64/v8 in the manifest list entries"

Thank you for this!

Edit: If this helps in any way, I already have vector running on wire-pod directly on the pi, but i am moving all my services to docker containers instead

Zippy-boy commented 4 months ago

Hey, I haven't tried running docker wirepod on a raspberry pi yet, but I think if you add platform: linux/amd64 inside the wirepod service in the compose.yml file it should work. Let me know if you need any more help :)

YoussefElSayad commented 4 months ago

Thank you for the quick response, that did work! Now I just gotta figure out what ports to use instead of 80, 443, 8080 and 8084.

Thank you!

Zippy-boy commented 4 months ago

@YoussefElSayad, the only port you can change is 8080, I'm pretty sure. The vector firmware forces the rest. Don't change them!!

YoussefElSayad commented 4 months ago

@Zippy-boy What can i do if these ports are being used though? I think they are currently used by my current wire-pod installation on the raspberry pi but I wanted to ensure docker was running correctly in order to keep my vector up and running

Zippy-boy commented 4 months ago

I would recommend stopping the wirepod service and testing with the docker version. If you find that it doesn't work, you can always stop the docker version and start back up the local one, no files or configs will be lost

YoussefElSayad commented 3 months ago

Hello, it's me again! Just thought I'd update this thread with how I managed to get it to run on my raspberry pi

By simply using docker buildx i was able to create a new image locally with my preferred architecture, and afterwards i updated the docker compose file to use the newly created image, and tada! At first it brought me to the initial setup screen, however i later managed to have it read my existing data.

I'd be more than happy to help if anyone faced the same issue i faced, and thanks again @Zippy-boy for the prompt and helpful responses!