nvidia-docker icon indicating copy to clipboard operation
nvidia-docker copied to clipboard

make rpm failed on rhels7 ppc64le

Open zet809 opened this issue 9 years ago • 11 comments

Hi, I had tried to build nvidia-docker rpm on rhels7.3 ppc64le, 2 issue encountered:

  1. Can not find tools/Dockerfile.rpm.ppc64le file unable to prepare context: unable to evaluate symlinks in Dockerfile path: lstat /root/nvidia-docker/tools/Dockerfile.rpm.ppc64le: no such file or directory I had work around it by copying tools/Dockerfile.rpm to tools/Dockerfile.rpm.ppc64le
  2. Then, the next issue:

standard_init_linux.go:178: exec user process caused "exec format error" The command '/bin/sh -c yum install -y vim rpm-build && rm -rf /var/cache/yum/*' returned a non-zero code: 1 make[1]: *** [rpm] Error 1

zet809 avatar Mar 10 '17 09:03 zet809

@clnperez You need to be on the ppc64le branch, but there is no Dockerfile for generating the rpm (only the deb). So you will have to use the tarball instead.

flx42 avatar Mar 10 '17 16:03 flx42

@zet809 "exec user process caused "exec format error"" typically means you're trying to run an x86_64 image on your box.

clnperez avatar Mar 10 '17 18:03 clnperez

Hi, @flx42 , can you tell me where can I find the tarball for rh7.3 ppc64le? I had tried the tar ball https://github.com/NVIDIA/nvidia-docker/archive/v1.0.1.tar.gz, seems don't support rh7.3 ppc64le also.

zet809 avatar Mar 13 '17 04:03 zet809

@zet809 You'll have to build it yourself. NVIDIA isn't hosting things for POWER.

clnperez avatar Mar 13 '17 14:03 clnperez

hi, @clnperez , I had tried to avoid lots of commands within the Dockerfile.rpm.ppc64le file, the current problem is it report the error below, I really don't know how to deal with it. WIll you pls help me?

Step 19/19 : CMD read -p "Update changelog (y/n)? " yn && [ "$yn" = "y" ] &&     vim /build/rpm/SPECS/$NAME.spec ;     cp -Lr /build/rpm/* . &&     cp /dist/*.tar.xz SOURCES &&     rpmbuild --clean -bb              -D "_topdir $PWD"              -D "vendor $VENDOR"              -D "email $EMAIL"              -D "name $NAME"              -D "version $VERSION"              -D "revision $REVISION"              -D "architecture $ARCHITECTURE"              SPECS/$NAME.spec &&     mv RPMS/$ARCHITECTURE/*.rpm /dist
 ---> Using cache
 ---> d6d98991a50f
Successfully built d6d98991a50f
docker: Error response from daemon: linux spec user: unable to find user nvidia: no matching entries in passwd file.
make: *** [rpm] Error 125

zet809 avatar Mar 16 '17 09:03 zet809

hi @clnperez , will you pls help me to take a look at this build issue? Thx a lot!

zet809 avatar Mar 23 '17 09:03 zet809

@zet809 What do you mean by " I had tried to avoid lots of commands within the Dockerfile.rpm.ppc64le file."? What command did you run? Did you modify the dockerfile?

It looks like an image finished building, but then the subsequent docker run command failed because the nvidia user doesn't exist in your environment.

clnperez avatar Mar 23 '17 16:03 clnperez

I had run the commands in the Dockerfile.rpm that had RUN prefixed manually. And then comment out them in the Dockerfile.rpm in order not to cause "make rpm" error.

The nvidia user exist:

# cat /etc/passwd | grep nvidia
nvidia:x:0:1000::/home/nvidia:/bin/bash

zet809 avatar Mar 25 '17 13:03 zet809

@zet809 Did you just try make tarball?

clnperez avatar Mar 28 '17 16:03 clnperez

I have make some changes most of which is redirect the URL to our internal ftp site for build env can't access internet directly and successfully generate rpm and deb packages. You can find the changes in the attachment. nvidia-docker-1.0.1.ppc64le.patch.txt

junlizhang avatar Apr 07 '17 09:04 junlizhang

I refreshed the ppc64le branch to match master, still no rpm support though.

flx42 avatar May 03 '17 22:05 flx42