RobotLocomotion / pytorch-dense-correspondence

Code for "Dense Object Nets: Learning Dense Visual Object Descriptors By and For Robotic Manipulation"
https://arxiv.org/pdf/1806.08756.pdf
Other
559 stars 133 forks source link

error: useradd: user 'root' already exists #189

Closed dingshenglan closed 5 years ago

dingshenglan commented 5 years ago

When I run "sudo ./docker_build.py", I met this error

Here is the output from the Dockerfile when the adduser commands are run:

building docker container . . . building docker image named root-pytorch-dense-correspondence command =

docker build --build-arg USER_NAME=root --build-arg USER_PASSWORD=password --build-arg USER_ID=0 --build-arg USER_GID=0 -t root-pytorch-dense-correspondence -f pytorch-dense-correspondence.dockerfile .

executing shell command Sending build context to Docker daemon 17.92kB Step 1/28 : FROM nvidia/cuda:8.0-devel-ubuntu16.04 ---> a8f4ac5ee686 Step 2/28 : ARG USER_NAME ---> Using cache ---> 2d25436f2698 Step 3/28 : ARG USER_PASSWORD ---> Using cache ---> a31099d741fe Step 4/28 : ARG USER_ID ---> Using cache ---> 4ad3bb9c42ea Step 5/28 : ARG USER_GID ---> Using cache ---> 51749ca38f1a Step 6/28 : RUN apt-get update ---> Using cache ---> 9851e07fb4a0 Step 7/28 : RUN apt install sudo ---> Using cache ---> cdd3ccf27307 Step 8/28 : RUN useradd -ms /bin/bash $USER_NAME ---> Running in c0130067c5d4 useradd: user 'root' already exists The command '/bin/sh -c useradd -ms /bin/bash $USER_NAME' returned a non-zero code: 9

dingshenglan commented 5 years ago

Sorry, I found I used the “sudo” command to run this python file resulted in this problem. At the beginning I was adding the current user to the docker group, but I didn't reopen the terminal.