Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
tvm
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
cld
ml
tvm
Commits
6d037db7
Commit
6d037db7
authored
6 years ago
by
Inon S
Committed by
Tianqi Chen
6 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Added Dockerfile demonstrating OpenCL & OpenGL installation (#1770)
parent
dd23bb6f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
docker/Dockerfile.demo_opencl
+65
-0
65 additions, 0 deletions
docker/Dockerfile.demo_opencl
with
65 additions
and
0 deletions
docker/Dockerfile.demo_opencl
0 → 100644
+
65
−
0
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
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment