Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
Dockerfile.ci_cpu [Relay][RFC] Relay IR Text Format (#1781) Dec 2, 2018
Dockerfile.ci_gpu Add gluoncv installation (#2464) Jan 19, 2019
Dockerfile.ci_i386 [DOCKER] Add docker demo image (#1404) Jul 9, 2018
Dockerfile.demo_cpu Add gluoncv installation (#2464) Jan 19, 2019
Dockerfile.demo_gpu Add gluoncv installation (#2464) Jan 19, 2019
Dockerfile.demo_opencl Add demo_android Dockerfile (#1646) Sep 14, 2018 Add demo_android Dockerfile (#1646) Sep 14, 2018
with_the_same_user [DOCKER] inheritate javahome (#2210) Dec 1, 2018

TVM Docker

This directory contains the TVM's docker infrastructure. We use docker to provide build environments for CI and images for demo. We need docker and nvidia-docker for GPU images.

Start Docker Bash Session

You can use the following helper script to start an interactive bash session with a given image_name.

/path/to/tvm/docker/ image_name

The script does the following things:

  • Mount current directory to /workspace and set it as home
  • Switch user to be the same user that calls the
  • Use the host-side network

The helper bash script can be useful to build demo sessions.

Prebuilt Docker Images

We provide several pre-built images for doing quick exploration with TVM installed. For example, you can run the following command to get tvmai/demo-cpu image.

/path/to/tvm/docker/ tvmai/demo-cpu

Then inside the docker container, you can type the following command to start the jupyter notebook

jupyter notebook

Check out to get the full list of available prebuilt images.

Use Local Build Script

We also provide script to build docker images locally. We use ([./] to build and run the commands. To build and run docker images, we can run the following command at the root of the project.

./docker/ image_name [command]

Here image_name corresponds to the docker defined in the Dockerfile.image_name.

You can also start an interactive session by typing

./docker/ image_name -it bash

The build command will map the tvm root to /workspace/ inside the container with the same user as the user invoking the docker command. Here are some common use examples to perform CI tasks.

  • lint the python codes

    ./docker/ ci_lint make pylint
  • build codes with CUDA support

    ./docker/ ci_gpu make -j$(nproc)
  • do the python unittest

    ./docker/ ci_gpu tests/scripts/
  • build the documents. The results will be available at docs/_build/html

    ./docker/ ci_gpu make -C docs html
  • build golang test suite.

    ./docker/ ci_cpu tests/scripts/