I have built a docker image of an application that requires nvidia/cuda using dockerTools.buildImage. The image runs fine with nvidia-docker -run .... however, when I start a container from the same image via docker-compose, I have the following error :
Error response from daemon: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error running hook #0: error running hook: exit status 1, stdout: , stderr: nvidia-container-cli: ldcache error: process /nix/store/cx01qk0qyylvkgisbwc7d3pk8sliccgh-glibc-2.38-27-bin/bin/ldconfig failed with error code: 1: unknown
I have added the few lines that are usually required to run nvidia/cuda images with docker-compose :
deploy:
resources:
reservations:
devices:
- driver: nvidia
device_ids: ['0']
capabilities: [gpu]
Note that other images (from docker hub) that require nvidia/cuda are working fine with these few lines. Any idea what could go wrong ?
|