av/harbor

harbor up -> "unknown shorthand flag: 'f' in -f" error

ProtoBelisarius opened this issue · 8 comments

system: Arch Linux with KDE, 5900X, 64GB, 6800XT

No matter how I install, unsafe script or manual cloning, every time I try to launch harbor, is throws the following error:

[ProtoBelisarius@ProtoBelisarius harbor]$ harbor up
unknown shorthand flag: 'f' in -f
See 'docker --help'.

Usage:  docker [OPTIONS] COMMAND

A self-sufficient runtime for containers

Common Commands:
  run         Create and run a new container from an image
  exec        Execute a command in a running container
  ps          List containers
  build       Build an image from a Dockerfile
  pull        Download an image from a registry
  push        Upload an image to a registry
  images      List images
  login       Authenticate to a registry
  logout      Log out from a registry
  search      Search Docker Hub for images
  version     Show the Docker version information
  info        Display system-wide information

Management Commands:
  builder     Manage builds
  checkpoint  Manage checkpoints
  container   Manage containers
  context     Manage contexts
  image       Manage images
  manifest    Manage Docker image manifests and manifest lists
  network     Manage networks
  plugin      Manage plugins
  system      Manage Docker
  trust       Manage trust on Docker images
  volume      Manage volumes

Swarm Commands:
  config      Manage Swarm configs
  node        Manage Swarm nodes
  secret      Manage Swarm secrets
  service     Manage Swarm services
  stack       Manage Swarm stacks
  swarm       Manage Swarm

Commands:
  attach      Attach local standard input, output, and error streams to a running container
  commit      Create a new image from a container's changes
  cp          Copy files/folders between a container and the local filesystem
  create      Create a new container
  diff        Inspect changes to files or directories on a container's filesystem
  events      Get real time events from the server
  export      Export a container's filesystem as a tar archive
  history     Show the history of an image
  import      Import the contents from a tarball to create a filesystem image
  inspect     Return low-level information on Docker objects
  kill        Kill one or more running containers
  load        Load an image from a tar archive or STDIN
  logs        Fetch the logs of a container
  pause       Pause all processes within one or more containers
  port        List port mappings or a specific mapping for the container
  rename      Rename a container
  restart     Restart one or more containers
  rm          Remove one or more containers
  rmi         Remove one or more images
  save        Save one or more images to a tar archive (streamed to STDOUT by default)
  start       Start one or more stopped containers
  stats       Display a live stream of container(s) resource usage statistics
  stop        Stop one or more running containers
  tag         Create a tag TARGET_IMAGE that refers to SOURCE_IMAGE
  top         Display the running processes of a container
  unpause     Unpause all processes within one or more containers
  update      Update configuration of one or more containers
  wait        Block until one or more containers stop, then print their exit codes

Global Options:
      --config string      Location of client config files (default "/home/belisarius/.docker")
  -c, --context string     Name of the context to use to connect to the daemon (overrides DOCKER_HOST env var and default context set with "docker context use")
  -D, --debug              Enable debug mode
  -H, --host list          Daemon socket to connect to
  -l, --log-level string   Set the logging level ("debug", "info", "warn", "error", "fatal") (default "info")
      --tls                Use TLS; implied by --tlsverify
      --tlscacert string   Trust certs signed only by this CA (default "/home/belisarius/.docker/ca.pem")
      --tlscert string     Path to TLS certificate file (default "/home/belisarius/.docker/cert.pem")
      --tlskey string      Path to TLS key file (default "/home/belisarius/.docker/key.pem")
      --tlsverify          Use TLS and verify the remote
  -v, --version            Print version information and quit

Run 'docker COMMAND --help' for more information on a command.

For more help on how to use Docker, head to https://docs.docker.com/go/guides/


Im quite baffled by this error and have no idea how to solve it. No similar issues either, its really weird.

Symlink was successfully created:

[ProtoBelisarius@ProtoBelisarius harbor]$ ./harbor.sh ln
Creating .env file...
19:41:52 [INFO] Symlink created: /home/username/.local/bin/harbor -> /home/username/Git/harbor/harbor.sh
19:41:52 [INFO] You may need to reload your shell or run 'source /home/username/.bash_profile' for changes to take effect.

av commented

Thanks for trying out Harbor!

Could you please run harbor info and harbor doctor?

From the first glance, it looks like either older version of GNU libs (cut -f), or older docker with standalone compose (not supported by Harbor)

harbor doctor

[ProtoBelisarius@ProtoBelisarius harbor]$ harbor doctor
20:02:49 [INFO] Running Harbor Doctor...
20:02:49 [ERROR] ✘ Docker is not installed or not running. Please install or start Docker.

harbor info

[ProtoBelisarius@ProtoBelisarius harbor]$ harbor info
Harbor CLI version: 0.2.7
==========================
unknown flag: --format
See 'docker --help'.

Usage:  docker [OPTIONS] COMMAND

A self-sufficient runtime for containers

Common Commands:
  run         Create and run a new container from an image
  exec        Execute a command in a running container
  ps          List containers
  build       Build an image from a Dockerfile
  pull        Download an image from a registry
  push        Upload an image to a registry
  images      List images
  login       Authenticate to a registry
  logout      Log out from a registry
  search      Search Docker Hub for images
  version     Show the Docker version information
  info        Display system-wide information

Management Commands:
  builder     Manage builds
  checkpoint  Manage checkpoints
  container   Manage containers
  context     Manage contexts
  image       Manage images
  manifest    Manage Docker image manifests and manifest lists
  network     Manage networks
  plugin      Manage plugins
  system      Manage Docker
  trust       Manage trust on Docker images
  volume      Manage volumes

