InvokeAI icon indicating copy to clipboard operation
InvokeAI copied to clipboard

[bug]: pull access denied for local/invokeai, repository does not exist or may r...

Open alpha754293 opened this issue 1 year ago • 5 comments

Is there an existing issue for this problem?

  • [X] I have searched the existing issues

Operating system

Linux

GPU vendor

Nvidia (CUDA)

GPU model

RTX A2000

GPU VRAM

6 GB

Version number

N/A

Browser

Firefox 128.0

Python dependencies

N/A

What happened

Cloned the github repository using git clone https://github.com/invoke-ai/InvokeAI. Made a backup copy of the docker-compose.yml. Set the .env file per the instructions from here (https://github.com/invoke-ai/InvokeAI/tree/main/docker). Got the error message "pull access denied for local/invokeai" using the "default" docker-compose.yml file.

Here is my docker-compose.yml file:

# Copyright (c) 2023 Eugene Brodsky https://github.com/ebr

x-invokeai: &invokeai
    image: "local/invokeai:latest"
    build:
      context: ..
      dockerfile: docker/Dockerfile

    # Create a .env file in the same directory as this docker-compose.yml file
    # and populate it with environment variables. See .env.sample
    env_file:
      - .env

    # variables without a default will automatically inherit from the host environment
    environment:
      # if set, CONTAINER_INVOKEAI_ROOT will override the Invoke runtime directory location *inside* the container
      - INVOKEAI_ROOT=${CONTAINER_INVOKEAI_ROOT:-/invokeai}
      - HF_HOME
    ports:
      - "${INVOKEAI_PORT:-9090}:${INVOKEAI_PORT:-9090}"
    volumes:
      - type: bind
        source: ${HOST_INVOKEAI_ROOT:-${INVOKEAI_ROOT:-~/invokeai}}
        target: ${CONTAINER_INVOKEAI_ROOT:-/invokeai}
        bind:
          create_host_path: true
      - ${HF_HOME:-~/.cache/huggingface}:${HF_HOME:-/invokeai/.cache/huggingface}
    tty: true
    stdin_open: true


services:
  invokeai-cuda:
    <<: *invokeai
    deploy:
      resources:
        reservations:
          devices:
            - driver: nvidia
              count: 1
              capabilities: [gpu]

  invokeai-cpu:
    <<: *invokeai
    profiles:
      - cpu

  invokeai-rocm:
    <<: *invokeai
    devices:
      - /dev/kfd:/dev/kfd
      - /dev/dri:/dev/dri
    profiles:
      - rocm

And here is my .env file:

## Make a copy of this file named `.env` and fill in the values below.
## Any environment variables supported by InvokeAI can be specified here,
## in addition to the examples below.

## INVOKEAI_ROOT is the path *on the host system* where Invoke will store its data.
## It is mounted into the container and allows both containerized and non-containerized usage of Invoke.
# Usually this is the only variable you need to set. It can be relative or absolute.
INVOKEAI_ROOT=~/invokeai

## HOST_INVOKEAI_ROOT and CONTAINER_INVOKEAI_ROOT can be used to control the on-host
## and in-container paths separately, if needed.
## HOST_INVOKEAI_ROOT is the path on the docker host's filesystem where Invoke will store data.
## If relative, it will be relative to the docker directory in which the docker-compose.yml file is located
## CONTAINER_INVOKEAI_ROOT is the path within the container where Invoke will expect to find the runtime directory.
## It MUST be absolute. There is usually no need to change this.
# HOST_INVOKEAI_ROOT=../../invokeai-data
# CONTAINER_INVOKEAI_ROOT=/invokeai

## INVOKEAI_PORT is the port on which the InvokeAI web interface will be available
INVOKEAI_PORT=9090

## GPU_DRIVER can be set to either `cuda` or `rocm` to enable GPU support in the container accordingly.
# GPU_DRIVER=cuda #| rocm
GPU_DRIVER=cuda 

## CONTAINER_UID can be set to the UID of the user on the host system that should own the files in the container.
## It is usually not necessary to change this. Use `id -u` on the host system to find the UID.
# CONTAINER_UID=1000

Your help is greatly appreciated.

What you expected to happen

I'm not really sure why I can't pull the image.

How to reproduce the problem

Clone the github repo. Configure .env for INVOKEAI_ROOT=~/invokeai, INVOKEAI_PORT=9090, GPU_DRIVER=cuda, and that's it. Then tried sudo docker compose up.

Additional context

No response

Discord username

No response

alpha754293 avatar Aug 14 '24 03:08 alpha754293

You need to docker compose build first.

Or if you just want to pull and run the official image, see https://github.com/invoke-ai/InvokeAI?tab=readme-ov-file#docker-container

ebr avatar Aug 14 '24 04:08 ebr

This is the output of sudo docker compose build:

ubuntu@invoke-ai:~/InvokeAI/docker$ sudo docker compose build
[sudo] password for ubuntu: 
[+] Building 5.0s (3/3) FINISHED                                                                                   docker:default
 => [invokeai-cuda internal] load build definition from Dockerfile                                                           0.4s
 => => transferring dockerfile: 3.88kB                                                                                       0.1s
 => [invokeai-cuda] resolve image config for docker-image://docker.io/docker/dockerfile:1.4                                  1.5s
 => CACHED [invokeai-cuda] docker-image://docker.io/docker/dockerfile:1.4@sha256:9ba7531bd80fb0a858632727cf7a112fbfd19b17e9  0.0s
failed to solve: exit code: 1

edit I would pull the docker container image, except that I lack the experience needed to update the docker-compose.yml file to be able to do that.

(I am neither a programmer nor a developer, so I just copy-and-paste the instructions that are here to get things up and running as I lack the knowledge and the expertise needed to fix/correct issues that arise.)

alpha754293 avatar Aug 14 '24 05:08 alpha754293

Did you see the link I posted? Just run this: docker run --runtime=nvidia --volume ${HOME}/invokeai:/invokeai --gpus=all --publish 9090:9090 ghcr.io/invoke-ai/invokeai

ebr avatar Aug 14 '24 12:08 ebr

Did you see the link I posted? Just run this: docker run --runtime=nvidia --volume ${HOME}/invokeai:/invokeai --gpus=all --publish 9090:9090 ghcr.io/invoke-ai/invokeai

Yes, I saw that. But in the documentation, the instructions that is provided (https://invoke-ai.github.io/InvokeAI/installation/040_INSTALL_DOCKER/#build-it-yourself), says to do:

cd docker
cp .env.sample .env
docker compose up

So....that's what I'm doing.

Additionally, to your comment above, where I need to run:

docker compose build

I'm just reporting back to you, what I saw, as the output to your previous comment, when I run that command.

alpha754293 avatar Aug 15 '24 00:08 alpha754293

I ended up modifying the docker run command where --publish 9090:9090 was changed to --publish 0.0.0.0:9090:9090 so that I can access the UI from anywhere within my local network, and then also needed to add -security-opt=unconfined. It's up and running now.

Still don't really understand why the docker-compose.yml didn't work though. That part of the instructions doesn't work.

Thank you for all of your help. I appreciate it.

alpha754293 avatar Aug 15 '24 00:08 alpha754293