Thank you.
Rewriting the original Dockerfile to cuda9’s and adding a line to download and install nccl-dev etc to the file, then the build itself successfully finished. Though after running a container and run nvidia-docker run --rm -it pytorch-cuda9 nvidia-smi, an error occurs.
NVIDIA-SMI couldn't find libnvidia-ml.so library in your system. Please make sure that the NVIDIA Display Driver is properly installed and present in your system.
Please also try adding directory that contains libnvidia-ml.so to your system PATH.

Do I need to add something else or do something else? Thank you for advance.