-
Notifications
You must be signed in to change notification settings - Fork 940
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #334 from yahoo/leewyang_travis
More travis integration
- Loading branch information
Showing
7 changed files
with
68 additions
and
40 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,7 +1,29 @@ | ||
language: python | ||
python: | ||
- "2.7" | ||
- 2.7 | ||
- 3.6 | ||
cache: pip | ||
before_install: | ||
- curl -LO http://www-us.apache.org/dist/spark/spark-2.3.1/spark-2.3.1-bin-hadoop2.7.tgz | ||
- export SPARK_HOME=./spark | ||
- mkdir $SPARK_HOME | ||
- tar -xf spark-2.3.1-bin-hadoop2.7.tgz -C $SPARK_HOME --strip-components=1 | ||
- export PATH=$SPARK_HOME/bin:$PATH | ||
- export SPARK_LOCAL_IP=127.0.0.1 | ||
- export SPARK_CLASSPATH=./lib/tensorflow-hadoop-1.0-SNAPSHOT.jar | ||
- export PYTHONPATH=$(pwd) | ||
install: | ||
- pip install -r requirements.txt | ||
script: | ||
- python -c 'import tensorflow as tf' | ||
- test/run_tests.sh | ||
notifications: | ||
email: false | ||
deploy: | ||
provider: pypi | ||
user: leewyang | ||
password: | ||
secure: T2Q8VM6SgcMtJDO2kJbaELE/5ICR5mx8pkM6TyNAJZ2Mr3fLIy6iDfPKunBAYVljl+SDEWmuoPTWqJdqMyo47LBKPKtBHbGzATqGSRTLvxLOYNSXUX+uCpPtr7CMp1eP3xpZ3YbAJZvoEFlWnBQKeBtX/PjNCpmKdp7ir+46CvR/pR1tcM5cFnSgU+uCPAMUt8KTZIxeRo+oJtaE0DM2RxLJ9nGnaRNz9fdXxwhViNj/bMnDRUI0G6k+Iy4sO2669si8nhTDr+Oq66ONUcJtAQymNUM/hzBTCkrJvuIq1TqTlKkA39UrtD5/wCkCqPUbCLVuIfNwkYfW2C8AlXcbphBKN4PhwaoL5XECr3/AOsgNpnPWhCF1Z1uLi58FhIlSyp+5c/x2wVJLZi2IE+c996An7UO3t16ZFpFEgzS6m9PVbi6Qil6Tl4AhV5QLKb0Qn0hLe2l0WixzK9KLMHfkqX8h5ZGC7i0TvCNcU2uIFjY8we91GORZKZhwUVDKbPqiUZIKn64Qq8EwJIsk/S344OrUTzm7z0lFCqtPphg1duU42QOFmaYWi6hgsbtDxN6+CubLw23G3PtKjOpNt8hHnrjZsz9H1MKbSAoYQ4fo+Iwb3owTjXnSTBr94StW7qysggWH6xQimFDh/SKOE9MfroMGt5YTXfduTbqyeameYqE= | ||
distributions: sdist bdist_wheel | ||
on: | ||
python: 3.6 | ||
tags: true |
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
Binary file not shown.
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 +1,3 @@ | ||
py4j | ||
pyspark | ||
tensorflow |
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,29 +1,28 @@ | ||
#!/bin/bash | ||
|
||
DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) | ||
|
||
if [ -z "$SPARK_HOME" ]; then | ||
echo "Please set SPARK_HOME environment variable" | ||
exit 1 | ||
fi | ||
|
||
if [ -z "$TFoS_HOME" ]; then | ||
echo "Please set TFoS_HOME environment variable" | ||
exit 1 | ||
fi | ||
|
||
if [ -z "$SPARK_CLASSPATH" ]; then | ||
echo "Please add the path to tensorflow-hadoop-*.jar to the SPARK_CLASSPATH environment variable" | ||
exit 1 | ||
fi | ||
|
||
# Start Spark Standalone Cluster | ||
export PYTHONPATH=${SPARK_HOME}/python | ||
export MASTER=spark://$(hostname):7077 | ||
export SPARK_WORKER_INSTANCES=3; export CORES_PER_WORKER=1 | ||
export SPARK_WORKER_INSTANCES=2; export CORES_PER_WORKER=1 | ||
export TOTAL_CORES=$((${CORES_PER_WORKER}*${SPARK_WORKER_INSTANCES})) | ||
${SPARK_HOME}/sbin/start-master.sh; ${SPARK_HOME}/sbin/start-slave.sh -c ${CORES_PER_WORKER} -m 3G ${MASTER} | ||
${SPARK_HOME}/sbin/start-master.sh; ${SPARK_HOME}/sbin/start-slave.sh -c ${CORES_PER_WORKER} -m 2G ${MASTER} | ||
|
||
# Run Tests | ||
python -m unittest discover | ||
# Run tests | ||
python -m unittest discover -s $DIR | ||
EXIT_CODE=$? | ||
|
||
# Stop Spark Standalone Cluster | ||
${SPARK_HOME}/sbin/stop-slave.sh; ${SPARK_HOME}/sbin/stop-master.sh | ||
|
||
exit $EXIT_CODE |
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