docker.rst 1.26 KB
Newer Older
1 2 3 4 5
.. _docker-images:

Docker Images
=============
We provide several prebuilt docker images to quickly try out tvm.
6
These images are also helpful run through TVM demo and tutorials.
7 8 9 10 11 12 13 14 15 16 17
You can get the docker images via the following steps.
We need `docker <https://docs.docker.com/engine/installation/>`_ and
`nvidia-docker <https://github.com/NVIDIA/nvidia-docker/>`_ if we want to use cuda.

First, clone tvm repo to get the auxiliary scripts

.. code:: bash

    git clone --recursive https://github.com/dmlc/tvm


18
We can then use the following command to launch a `tvmai/demo-cpu` image.
19 20 21

.. code:: bash

22
    /path/to/tvm/docker/bash.sh tvmai/demo-cpu
23

24 25
You can also change `demo-cpu` to `demo-gpu` to get a CUDA enabled image.
You can find all the prebuilt images in `<https://hub.docker.com/r/tvmai/>`_
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43


This auxiliary script does the following things:

- Mount current directory to /workspace
- Switch user to be the same user that calls the bash.sh (so you can read/write host system)
- Use the host-side network (so you can use jupyter notebook)


Then you can start a jupyter notebook by typing

.. code:: bash

   jupyter notebook


Docker Source
-------------
44
Check out `<https://github.com/dmlc/tvm/tree/master/docker>`_ if you are interested in
45
building your own docker images.