microsoft / mixed-reality-robot-interaction-demo

Sample Unity application for Android and Hololens, showing how these devices can be used to interact with a (simulated or real) robot through Mixed Reality. Released as part of the IROS 2020 Tutorial on Mixed Reality and Robotics.
https://www.microsoft.com/en-us/research/event/mixed-reality-and-robotics-tutorial-iros-2020/
MIT License
56 stars 15 forks source link

Docker Build Errors #11

Closed saratrajput closed 2 years ago

saratrajput commented 2 years ago

Hello. I'm following the steps in Building the docker images for Windows and ran into a couple of errors.

  1. Command RUN sudo apt-get install -y apt-utils fails. Error message:

    Get-Content Dockerfile | docker build - -t jackal_single
    failed to get console mode for stdin: The handle is invalid.
    [+] Building 6.8s (5/19)
    => [internal] load build definition from Dockerfile                                                               0.0s
    => => transferring dockerfile: 2.20kB                                                                             0.0s
    => [internal] load .dockerignore                                                                                  0.0s
    => => transferring context: 2B                                                                                    0.0s
    => [internal] load metadata for iros2020.azurecr.io/jackal_base:latest                                            4.3s
    => CACHED [ 1/16] FROM iros2020.azurecr.io/jackal_base:latest@sha256:85722d4788841d0b6c096c05ed2f8d482513400d23f  0.0s
    => ERROR [ 2/16] RUN sudo apt-get install -y apt-utils                                                            2.4s
    ------
    > [ 2/16] RUN sudo apt-get install -y apt-utils:
    #5 0.417 mesg: ttyname failed: Inappropriate ioctl for device
    #5 0.449 Reading package lists...
    #5 1.053 Building dependency tree...
    #5 1.160 Reading state information...
    #5 1.249 The following additional packages will be installed:
    #5 1.249   libapt-inst2.0
    #5 1.262 The following NEW packages will be installed:
    #5 1.263   apt-utils libapt-inst2.0
    #5 1.720 0 upgraded, 2 newly installed, 0 to remove and 291 not upgraded.
    #5 1.720 Need to get 261 kB of archives.
    #5 1.720 After this operation, 1271 kB of additional disk space will be used.
    #5 1.720 Ign:1 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libapt-inst2.0 amd64 1.6.12ubuntu0.1
    #5 1.941 Ign:2 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 apt-utils amd64 1.6.12ubuntu0.1
    #5 2.195 Err:1 http://security.ubuntu.com/ubuntu bionic-updates/main amd64 libapt-inst2.0 amd64 1.6.12ubuntu0.1
    #5 2.195   404  Not Found [IP: 91.189.88.142 80]
    #5 2.415 Err:2 http://security.ubuntu.com/ubuntu bionic-updates/main amd64 apt-utils amd64 1.6.12ubuntu0.1
    #5 2.415   404  Not Found [IP: 91.189.88.142 80]
    #5 2.420 E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/a/apt/libapt-inst2.0_1.6.12ubuntu0.1_amd64.deb  404  Not Found [IP: 91.189.88.142 80]
    #5 2.420 E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/a/apt/apt-utils_1.6.12ubuntu0.1_amd64.deb  404  Not Found [IP: 91.189.88.142 80]
    #5 2.420 E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
    ------
    executor failed running [/bin/bash --login -c sudo apt-get install -y apt-utils]: exit code: 100
  2. Command RUN apt-get -y install ros-melodic-rosbridge-server fails. Error message:

    Get-Content Dockerfile | docker build - -t jackal_single
    failed to get console mode for stdin: The handle is invalid.
    [+] Building 10.0s (13/21)
    => [internal] load build definition from Dockerfile                                                               0.0s
    => => transferring dockerfile: 2.25kB                                                                             0.0s
    => [internal] load .dockerignore                                                                                  0.0s
    => => transferring context: 2B                                                                                    0.0s
    => [internal] load metadata for iros2020.azurecr.io/jackal_base:latest                                            4.0s
    => [ 1/18] FROM iros2020.azurecr.io/jackal_base:latest@sha256:85722d4788841d0b6c096c05ed2f8d482513400d23f3a5fe97  0.0s
    => CACHED [ 2/18] RUN sudo apt-get update                                                                         0.0s
    => CACHED [ 3/18] RUN sudo apt-get install -y apt-utils                                                           0.0s
    => CACHED [ 4/18] RUN mkdir -p /home/catkin_ws/src                                                                0.0s
    => CACHED [ 5/18] RUN apt-get update                                                                              0.0s
    => CACHED [ 6/18] RUN apt install -y python3-pip                                                                  0.0s
    => CACHED [ 7/18] RUN apt-get install -y python-pip                                                               0.0s
    => CACHED [ 8/18] RUN pip install autobahn tornado bson pymongo pillow                                            0.0s
    => [ 9/18] RUN apt-get update                                                                                     2.2s
    => ERROR [10/18] RUN apt-get -y install ros-melodic-rosbridge-server                                              3.7s
    ------
    > [10/18] RUN apt-get -y install ros-melodic-rosbridge-server:
    #13 0.542 mesg: ttyname failed: Inappropriate ioctl for device
    #13 0.579 Reading package lists...
    #13 1.270 Building dependency tree...
    #13 1.394 Reading state information...
    #13 1.502 The following additional packages will be installed:
    #13 1.502   python-backports-abc python-backports.ssl-match-hostname python-bson
    #13 1.502   python-bson-ext python-singledispatch python-tornado ros-melodic-rosapi
    #13 1.502   ros-melodic-rosauth ros-melodic-rosbridge-library ros-melodic-rosbridge-msgs
    #13 1.503 Suggested packages:
    #13 1.503   python-mysqldb python-pycurl python-tornado-doc
    #13 1.538 The following NEW packages will be installed:
    #13 1.538   python-backports-abc python-backports.ssl-match-hostname python-bson
    #13 1.538   python-bson-ext python-singledispatch python-tornado ros-melodic-rosapi
    #13 1.538   ros-melodic-rosauth ros-melodic-rosbridge-library ros-melodic-rosbridge-msgs
    #13 1.538   ros-melodic-rosbridge-server
    #13 1.804 0 upgraded, 11 newly installed, 0 to remove and 425 not upgraded.
    #13 1.804 Need to get 647 kB of archives.
    #13 1.804 After this operation, 5458 kB of additional disk space will be used.
    #13 1.804 Err:1 http://packages.ros.org/ros/ubuntu bionic/main amd64 ros-melodic-rosbridge-library amd64 0.11.10-1bionic.20200911.044550
    #13 1.804   404  Not Found [IP: 140.211.166.134 80]
    #13 1.934 Err:2 http://packages.ros.org/ros/ubuntu bionic/main amd64 ros-melodic-rosapi amd64 0.11.10-1bionic.20200911.045908
    #13 1.934   404  Not Found [IP: 140.211.166.134 80]
    #13 1.934 Err:3 http://packages.ros.org/ros/ubuntu bionic/main amd64 ros-melodic-rosbridge-msgs amd64 0.11.10-1bionic.20200911.044508
    #13 1.934   404  Not Found [IP: 140.211.166.134 80]
saratrajput commented 2 years ago

The solution would be to add:

1.

# apt-get update before installing packages
RUN sudo apt-get update

before line-8

2.

# https://answers.ros.org/question/325039/apt-update-fails-cannot-install-pkgs-key-not-working/
RUN sudo apt-key del 421C365BD9FF1F717815A3895523BAEEB01FA116
RUN sudo -E apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654
RUN sudo apt clean && sudo apt update

before line-28 since the old keys have expired.

EricVoll commented 2 years ago

Thanks for your contribution! I just merged your PR into main.