提交 2bbd2ed2 authored 作者: abergeron's avatar abergeron 提交者: GitHub

Merge pull request #6164 from slefrancois/jenkins_mac

Jenkins mac buildbot
#!/bin/bash
BUILDBOT_DIR=$WORKSPACE/nightly_build
THEANO_PARAM="theano --with-timer --timer-top-n 10"
BASECOMPILEDIR=$HOME/.theano/buildbot_theano_mac
# Set test reports using nosetests xunit
XUNIT="--with-xunit --xunit-file="
SUITE="--xunit-testsuite-name="
export THEANO_FLAGS=init_gpu_device=cuda
# Set path for conda and cmake
export PATH="/Users/jenkins/miniconda2/bin:/usr/local/bin:$PATH"
# CUDA
export PATH=/usr/local/cuda/bin:${PATH}
export DYLD_LIBRARY_PATH=/usr/local/cuda/lib:${DYLD_LIBRARY_PATH}
export CPLUS_INCLUDE_PATH=/usr/local/cuda/include:${HOME}/cuda/include:${CPLUS_INCLUDE_PATH}
# Build libgpuarray
GPUARRAY_CONFIG="Release"
DEVICE=cuda
LIBDIR=${WORKSPACE}/local
# Make fresh clones of libgpuarray (with no history since we don't need it)
rm -rf libgpuarray
git clone --depth 1 "https://github.com/Theano/libgpuarray.git"
# Clean up previous installs (to make sure no old files are left)
rm -rf $LIBDIR
mkdir $LIBDIR
# Build libgpuarray
mkdir libgpuarray/build
(cd libgpuarray/build && cmake .. -DCMAKE_BUILD_TYPE=${GPUARRAY_CONFIG} -DCMAKE_INSTALL_PREFIX=$LIBDIR && make)
# Finally install
(cd libgpuarray/build && make install)
# Build the pygpu modules
(cd libgpuarray && python setup.py build_ext --inplace -I$LIBDIR/include -L$LIBDIR/lib)
ls $LIBDIR
mkdir $LIBDIR/lib/python
export PYTHONPATH=${PYTHONPATH}:$LIBDIR/lib/python
# Then install
(cd libgpuarray && python setup.py install --home=$LIBDIR)
export DYLD_LIBRARY_PATH=${LIBDIR}/lib:${DYLD_LIBRARY_PATH}
export CPLUS_INCLUDE_PATH=:${LIBDIR}/include:${CPLUS_INCLUDE_PATH}
python -c 'import pygpu; print(pygpu.__file__)'
mkdir -p ${BUILDBOT_DIR}
ls -l ${BUILDBOT_DIR}
echo "Directory of stdout/stderr ${BUILDBOT_DIR}"
echo
echo
set -x
# Fast run and float32
FILE=${BUILDBOT_DIR}/theano_python_fastrun_f32_tests.xml
NAME=mac_fastrun_f32
THEANO_FLAGS=$THEANO_FLAGS,base_compiledir=$BASECOMPILEDIR,mode=FAST_RUN,warn.ignore_bug_before=all,on_opt_error=raise,on_shape_error=raise,floatX=float32,dnn.library_path=${HOME}/cuda/lib,gcc.cxxflags="-L${LIBDIR}/lib" python bin/theano-nose ${THEANO_PARAM} ${XUNIT}${FILE} ${SUITE}${NAME}
\ No newline at end of file
...@@ -51,6 +51,6 @@ echo "Directory of stdout/stderr %BUILDBOT_DIR%" ...@@ -51,6 +51,6 @@ echo "Directory of stdout/stderr %BUILDBOT_DIR%"
REM Fast run and float32 REM Fast run and float32
set FILE=%BUILDBOT_DIR%\theano_python2_fastrun_f32_tests.xml set FILE=%BUILDBOT_DIR%\theano_python2_fastrun_f32_tests.xml
set NAME=fastrun_f32 set NAME=win_fastrun_f32
set THEANO_FLAGS=%THEANO_FLAGS%,compiledir=%COMPILEDIR%,mode=FAST_RUN,warn.ignore_bug_before=all,on_opt_error=raise,on_shape_error=raise,floatX=float32,dnn.include_path=C:\\lib\\cuda\\include,dnn.library_path=C:\\lib\\cuda\\lib\\x64,gcc.cxxflags='-I"C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v8.0\\include" -I"C:\\lib\\libgpuarray\\src" -L"C:\\Program Files\\NVIDIA GPU Computing Toolkit\CUDA\\v8.0\\lib\\x64" -LC:\\lib\\libgpuarray\\lib' set THEANO_FLAGS=%THEANO_FLAGS%,compiledir=%COMPILEDIR%,mode=FAST_RUN,warn.ignore_bug_before=all,on_opt_error=raise,on_shape_error=raise,floatX=float32,dnn.include_path=C:\\lib\\cuda\\include,dnn.library_path=C:\\lib\\cuda\\lib\\x64,gcc.cxxflags='-I"C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v8.0\\include" -I"C:\\lib\\libgpuarray\\src" -L"C:\\Program Files\\NVIDIA GPU Computing Toolkit\CUDA\\v8.0\\lib\\x64" -LC:\\lib\\libgpuarray\\lib'
python bin\theano-nose %THEANO_PARAM% %XUNIT%%FILE% %SUITE%%NAME% python bin\theano-nose %THEANO_PARAM% %XUNIT%%FILE% %SUITE%%NAME%
#!/bin/bash #!/bin/bash
# Script for Jenkins continuous integration testing on macOS # Script for Jenkins continuous integration testing on macOS
...@@ -13,9 +14,9 @@ rsync -a $HOME/.theano/buildbot_theano_mac/ $BASECOMPILEDIR ...@@ -13,9 +14,9 @@ rsync -a $HOME/.theano/buildbot_theano_mac/ $BASECOMPILEDIR
export PATH="/Users/jenkins/miniconda2/bin:/usr/local/bin:$PATH" export PATH="/Users/jenkins/miniconda2/bin:/usr/local/bin:$PATH"
# CUDA # CUDA
export PATH=/Developer/NVIDIA/CUDA-8.0/bin${PATH:+:${PATH}} export PATH=/usr/local/cuda/bin:${PATH}
export DYLD_LIBRARY_PATH=/Developer/NVIDIA/CUDA-8.0/lib\ export DYLD_LIBRARY_PATH=/usr/local/cuda/lib:${DYLD_LIBRARY_PATH}
${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}} export CPLUS_INCLUDE_PATH=/usr/local/cuda/include:${HOME}/cuda/include:${CPLUS_INCLUDE_PATH}
# Build libgpuarray # Build libgpuarray
GPUARRAY_CONFIG="Release" GPUARRAY_CONFIG="Release"
...@@ -45,9 +46,12 @@ export PYTHONPATH=${PYTHONPATH}:$LIBDIR/lib/python ...@@ -45,9 +46,12 @@ export PYTHONPATH=${PYTHONPATH}:$LIBDIR/lib/python
# Then install # Then install
(cd libgpuarray && python setup.py install --home=$LIBDIR) (cd libgpuarray && python setup.py install --home=$LIBDIR)
export DYLD_LIBRARY_PATH=${LIBDIR}/lib:${DYLD_LIBRARY_PATH}
export CPLUS_INCLUDE_PATH=:${LIBDIR}/include:${CPLUS_INCLUDE_PATH}
python -c 'import pygpu; print(pygpu.__file__)' python -c 'import pygpu; print(pygpu.__file__)'
# Testing theano # Testing theano
THEANO_PARAM="theano --with-timer --timer-top-n 10 --with-xunit --xunit-file=theano_mac_pr_tests.xml" THEANO_PARAM="theano --with-timer --timer-top-n 10 --with-xunit --xunit-file=theano_mac_pr_tests.xml"
FLAGS=init_gpu_device=$DEVICE,gpuarray.preallocate=1000,mode=FAST_RUN,on_opt_error=raise,on_shape_error=raise,cmodule.age_thresh_use=604800,base_compiledir=$BASECOMPILEDIR,dnn.library_path=$HOME/cuda/lib,dnn.include_path=$HOME/cuda/include,gcc.cxxflags="-I/usr/local/cuda/include -I$LIBDIR/include -rpath $HOME/cuda/lib -L$HOME/.local/lib" FLAGS=init_gpu_device=$DEVICE,gpuarray.preallocate=1000,mode=FAST_RUN,on_opt_error=raise,on_shape_error=raise,cmodule.age_thresh_use=604800,base_compiledir=$BASECOMPILEDIR,dnn.library_path=$HOME/cuda/lib,gcc.cxxflags="-L${LIBDIR}/lib"
THEANO_FLAGS=${FLAGS} python bin/theano-nose ${THEANO_PARAM} THEANO_FLAGS=${FLAGS} python bin/theano-nose ${THEANO_PARAM}
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论