Can I run a Docker container with CUDA 10 when host has CUDA 9?

Im deploying an application in a docker container that requires CUDA 10. This is necessary to run some of the underlying pytorch functionality that the application uses.

However, the host server is running docker ce 17, Nvidia-docker v 1.0 with CUDA version 9, and I will not be able to upgrade the host.

I’m under the impression that I’m handcuffed to the v1 nvidia docker runtime and CUDA version available on the host.

Is there a way to run CUDA 10 on the container so I can leverage the functionality of this toolkit?

Source: StackOverflow