Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tic
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wenyuanbo
tic
Commits
a9a4329e
Commit
a9a4329e
authored
Jul 09, 2018
by
Tianqi Chen
Committed by
GitHub
Jul 09, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[DOCKER] Add demo-gpu image (#1407)
parent
badcb630
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
59 additions
and
10 deletions
+59
-10
docker/Dockerfile.demo_cpu
+1
-1
docker/Dockerfile.demo_gpu
+34
-0
docker/README.md
+2
-2
docker/build.sh
+1
-1
docker/install/install_tvm_gpu.sh
+14
-0
docs/install/docker.rst
+4
-4
docs/install/from_source.rst
+3
-2
No files found.
docker/Dockerfile.demo_cpu
View file @
a9a4329e
# Minimum docker image for demo purposes
# prebuilt-image: tvmai/demo
_
cpu
# prebuilt-image: tvmai/demo
-
cpu
FROM ubuntu:16.04
RUN apt-get update --fix-missing
...
...
docker/Dockerfile.demo_gpu
0 → 100644
View file @
a9a4329e
# Minimum docker image for demo purposes
# prebuilt-image: tvmai/demo-gpu
FROM nvidia/cuda:8.0-cudnn7-devel
RUN apt-get update --fix-missing
COPY install/ubuntu_install_core.sh /install/ubuntu_install_core.sh
RUN bash /install/ubuntu_install_core.sh
# Python: basic dependencies
RUN apt-get update && apt-get install -y python3-dev python3-pip
RUN pip3 install numpy nose-timer cython decorator scipy
# LLVM
RUN echo deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-6.0 main \
>> /etc/apt/sources.list.d/llvm.list && \
wget -O - http://apt.llvm.org/llvm-snapshot.gpg.key|sudo apt-key add - && \
apt-get update && apt-get install -y --force-yes llvm-6.0
# Jupyter notebook.
RUN pip3 install matplotlib Image Pillow jupyter[notebook]
# Deep learning frameworks
RUN pip3 install mxnet tensorflow keras
# Build TVM
COPY install/install_tvm_gpu.sh /install/install_tvm_gpu.sh
RUN bash /install/install_tvm_gpu.sh
# Environment variables
ENV PYTHONPATH=/usr/tvm/python:/usr/tvm/topi/python:/usr/tvm/nnvm/python/:/usr/tvm/vta/python:${PYTHONPATH}
ENV PATH=/usr/local/nvidia/bin:${PATH}
ENV PATH=/usr/local/cuda/bin:${PATH}
ENV LD_LIBRARY_PATH=/usr/local/cuda/lib64:/usr/local/nvidia/lib64:${LD_LIBRARY_PATH}
docker/README.md
View file @
a9a4329e
...
...
@@ -24,10 +24,10 @@ 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.
For example, you can run the following command to get
```tvmai/demo
-
cpu```
image.
```
bash
/path/to/tvm/docker/bash.sh tvmai/demo
_
cpu
/path/to/tvm/docker/bash.sh tvmai/demo
-
cpu
```
Then inside the docker container, you can type the following command to start the jupyter notebook
...
...
docker/build.sh
View file @
a9a4329e
...
...
@@ -2,7 +2,7 @@
#
# Execute command within a docker container
#
# Usage:
ci_
build.sh <CONTAINER_TYPE> [--dockerfile <DOCKERFILE_PATH>] [-it]
# Usage: build.sh <CONTAINER_TYPE> [--dockerfile <DOCKERFILE_PATH>] [-it]
# <COMMAND>
#
# CONTAINER_TYPE: Type of the docker container used the run the build: e.g.,
...
...
docker/install/install_tvm_gpu.sh
0 → 100644
View file @
a9a4329e
cd
/usr
git clone https://github.com/dmlc/tvm
--recursive
cd
/usr/tvm
echo set
\(
USE_LLVM llvm-config-6.0
\)
>>
config.cmake
echo set
\(
USE_CUDA ON
\)
>>
config.cmake
echo set
\(
USE_CUDNN ON
\)
>>
config.cmake
echo set
\(
USE_RPC ON
\)
>>
config.cmake
echo set
\(
USE_SORT ON
\)
>>
config.cmake
echo set
\(
USE_GRAPH_RUNTIME ON
\)
>>
config.cmake
echo set
\(
USE_BLAS openblas
\)
>>
config.cmake
mkdir
-p
build
cd
build
cmake ..
make
-j10
docs/install/docker.rst
View file @
a9a4329e
...
...
@@ -3,7 +3,7 @@
Docker Images
=============
We provide several prebuilt docker images to quickly try out tvm.
These images are also helpful
to do demo/tutorials of TVM
.
These images are also helpful
run through TVM demo and tutorials
.
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.
...
...
@@ -15,14 +15,14 @@ First, clone tvm repo to get the auxiliary scripts
git clone --recursive https://github.com/dmlc/tvm
We can then use the following command to launch a `tvmai/demo
_
cpu` image.
We can then use the following command to launch a `tvmai/demo
-
cpu` image.
.. code:: bash
/path/to/tvm/docker/bash.sh tvmai/demo_cpu
.. note::
You can find all the prebuilt images in `
https://hub.docker.com/r/tvmai/
`_
You can find all the prebuilt images in `
<https://hub.docker.com/r/tvmai/>
`_
This auxiliary script does the following things:
...
...
@@ -41,5 +41,5 @@ Then you can start a jupyter notebook by typing
Docker Source
-------------
Check out `
https://github.com/dmlc/tvm/tree/master/docker
`_ if you are interested in
Check out `
<https://github.com/dmlc/tvm/tree/master/docker>
`_ if you are interested in
building your own docker images.
docs/install/from_source.rst
View file @
a9a4329e
...
...
@@ -84,8 +84,7 @@ The configuration of tvm can be modified by `config.cmake`.
cmake ..
make -j4
If everything goes well, we can go to the specific language installation section.
If everything goes well, we can go to :ref:`python-package-installation`_
Building on Windows
~~~~~~~~~~~~~~~~~~~
...
...
@@ -114,6 +113,8 @@ Currently, ROCm is supported only on linux, so all the instructions are written
- You need to first install HIP runtime from ROCm. Make sure the installation system has ROCm installed in it.
- Install latest stable version of LLVM (v6.0.1), and LLD, make sure ``ld.lld`` is available via command line.
.. _python-package-installation:
Python Package Installation
---------------------------
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment