NVIDIA / gpu-rest-engine

A REST API for Caffe using Docker and Go
BSD 3-Clause "New" or "Revised" License
421 stars 94 forks source link

caffe-server: error while loading shared libraries: libcaffe.so.1.0.0: cannot open shared object file: No such file or directory #28

Closed lgov closed 6 years ago

lgov commented 6 years ago

Hi,

when starting up the GRE I got the following error: caffe-server: error while loading shared libraries: libcaffe.so.1.0.0: cannot open shared object file: No such file or directory

Environment:

When I start up the container: ubuntu@ip-xxx-xx-xx-xxx:~/dev/gpu-rest-engine$ nvidia-docker run -it --net=host --rm inference_server /bin/bash

root@ip-xxx-xx-xx-xxx:/opt/caffenet# caffe-server caffe-server: error while loading shared libraries: libcaffe.so.1.0.0: cannot open shared object file: No such file or directory

This seems to fix the problem: root@ip-xxx-xx-xx-xxx:/opt/caffenet# ldconfig root@ip-xxx-xx-xx-xxx:/opt/caffenet# caffe-server panic: runtime error: index out of range

goroutine 1 [running]: main.main() /go/src/caffe-server/main.go:43 +0x45e

My first guess was this commit, but purely based on the log message: 634441D - Execute ldconfig after "make install", not in a separate layer

When I roll back my GRE working copy to commit f4294f7, cleanup and rebuild from scratch, I get a perfectly working image.

regards, Lieven

flx42 commented 6 years ago

What's your version of docker?

flx42 commented 6 years ago

Ah no, I see, you're right. There is an issue with ldconfig, but it didn't show up for me because I was using nvidia-docker 2.0. Can you confirm you are using nvidia-docker 1.0?

lgov commented 6 years ago

Hi, yeah I'm using v1 of nvidia-docker:

$ apt search nvidia-docker nvidia-docker/now 1.0.1-1 amd64 [installed,local] NVIDIA Docker container tools

flx42 commented 6 years ago

Fixed, thanks for the bug report!