SystemsGenetics / KINC

Knowledge Independent Network Construction
MIT License
11 stars 4 forks source link

CUDA Driver dependency #92

Closed bentsherman closed 5 years ago

bentsherman commented 5 years ago

KINC v3.3.0 is the first version to have CUDA support via ACE. One issue that has emerged as a result is that KINC (and ACE) require the NVIDIA drivers to be installed on the host machine, even if the user doesn't want to use GPUs.

Furthermore, we can't get around this requirement with the Docker image because the NVIDIA Docker images (upon which the KINC image is based) also require the NVIDIA drivers to be installed on the host machine. So even on containerized environments like k8s, it seems that KINC can only be used on machines with the NVIDIA drivers installed.

I'm honestly not sure if we can really get around this at all. Our paradigm of an application that can decide at runtime to use CPUs or GPUs seems to be outside the norm. But here are a couple of ideas to look into later:

bentsherman commented 5 years ago

The Dockerfile has been updated using the third option from above. It works, although one shortcoming is that KINC will still fail if either the cuda or opencl settings are set to a device but none is present. So now if you run the docker image without the NVIDIA runtime, you must explicitly set these settings to none.

bentsherman commented 5 years ago

There are now two Docker images for KINC 3.3.0, 3.3.0-cpu and 3.3.0-gpu, so you can use either one depending on what you need.