We recently launched PushToCompute™, our Docker integration for JARVICE. Along with this came Nimbix base Docker images optimized for compute intensive workflows, for various runtime flavors such as Ubuntu and CentOS.
While Nimbix base images are best for most workflows, we are also very excited to support nvidia-docker base images, which provide some interesting capabilities for developers looking to test CUDA code before deploying in cloud environments. JARVICE can now run images built on nvidia-docker bases unmodified in the Nimbix Cloud, taking advantage of large scale GPU options on demand.
Example Dockerfile using nvidia-docker Base Image
Here is a revised Dockerfile for the deviceQuery application from the PushToCompute™ Tutorial which leverages a nvidia-docker base image:
FROM nvidia/cuda:7.5-ubuntu14.04 RUN apt-get update && apt-get -y --force-yes install cuda-samples-7.5 && apt-get clean RUN make -C /usr/local/cuda/samples/1_Utilities/deviceQuery RUN ln -s /usr/local/cuda/samples/1_Utilities/deviceQuery/deviceQuery /usr/bin
Note that in this case, we have to actually install the CUDA samples, as these don’t come packaged automatically in the nvidia/cuda base image. Otherwise the Dockerfile is identical to the one derived from the nimbix/ubuntu-cuda base image.
Additional Notes when using nvidia-docker Base Images
- you cannot use the /usr/lib/JARVICE/tools/sbin/init program to launch software when unit testing unless you use a Nimbix base image; you can run commands directly
- the gui API endpoint will not work unless you use Nimbix base images
- the Nimbix platform still runs software as user nimbix (uid 505, gid 505) when using the batch API endpoint; there is no need to create this user in your Dockerfile as JARVICE does it automatically
- to run software as root on the Nimbix platform (not recommended, especially if writing persistent data to /data), simply create a sudo configuration file and copy it into your Docker image with the COPY directive in the Dockerfile; the sudo configuration file should look like this:
Defaults: nimbix !requiretty nimbix ALL=(ALL) NOPASSWD: ALL
You can then prefix commands with sudo when running on the Nimbix Cloud, and this will run those commands as root via the batch API endpoint