Swarm Commands:
  config      Manage Swarm configs
  node        Manage Swarm nodes
  secret      Manage Swarm secrets
  service     Manage Swarm services
  stack       Manage Swarm stacks
  swarm       Manage Swarm

Commands:
  attach      Attach local standard input, output, and error streams to a running container
  commit      Create a new image from a container's changes
  cp          Copy files/folders between a container and the local filesystem
  create      Create a new container
  diff        Inspect changes to files or directories on a container's filesystem
  events      Get real time events from the server
  export      Export a container's filesystem as a tar archive
  history     Show the history of an image
  import      Import the contents from a tarball to create a filesystem image
  inspect     Return low-level information on Docker objects
  kill        Kill one or more running containers
  load        Load an image from a tar archive or STDIN
  logs        Fetch the logs of a container
  pause       Pause all processes within one or more containers
  port        List port mappings or a specific mapping for the container
  rename      Rename a container
  restart     Restart one or more containers
  rm          Remove one or more containers
  rmi         Remove one or more images
  save        Save one or more images to a tar archive (streamed to STDOUT by default)
  start       Start one or more stopped containers
  stats       Display a live stream of container(s) resource usage statistics
  stop        Stop one or more running containers
  tag         Create a tag TARGET_IMAGE that refers to SOURCE_IMAGE
  top         Display the running processes of a container
  unpause     Unpause all processes within one or more containers
  update      Update configuration of one or more containers
  wait        Block until one or more containers stop, then print their exit codes

Global Options:
      --config string      Location of client config files (default "/home/username/.docker")
  -c, --context string     Name of the context to use to connect to the daemon (overrides DOCKER_HOST env var and default context set with "docker context use")
  -D, --debug              Enable debug mode
  -H, --host list          Daemon socket to connect to
  -l, --log-level string   Set the logging level ("debug", "info", "warn", "error", "fatal") (default "info")
      --tls                Use TLS; implied by --tlsverify
      --tlscacert string   Trust certs signed only by this CA (default "/home/username/.docker/ca.pem")
      --tlscert string     Path to TLS certificate file (default "/home/username/.docker/cert.pem")
      --tlskey string      Path to TLS key file (default "/home/username/.docker/key.pem")
      --tlsverify          Use TLS and verify the remote
  -v, --version            Print version information and quit

Run 'docker COMMAND --help' for more information on a command.

For more help on how to use Docker, head to https://docs.docker.com/go/guides/

20:02:12 [WARN] Harbor has no active services.
==========================
Client:
 Version:    27.3.1
 Context:    default
 Debug Mode: false

Server:
ERROR: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
errors pretty printing info
av commented

It looks like docker is there, next couple of things to check:

I think I solved it, its downloading 1.448GB now.

I installed the docker-compose package from extras reop, idk if that was actually necessary.

My current docker version is: Docker version 27.3.1, build ce1223035a

I then started the service: sudo systemctl start docker

then it said:
permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get "http://%2Fvar%2Frun%2Fdocker.sock/v1.47/containers/json?all=1&filters=%7B%22label%22%3A%7B%22com.docker.compose.config-hash%22%3Atrue%2C%22com.docker.compose.project%3Dharbor%22%3Atrue%7D%7D": dial unix /var/run/docker.sock: connect: permission denied

so I added my username to the group docker

reloaded with newgrp docker

then ran harbor up
and it worked. At least for now, cant tell, its still downloading.

av commented

Glad to hear it works now!

I'm not sure about the package, it depends on if it contains compose plugin or a standalone compose bin (maybe both? not sure). Running the service and having your user in the docker group are both prerequisites to having Harbor running, I'll reflect these in the install docs in a clearer way.

During the very first start it'll download two default services webui and ollama - both are multi-GB docker images. I'd say they're relatively "light" as far as LM images go, PyTorch+CUDA is infamous in this aspect with just the base image being over 9GB.

Yea, no problem with the size, Ive been hoarding models for a while, just never really worked with docker before.

I managed to launch it and it finds my old models from the local ollama install.

Btw, when an AMD user installs the nvidia-container-toolkit, it prevents the webui from loading. It allows for login and showing the logo but after that just black screen. I installed it as a test, because after the first download it said container harbor.webui is unhealthy so I thought maybe the toolkit helps. It didnt. Without the toolkit it loads quickly without any issues.

Now I just need to get the App running, should I open a separate issue for this?

When I try to run the Appimage it just shows a small black window that quickly closes.

[ProtoBelisarius@ProtoBelisarius harbor]$ ./Harbor_0.2.7_amd64.AppImage 
Cannot get default EGL display: EGL_SUCCESS
Cannot create EGL context: invalid display (last error: EGL_SUCCESS)
Segmentation fault (core dumped)

I also tried converting the .deb with debtap but that didnt even run.

av commented

when an AMD user installs the nvidia-container-toolkit

Yes, that requirement is only for enabling GPU acceleration on systems with CUDA

When I try to run the Appimage it just shows a small black window that quickly closes.

From what I can see, it's realted to webkitgtk releases. It should be fixed at some point in the future, but the workaround for now is to try disabling compositing via env vars:

# Try this first
WEBKIT_DISABLE_DMABUF_RENDERER=1

# If the first doesn't work
WEBKIT_DISABLE_COMPOSITING_MODE=1

More info:
tauri-apps/tauri#10749

Yes! export WEBKIT_DISABLE_DMABUF_RENDERER=1 works for me.

Thank you very much for your quick responses!

Have a nice day. :]