Openshift, tensorflow and GPUs

3/3/2018

Im wanting to use OpenShift for building and deploying my Tensorflow applications. And I am also wanting to run/server the tensorflow applications using GPUs.

I appreciate that the GPU support is fairly new in Kubernetes and Openshift, and as such the documentation is sparse.

I've tried running https://github.com/radanalyticsio/tensorflow-serving-gpu-s2i on minishift but wasnt able to make it work. It failed with

0/1 nodes are available: 1 insufficient alpha.kubernetes.io/nvidia-gpu
  • Is GPU usage supported in minishift?
  • Which GPU cards are supported by Kubernetes (and thereby OpenShift and hopefully MiniShift)?
  • How can I allocate an OpenShift project to use a specific graphics card? When creating a TF serving project in Minishift, using the above link, there is an option to name a GPU. However Tensorflow - as far as I am aware - usese GPU cards by number.
-- Magick
kubernetes
minishift
openshift
tensorflow

1 Answer

3/5/2018

As @mon said in the comment, I also suggest going through these two blog posts:

On the nodes, both the drivers and CUDA need to be installed. Also if I am not mistaken the nvidia-docker is used under the covers. It should automatically mount the shared libraries into each new container. However, they released v2.0 which is fundamentally different than 1.x.

I believe, once you have the OpenShift nodes prepared, only then is the time for additional features like s2i that can help you creating your images.

You may also find these Subin's gists useful:

-- Jiri Kremser
Source: StackOverflow