After building the most recent Docker image for PyTorch, and then launching it with nvidia-docker 2.0:
$ docker build -t pytorch_cuda9 -f tools/docker/Dockerfile9 .
Sending build context to Docker daemon  33.78MB
Step 1/14 : FROM nvidia/cuda:9.0-cudnn7-devel-ubuntu16.04
9.0-cudnn7-devel-ubuntu16.04: Pulling from nvidia/cuda
50aff78429b1: Pull complete 
f6d82e297bce: Pull complete 
275abb2c8a6f: Pull complete 
9f15a39356d6: Pull complete 
fc0342a94c89: Pull complete 
a4adf2161c6b: Pull complete 
8f86feaebedb: Pull complete 
a1f2e681a892: Pull complete 
dddbbfcd9343: Pull complete 
e16144f996cb: Pull complete 
8cd9da093fe7: Pull complete 
Digest: sha256:81a26c1cbe2bbd913ea1907366fb92d9ffe31eca3d2d37f144837acb0ca68ae8
Status: Downloaded newer image for nvidia/cuda:9.0-cudnn7-devel-ubuntu16.04
 ---> 7263fb84069a
Step 2/14 : RUN echo "deb http://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1604/x86_64 /" > /etc/apt/sources.list.d/nvidia-ml.list
 ---> Running in 93c593a359bb
Removing intermediate container 93c593a359bb
 ---> 48c158f834bd
[...]
    warning: no previously-included files matching '*.py[co]' found under directory '*'
    writing manifest file 'torchvision.egg-info/SOURCES.txt'
    Copying torchvision.egg-info to /opt/conda/envs/pytorch-py3.6/lib/python3.6/site-packages/torchvision-0.2.0-py3.6.egg-info
    running install_scripts
    writing list of installed files to '/tmp/pip-wapibxoy-record/install-record.txt'
    Running setup.py install for torchvision: finished with status 'done'
  Removing source in /tmp/pip-1cuu5oqj-build
Successfully installed pillow-5.0.0 torchvision-0.2.0
Cleaning up...
Removing intermediate container ceb6acafa40f
 ---> 45a996e31703
Step 13/14 : WORKDIR /workspace
Removing intermediate container 1e2b48d4fff5
 ---> b5c02b17bbe8
Step 14/14 : RUN chmod -R a+w /workspace
 ---> Running in d0dad20f6815
Removing intermediate container d0dad20f6815
 ---> 7078c5d41329
Successfully built 7078c5d41329
Successfully tagged pytorch_cuda9:latest
# python --version
Python 3.6.4 :: Anaconda, Inc.
# python
Python 3.6.4 |Anaconda, Inc.| (default, Dec 21 2017, 21:42:08) 
[GCC 7.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import torch
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/workspace/torch/__init__.py", line 14, in <module>
    from .version import __version__
ModuleNotFoundError: No module named 'torch.version'
>>> print(torch.__version__)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NameError: name 'torch' is not defined
>>> import torch
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/workspace/torch/__init__.py", line 14, in <module>
    from .version import __version__
ModuleNotFoundError: No module named 'torch.version'
>>> 

Apparently this is an issue with nvidia-docker, as a vanilla docker launch doesn’t squawk:
$ docker run -it pytorch_cuda9:latest python
Python 3.6.4 |Anaconda, Inc.| (default, Dec 21 2017, 21:42:08) 
[GCC 7.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import torch
>>> print(torch.__version__)
0.4.0a0+05908e8
>>>