Linux / amd64
Theano is a Python library that allows you to define, optimize, and evaluate mathematical expressions involving multi-dimensional arrays efficiently.
Theano has been powering large-scale computationally intensive scientific investigations since 2007. But it is also approachable enough to be used in the classroom.
Before you can run an NGC deep learning framework container, your Docker environment must support NVIDIA GPUs. To run a container, issue the appropriate command as explained in the Running A Container chapter in the NVIDIA Containers And Frameworks User Guide and specify the registry, repository, and tags. For more information about using NGC, refer to the NGC Container User Guide.
The method implemented in your system depends on the DGX OS version installed (for DGX systems), the specific NGC Cloud Image provided by a Cloud Service Provider, or the software that you have installed in preparation for running NGC containers on TITAN PCs, Quadro PCs, or vGPUs.
Procedure
docker pull
command.docker run --gpus all -it --rm -v local_dir:container_dir nvcr.io/nvidia/theano:xx.xx
Where:
- `-it` means run in interactive mode
- `--rm` will delete the container when finished
- `-v` is the mounting directory
- `local_dir` is the directory or file from your host system (absolute path) that you want to access from inside your container. For example, the `local_dir` in the following path is `/home/jsmith/data/mnist`.
```
-v /home/jsmith/data/mnist:/data/mnist
```
If you are inside the container, for example, `ls /data/mnist`, you will see the same files as if you issued the `ls /home/jsmith/data/mnist` command from outside the container.
- `container_dir` is the target directory when you are inside your container. For example, `/data/mnist` is the target directory in the example:
```
-v /home/jsmith/data/mnist:/data/mnist
```
- `xx.xx` is the container version. For example, `18.01`.
Theano is run by importing it as a Python module:
$ python
>>> import numpy
>>> import theano.tensor as T
>>> from theano import function
>>> x = T.dscalar('x')
>>> y = T.dscalar('y')
>>> z = x + y
>>> f = function([x, y], z)
>>> f(2, 3)
array(5.0)
>>> numpy.allclose(f(16.3, 12.1), 28.4)
True
You might want to pull in data and model descriptions from locations outside the container for use by Theano. To accomplish this, the easiest method is to mount one or more host directories as Docker data volumes. You have pulled the latest files and run the container image.
/workspace/README.md
inside the container for information on customizing your Theano image.For the latest Release Notes, see the Theano Release Notes Documentation website.
For more information about Theano, including tutorials, documentation, and examples, see: