Haidra-Org / AI-Horde-Worker

This repo turns your PC into a AI Horde worker node
GNU Affero General Public License v3.0
245 stars 70 forks source link

The Docker image is invalid #316

Open Vectorrent opened 11 months ago

Vectorrent commented 11 months ago

When I try to use this command:

docker run ghcr.io/Haidra-Org/ai-horde-worker

I get this error:

docker: invalid reference format: repository name must be lowercase.

So, I try this command:

docker run ghcr.io/haidra-org/ai-horde-worker

And I get this error:

Unable to find image 'ghcr.io/haidra-org/ai-horde-worker:latest' locally
docker: Error response from daemon: manifest unknown.

Can somebody fix this image for us?

I know I could download the repo, and build the image myself - but I won't have permissions to push it to the Haidra-Org repo. It would be better if a maintainer did this.

Vectorrent commented 11 months ago

For what it's worth, I did end up trying to build the Docker image, and it's also broken:

...
73.24 Setting up libavformat58:amd64 (7:4.4.2-0ubuntu0.22.04.1) ...
73.26 Setting up libavfilter7:amd64 (7:4.4.2-0ubuntu0.22.04.1) ...
73.28 Setting up libavdevice58:amd64 (7:4.4.2-0ubuntu0.22.04.1) ...
73.30 Setting up ffmpeg (7:4.4.2-0ubuntu0.22.04.1) ...
73.32 Processing triggers for libc-bin (2.35-0ubuntu3.4) ...
73.45 Processing triggers for ca-certificates (20230311ubuntu0.22.04.1) ...
73.46 Updating certificates in /etc/ssl/certs...
74.18 0 added, 0 removed; done.
74.18 Running hooks in /etc/ca-certificates/update.d...
74.18 done.
74.19 Processing triggers for libgdk-pixbuf-2.0-0:amd64 (2.42.8+dfsg-1ubuntu0.2) ...
75.63 
75.63 bzip2: Compressed file ends unexpectedly;
75.63   perhaps it is corrupted?  *Possible* reason follows.
75.63 bzip2: Inappropriate ioctl for device
75.63   Input file = (stdin), output file = (stdout)
75.63 
75.63 It is possible that the compressed file(s) have become corrupted.
75.63 You can use the -tvv option to test integrity of such files.
75.63 
75.63 You can use the `bzip2recover' program to attempt to recover
75.63 data from undamaged sections of corrupted files.
75.63 
75.63 tar: Child returned status 2
75.63 tar: Error is not recoverable: exiting now
75.64 ./update-runtime.sh: line 34: bin/micromamba: No such file or directory
75.64 ./update-runtime.sh: line 36: bin/micromamba: No such file or directory
75.64 ./update-runtime.sh: line 44: bin/micromamba: No such file or directory
75.65 ./update-runtime.sh: line 45: bin/micromamba: No such file or directory
------
failed to solve: process "/bin/sh -c apt-get update && apt-get install -y         ffmpeg         libsm6         libxext6         bzip2         wget         libgdk-pixbuf2.0-0       && ./update-runtime.sh       && rm -rf /var/lib/apt/lists/*       && bin/micromamba run -r conda -n linux python -s -m pip cache purge" did not complete successfully: exit code: 127
Keeo commented 9 months ago

I had similar issue, could not get it working. I found similar repo with worker for Horde. I have no idea what is the difference between them or why there are two of them. The structure looks similar so here is what I did to make the horde-worker-reGen work in docker with nvidia gpu.

I ignored all the docker stuff that is already in and build it from ground up. Here is the Dockerfile and docker-compose.yaml to get it working.

# Commands to make folder structure that fits all of this
mkdir /tmp/horde
cd /tmp/horde
git clone https://github.com/Haidra-Org/horde-worker-reGen.git
touch horde-worker-reGen/Dockerfile 
touch docker-compose.yaml
cp horde-worker-reGen/bridgeData-template.yaml bridgeData.yaml
# And configure the bridgeData.yaml to suit your needs.
# horde-worker-reGen/Dockerfile
FROM pytorch/pytorch:2.1.2-cuda12.1-cudnn8-runtime

RUN apt-get update && apt-get install -y wget bzip2 curl libgl1-mesa-glx

RUN sh -c 'curl -Ls https://micro.mamba.pm/api/micromamba/linux-64/latest | tar -xvj bin/micromamba'
RUN cp bin/micromamba /bin/micromamba
RUN chmod +x /bin/micromamba

RUN apt-get clean autoremove --yes \
    && rm -rf /var/lib/{apt,dpkg,cache,log}

COPY ./horde-worker-reGen/requirements.txt /app/requirements.txt

WORKDIR /app
RUN mkdir /app/bin && cp /bin/micromamba /app/bin/micromamba

RUN pip install -r ./requirements.txt

ARG DEBIAN_FRONTEND=noninteractive

RUN apt-get install libgl1 libgl1-mesa-glx libglib2.0-0 git -y  # these things are needed for opencv as the repo asks for non-headless version

COPY ./horde-worker-reGen /app
CMD python -s download_models.py && python -s run_worker.py $*
# docker-compose.yaml
version: '3.8'
services:
  ai-horde-worker:
    deploy:
      resources:
        reservations:
          devices:
            - driver: nvidia
              device_ids: ['0']
              capabilities: [gpu]
    build:
      dockerfile: ./horde-worker-reGen/Dockerfile
    volumes:
      - ./models:/app/models
      - ./bridgeData.yaml:/app/bridgeData.yaml:ro
Efreak commented 8 months ago

@Keeo

I have no idea what is the difference between them or why there are two of them.

This repo is for the old worker. horde-worker-reGen is the new worker, which is kept up to date.