moveit / moveit2_tutorials

A sphinx-based centralized documentation repo for MoveIt 2
https://moveit.picknik.ai
BSD 3-Clause "New" or "Revised" License
158 stars 196 forks source link

Unauthorized from pulling Docker rolling-tutorial image from ghcr.io (GitHub container registry) #918

Open ukicomputers opened 4 months ago

ukicomputers commented 4 months ago

Description

Hi! This is my first time to try MoveIt 2 for myself! As now, I use Docker for almost anything, because it keeps dependencies and software clean, working and OK like ROS 2. I started with tutorial on How to Set Up MoveIt 2 Docker Containers in Ubuntu. I got the Docker Compose script, executed command docker compose run ..., and Docker started pulling from ghcr.io (GitHub container registry). After few seconds, I got error: Head unauthorized (please see console output). Did anyone encountered this problem, or it is just me? Thanks!

Your environment

Steps to reproduce

wget https://raw.githubusercontent.com/ros-planning/moveit2_tutorials/main/.docker/docker-compose.yml
DOCKER_IMAGE=rolling-tutorial docker compose run --rm --name moveit2_container cpu

Expected behaviour

While pulling image, I got Error response from daemon: Head unauthorized (see console output).

Backtrace or Console output

When running docker compose run (see steps to reproduce):

[+] Running 1/1
 ✘ cpu Error Head "https://ghcr.io/v2/moveit/moveit2_tutorials/manifests/rolling-tutorial": unauthorized                                      1.8s 
Error response from daemon: Head "https://ghcr.io/v2/moveit/moveit2_tutorials/manifests/rolling-tutorial": unauthorized
ukicomputers commented 4 months ago

I just saw, (https://github.com/moveit/moveit2/issues/1895) is probably related to this issue.

ukicomputers commented 4 months ago

Also, when logged in with GitHub API token for ghcr.io in Docker, I get this (different) error now:

[+] Running 1/1
 ✘ cpu Error denied                                                                                                                           3.1s 
Error response from daemon: denied

ghcr.io credentials are not the problem

MartinsSmirnovs commented 4 months ago

+1, I tried to go through tutorials using Docker (because manually built nodes crashed on startup despite the successful build) and got unauthorized error.

Update: I found a workaround. There is a working humble-tutorial image available in Dockerhub, so you can just update image section of docker-compose.yml:

# Example command:
#   Humble on a Nvidia system:
#   DOCKER_IMAGE=humble-tutorial docker compose run gpu
#   Rolling without discrete graphics:
#   DOCKER_IMAGE=rolling-tutorial docker compose run cpu

services:
  cpu:
    image: rakeshshrestha/moveit2_tutorials:humble-tutorial
    container_name: moveit2_container
    privileged: true
    network_mode: host
    command: /bin/bash
    volumes:
      - /tmp/.X11-unix:/tmp/.X11-unix
    environment:
      QT_X11_NO_MITSHM: 1
      DISPLAY: $DISPLAY
  gpu:
    image: rakeshshrestha/moveit2_tutorials:humble-tutorial
    container_name: moveit2_container
    privileged: true
    network_mode: host
    command: /bin/bash
    deploy:
      resources:
        reservations:
          devices:
            - driver: nvidia
              count: 1
              capabilities: [gpu]
    volumes:
      - /tmp/.X11-unix:/tmp/.X11-unix
    environment:
      QT_X11_NO_MITSHM: 1
      DISPLAY: $DISPLAY
      NVIDIA_VISIBLE_DEVICES: all
      NVIDIA_DRIVER_CAPABILITIES: all

Note that I have removed XAUTHORITY part as I did not have such variable set (possibly because I use WSL2). I also could not start gpu container due to some error, despite going through Nvidia drivers for Docker tutorial. CPU container works as expected, and successfully runs rviz.

Update 2: Rviz main screen is black. Cannot get it to work.

Update 3: Got the workaround to work by creating a different user in the container.

pta-janssen commented 3 months ago

+1, experiencing the same behavior as the issue initiator @ukicomputers.

scrv commented 6 days ago

+1, facing the same unauthorized request