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
6d037db7
Commit
6d037db7
authored
Sep 29, 2018
by
Inon S
Committed by
Tianqi Chen
Sep 28, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added Dockerfile demonstrating OpenCL & OpenGL installation (#1770)
parent
dd23bb6f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
65 additions
and
0 deletions
+65
-0
docker/Dockerfile.demo_opencl
+65
-0
No files found.
docker/Dockerfile.demo_opencl
0 → 100644
View file @
6d037db7
# USAGE: sudo docker build libs/tvm -f libs/tvm/docker/Dockerfile.ocl -t l4b/tvm:ocl
# REFERENCE: https://docs.docker.com/engine/reference/builder
FROM ubuntu:18.04
RUN echo "Labelling this image"
LABEL Description="Docker image for TVM built with OpenCL & OpenGL support"
RUN echo "Preparing to install dependencies"
RUN apt-get update
# ENV DEBIAN_FRONTEND noninteractive
RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections
RUN echo "Installing utility libraries"
RUN apt-get install -y apt-utils
RUN apt-get install -y cmake g++ llvm
RUN apt-get install -y git
# make wget unzip libtinfo-dev libz-dev libcurl4-openssl-dev
RUN apt-get install -y libopenblas-dev
# RUN echo "Installing gtest"
# RUN apt-get install -y libgtest-dev
# RUN cd /usr/src/gtest && cmake CMakeLists.txt && make && cp *.a /usr/lib
RUN echo "Installing Python"
RUN apt-get install -y python3-dev python3-pip
RUN pip3 install setuptools numpy nose-timer cython decorator scipy tornado psutil xgboost
RUN echo "Installing Jupyter notebook"
RUN pip3 install matplotlib Image Pillow jupyter[notebook]
RUN echo "Installing OpenCL libraries"
RUN apt-get install -y libviennacl-dev mesa-opencl-icd ocl-icd-opencl-dev clinfo
RUN apt-get install -y libclblas-dev libclfft-dev libclsparse-dev
RUN echo "Installing OpenGL libraries"
RUN apt-get install -y libcogl-dev libegl1 libgles1 libglfw3-dev
# libglew-dev
RUN echo "Upgrading dependencies"
RUN apt-get upgrade -y
RUN echo "Cloning TVM source & submodules"
ENV TVM_PAR_DIR="/usr"
RUN mkdir -p TVM_PAR_DIR && \
cd ${TVM_PAR_DIR} && \
git clone https://github.com/dmlc/tvm --recursive
#RUN git submodule update --init --recursive
RUN echo "Building TVM"
#USE_BLAS: "openblas" | "mkl" | "atlas" | "apple" | "none"
ENV TVM_HOME="/usr/tvm"
ENV TVM_BUILD_DIR="${TVM_HOME}/build"
RUN mkdir -p ${TVM_BUILD_DIR} && \
cd ${TVM_BUILD_DIR} && \
cmake .. -DUSE_BLAS=openblas -DUSE_LLVM=ON -DUSE_OPENCL=ON -DUSE_OPENGL=ON && \
make -j6
RUN echo "Building Python package"
ENV PYTHONPATH=${TVM_HOME}/python:${TVM_HOME}/topi/python:${TVM_HOME}/nnvm/python:${PYTHONPATH}
RUN cd ${TVM_HOME}/python && python3 setup.py install --user
RUN cd ${TVM_HOME}/topi/python && python3 setup.py install --user
RUN cd ${TVM_HOME}/nnvm/python && python3 setup.py install --user
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