Skip to content
This repository was archived by the owner on Nov 16, 2019. It is now read-only.

Commit b269956

Browse files
author
Mridul Jain
committed
Travis setup for python tests
1 parent 9962887 commit b269956

4 files changed

Lines changed: 11 additions & 2 deletions

File tree

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ build:
1414
export LD_LIBRARY_PATH="${LD_LIBRARY_PATH2}"; mvn -B package
1515
cp -r ${CAFFE_ON_SPARK}/caffe-public/python/caffe ${CAFFE_ON_SPARK}/caffe-grid/src/main/python/
1616
cd ${CAFFE_ON_SPARK}/caffe-grid/src/main/python/; zip -r caffeonsparkpythonapi *; mv caffeonsparkpythonapi.zip ${CAFFE_ON_SPARK}/caffe-grid/target/;cd ${CAFFE_ON_SPARK}
17-
${CAFFE_ON_SPARK}/caffe-grid/src/test/python/PythonTest.sh
17+
${CAFFE_ON_SPARK}/caffe-grid/src/test/python/PythonTest.sh
1818
buildosx:
1919
cd caffe-public; make proto; make -j4 -e distribute; cd ..
2020
export DYLD_LIBRARY_PATH="${DYLD_LIBRARY_PATH2}"; mvn -B package -DskipTests
@@ -24,7 +24,7 @@ buildosx:
2424
export DYLD_LIBRARY_PATH="${DYLD_LIBRARY_PATH2}"; mvn -B package
2525
cp -r ${CAFFE_ON_SPARK}/caffe-public/python/caffe ${CAFFE_ON_SPARK}/caffe-grid/src/main/python/
2626
cd ${CAFFE_ON_SPARK}/caffe-grid/src/main/python/; zip -r caffeonsparkpythonapi *; mv caffeonsparkpythonapi.zip ${CAFFE_ON_SPARK}/caffe-grid/target/; cd ${CAFFE_ON_SPARK}
27-
${CAFFE_ON_SPARK}/caffe-grid/src/test/python/PythonTest.sh
27+
${CAFFE_ON_SPARK}/caffe-grid/src/test/python/PythonTest.sh
2828
update:
2929
git submodule init
3030
git submodule update --force
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
CAFFE_ON_SPARK ?=$(shell pwd)
12
cd ${CAFFE_ON_SPARK}/caffe-grid/src/test/resources/
23
spark-submit --master local --driver-library-path "${CAFFE_ON_SPARK}/caffe-grid/target/caffe-grid-0.1-SNAPSHOT-jar-with-dependencies.jar" --driver-class-path "${CAFFE_ON_SPARK}/caffe-grid/target/caffe-grid-0.1-SNAPSHOT-jar-with-dependencies.jar" --conf spark.cores.max=${TOTAL_CORES} --conf spark.task.cpus=${CORES_PER_WORKER} --conf spark.driver.extraLibraryPath="${LD_LIBRARY_PATH}" --conf spark.executorEnv.LD_LIBRARY_PATH="${LD_LIBRARY_PATH}" --py-files ${CAFFE_ON_SPARK}/caffe-grid/target/caffeonsparkpythonapi.zip --files ${CAFFE_ON_SPARK}/data/caffe/_caffe.so,${CAFFE_ON_SPARK}/caffe-grid/src/test/resources/lenet_memory_solver_py.prototxt,${CAFFE_ON_SPARK}/caffe-grid/src/test/resources/lenet_memory_train_test_py.prototxt --jars "${CAFFE_ON_SPARK}/caffe-grid/target/caffe-grid-0.1-SNAPSHOT-jar-with-dependencies.jar" --conf spark.pythonargs="-conf lenet_memory_solver_py.prototxt -model /tmp/lenet.model -features accuracy,ip1,ip2 -label label -output /tmp/output -devices 1 -outputFormat json -clusterSize ${SPARK_WORKER_INSTANCES}" ${CAFFE_ON_SPARK}/caffe-grid/src/test/python/PythonApiTest.py
34
cd ${CAFFE_ON_SPARK}

scripts/travis/travis_install.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@ apt-get -y --force-yes update
99
rm -rf $CONDA_DIR
1010
# invoke BVLC caffe scripts
1111
./caffe-public/scripts/travis/travis_install.sh
12+
./travis_test_install.sh

travis_test_install.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
export CAFFE_ON_SPARK=$(pwd)/CaffeOnSpark
2+
${CAFFE_ON_SPARK}/scripts/local-setup-hadoop.sh
3+
export HADOOP_HOME=$(pwd)/hadoop-2.6.4
4+
export PATH=${HADOOP_HOME}/bin:${PATH}
5+
${CAFFE_ON_SPARK}/scripts/local-setup-spark.sh
6+
export SPARK_HOME=$(pwd)/spark-1.6.0-bin-hadoop2.6
7+
export PATH=${SPARK_HOME}/bin:${PATH}

0 commit comments

Comments
 (0)