-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'cpp' of https://github.com/jermainewang/dgl into line-g…
…raph
- Loading branch information
Showing
16 changed files
with
228 additions
and
82 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,95 @@ | ||
pipeline { | ||
agent { | ||
docker { | ||
image 'pytorch/pytorch' | ||
} | ||
} | ||
agent none | ||
stages { | ||
stage('SETUP') { | ||
steps { | ||
sh 'easy_install nose' | ||
sh 'apt-get update && apt-get install -y libxml2-dev' | ||
} | ||
} | ||
stage('BUILD') { | ||
steps { | ||
dir('python') { | ||
sh 'python setup.py install' | ||
stage('Build and Test') { | ||
parallel { | ||
stage('CPU') { | ||
agent { | ||
docker { | ||
image 'lingfanyu/dgl-cpu' | ||
args '-u root' | ||
} | ||
} | ||
stages { | ||
stage('SETUP') { | ||
steps { | ||
sh 'easy_install nose' | ||
sh 'git submodule init' | ||
sh 'git submodule update' | ||
} | ||
} | ||
stage('BUILD') { | ||
steps { | ||
sh 'if [ -d build ]; then rm -rf build; fi; mkdir build' | ||
dir('python') { | ||
sh 'python3 setup.py install' | ||
} | ||
dir ('build') { | ||
sh 'cmake ..' | ||
sh 'make -j$(nproc)' | ||
} | ||
} | ||
} | ||
stage('TEST') { | ||
steps { | ||
withEnv(["DGL_LIBRARY_PATH=${env.WORKSPACE}/build"]) { | ||
sh 'echo $DGL_LIBRARY_PATH' | ||
sh 'nosetests tests -v --with-xunit' | ||
sh 'nosetests tests/pytorch -v --with-xunit' | ||
} | ||
} | ||
} | ||
} | ||
post { | ||
always { | ||
junit '*.xml' | ||
} | ||
} | ||
} | ||
stage('GPU') { | ||
agent { | ||
docker { | ||
image 'lingfanyu/dgl-gpu' | ||
args '--runtime nvidia -u root' | ||
} | ||
} | ||
stages { | ||
stage('SETUP') { | ||
steps { | ||
sh 'easy_install nose' | ||
sh 'git submodule init' | ||
sh 'git submodule update' | ||
} | ||
} | ||
stage('BUILD') { | ||
steps { | ||
sh 'if [ -d build ]; then rm -rf build; fi; mkdir build' | ||
dir('python') { | ||
sh 'python3 setup.py install' | ||
} | ||
dir ('build') { | ||
sh 'cmake ..' | ||
sh 'make -j$(nproc)' | ||
} | ||
} | ||
} | ||
stage('TEST') { | ||
steps { | ||
withEnv(["DGL_LIBRARY_PATH=${env.WORKSPACE}/build"]) { | ||
sh 'echo $DGL_LIBRARY_PATH' | ||
sh 'nosetests tests -v --with-xunit' | ||
sh 'nosetests tests/pytorch -v --with-xunit' | ||
} | ||
} | ||
} | ||
} | ||
post { | ||
always { | ||
junit '*.xml' | ||
} | ||
} | ||
} | ||
} | ||
} | ||
stage('TEST') { | ||
steps { | ||
sh 'nosetests tests -v --with-xunit' | ||
sh 'nosetests tests/pytorch -v --with-xunit' | ||
} | ||
} | ||
} | ||
post { | ||
always { | ||
junit '*.xml' | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# CI docker CPU env | ||
# Adapted from github.com/dmlc/tvm/docker/Dockerfile.ci_cpu | ||
FROM ubuntu:16.04 | ||
|
||
RUN apt-get update --fix-missing | ||
|
||
COPY install/ubuntu_install_core.sh /install/ubuntu_install_core.sh | ||
RUN bash /install/ubuntu_install_core.sh | ||
|
||
COPY install/ubuntu_install_python.sh /install/ubuntu_install_python.sh | ||
RUN bash /install/ubuntu_install_python.sh | ||
|
||
COPY install/ubuntu_install_python_package.sh /install/ubuntu_install_python_package.sh | ||
RUN bash /install/ubuntu_install_python_package.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# CI docker GPU env | ||
FROM nvidia/cuda:9.0-cudnn7-devel | ||
|
||
# Base scripts | ||
RUN apt-get update --fix-missing | ||
|
||
COPY install/ubuntu_install_core.sh /install/ubuntu_install_core.sh | ||
RUN bash /install/ubuntu_install_core.sh | ||
|
||
COPY install/ubuntu_install_python.sh /install/ubuntu_install_python.sh | ||
RUN bash /install/ubuntu_install_python.sh | ||
|
||
COPY install/ubuntu_install_python_package.sh /install/ubuntu_install_python_package.sh | ||
RUN bash /install/ubuntu_install_python_package.sh | ||
|
||
# Environment variables | ||
ENV PATH=/usr/local/nvidia/bin:${PATH} | ||
ENV PATH=/usr/local/cuda/bin:${PATH} | ||
ENV CPLUS_INCLUDE_PATH=/usr/local/cuda/include:${CPLUS_INCLUDE_PATH} | ||
ENV C_INCLUDE_PATH=/usr/local/cuda/include:${C_INCLUDE_PATH} | ||
ENV LIBRARY_PATH=/usr/local/cuda/lib64:/usr/local/nvidia/lib64:${LIBRARY_PATH} | ||
ENV LD_LIBRARY_PATH=/usr/local/cuda/lib64:/usr/local/nvidia/lib64:${LD_LIBRARY_PATH} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
## Build docker image for CI | ||
|
||
### CPU image | ||
docker build -t dgl-cpu -f Dockerfile.ci_cpu . | ||
|
||
### GPU image | ||
docker build -t dgl-gpu -f Dockerfile.ci_gpu . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# install libraries for building c++ core on ubuntu | ||
apt update && apt install -y --no-install-recommends --force-yes \ | ||
apt-utils git build-essential make cmake wget unzip sudo libz-dev libxml2-dev |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# install python and pip, don't modify this, modify install_python_package.sh | ||
# apt-get update && apt-get install -y python-dev python-pip | ||
|
||
# python 3.6 | ||
apt-get update && yes | apt-get install software-properties-common | ||
add-apt-repository ppa:jonathonf/python-3.6 | ||
apt-get update && apt-get install -y python3.6 python3.6-dev | ||
rm -f /usr/bin/python3 && ln -s /usr/bin/python3.6 /usr/bin/python3 | ||
|
||
# Install pip | ||
cd /tmp && wget https://bootstrap.pypa.io/get-pip.py | ||
# python2 get-pip.py | ||
python3.6 get-pip.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# install libraries for python package on ubuntu | ||
# pip2 install pylint numpy cython scipy nltk requests[security] | ||
pip3 install pylint numpy cython scipy nltk requests[security] | ||
|
||
# install DL Framework | ||
# pip2 install torch torchvision | ||
pip3 install torch torchvision |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.