You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by ch...@apache.org on 2018/10/15 09:13:25 UTC
ignite git commit: IGNITE-9685: [ML] Add ignite-tensorflow module to
build artifacts
Repository: ignite
Updated Branches:
refs/heads/master 712067373 -> 492376815
IGNITE-9685: [ML] Add ignite-tensorflow module to build artifacts
this closes #4945
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/49237681
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/49237681
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/49237681
Branch: refs/heads/master
Commit: 4923768151147cacf3f0dcae4b69400a7c266189
Parents: 7120673
Author: Peter Ivanov <mr...@gmail.com>
Authored: Mon Oct 15 12:13:02 2018 +0300
Committer: Yury Babak <yb...@gridgain.com>
Committed: Mon Oct 15 12:13:02 2018 +0300
----------------------------------------------------------------------
bin/ignite-tf.sh | 183 +++++++++++++++++++
modules/tensorflow/pom.xml | 30 +--
modules/tensorflow/src/main/assembly/zip.xml | 56 ------
.../tensorflow/src/main/resources/logback.xml | 36 ++++
modules/tensorflow/src/main/sh/ignite-tf.sh | 19 --
modules/tensorflow/src/main/sh/logback.xml | 36 ----
pom.xml | 8 +-
7 files changed, 226 insertions(+), 142 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/49237681/bin/ignite-tf.sh
----------------------------------------------------------------------
diff --git a/bin/ignite-tf.sh b/bin/ignite-tf.sh
new file mode 100644
index 0000000..a6499ae
--- /dev/null
+++ b/bin/ignite-tf.sh
@@ -0,0 +1,183 @@
+#!/bin/bash
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+#
+# Command line tool for Tensorflow cluster management.
+#
+
+#
+# Import common functions.
+#
+if [ "${IGNITE_HOME}" = "" ];
+ then IGNITE_HOME_TMP="$(dirname "$(cd "$(dirname "$0")"; "pwd")")";
+ else IGNITE_HOME_TMP=${IGNITE_HOME};
+fi
+
+#
+# Set SCRIPTS_HOME - base path to scripts.
+#
+SCRIPTS_HOME="${IGNITE_HOME_TMP}/bin"
+
+source "${SCRIPTS_HOME}"/include/functions.sh
+
+#
+# Discover path to Java executable and check it's version.
+#
+checkJava
+
+#
+# Discover IGNITE_HOME environment variable.
+#
+setIgniteHome
+
+if [ "${DEFAULT_CONFIG}" == "" ]; then
+ DEFAULT_CONFIG=config/default-config.xml
+fi
+
+#
+# Set IGNITE_LIBS.
+#
+. "${SCRIPTS_HOME}"/include/setenv.sh
+. "${SCRIPTS_HOME}"/include/build-classpath.sh # Will be removed in the binary release.
+IGNITE_OPT_LIBS=${IGNITE_HOME}/libs/optional/
+CP="${IGNITE_LIBS}:${IGNITE_OPT_LIBS}/ignite-tensorflow/*:${IGNITE_OPT_LIBS}/ignite-slf4j/*"
+
+RANDOM_NUMBER=$("$JAVA" -cp "${CP}" org.apache.ignite.startup.cmdline.CommandLineRandomNumberGenerator)
+
+RESTART_SUCCESS_FILE="${IGNITE_HOME}/work/ignite_success_${RANDOM_NUMBER}"
+RESTART_SUCCESS_OPT="-DIGNITE_SUCCESS_FILE=${RESTART_SUCCESS_FILE}"
+
+# Mac OS specific support to display correct name in the dock.
+osname=`uname`
+
+if [ "${DOCK_OPTS}" == "" ]; then
+ DOCK_OPTS="-Xdock:name=Ignite Node"
+fi
+
+#
+# JVM options. See http://java.sun.com/javase/technologies/hotspot/vmoptions.jsp for more details.
+#
+# ADD YOUR/CHANGE ADDITIONAL OPTIONS HERE
+#
+if [ -z "$JVM_OPTS" ] ; then
+ JVM_OPTS="-Xms1g -Xmx1g -server -XX:MaxMetaspaceSize=256m"
+fi
+
+#
+# Uncomment the following GC settings if you see spikes in your throughput due to Garbage Collection.
+#
+# JVM_OPTS="$JVM_OPTS -XX:+UseG1GC"
+
+#
+# Uncomment if you get StackOverflowError.
+# On 64 bit systems this value can be larger, e.g. -Xss16m
+#
+# JVM_OPTS="${JVM_OPTS} -Xss4m"
+
+#
+# Uncomment to set preference for IPv4 stack.
+#
+# JVM_OPTS="${JVM_OPTS} -Djava.net.preferIPv4Stack=true"
+
+#
+# Assertions are disabled by default since version 3.5.
+# If you want to enable them - set 'ENABLE_ASSERTIONS' flag to '1'.
+#
+ENABLE_ASSERTIONS="1"
+
+#
+# Set '-ea' options if assertions are enabled.
+#
+if [ "${ENABLE_ASSERTIONS}" = "1" ]; then
+ JVM_OPTS="${JVM_OPTS} -ea"
+fi
+
+MAIN_CLASS=org.apache.ignite.tensorflow.submitter.JobSubmitter
+
+#
+# Remote debugging (JPDA).
+# Uncomment and change if remote debugging is required.
+#
+# JVM_OPTS="-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8787 ${JVM_OPTS}"
+
+#
+# Final JVM_OPTS for Java 9+ compatibility
+#
+javaMajorVersion "${JAVA_HOME}/bin/java"
+
+if [ $version -eq 8 ] ; then
+ JVM_OPTS="\
+ -XX:+AggressiveOpts \
+ ${JVM_OPTS}"
+
+elif [ $version -gt 8 ] && [ $version -lt 11 ]; then
+ JVM_OPTS="\
+ -XX:+AggressiveOpts \
+ --add-exports=java.base/jdk.internal.misc=ALL-UNNAMED \
+ --add-exports=java.base/sun.nio.ch=ALL-UNNAMED \
+ --add-exports=java.management/com.sun.jmx.mbeanserver=ALL-UNNAMED \
+ --add-exports=jdk.internal.jvmstat/sun.jvmstat.monitor=ALL-UNNAMED \
+ --add-exports=java.base/sun.reflect.generics.reflectiveObjects=ALL-UNNAMED \
+ --illegal-access=permit \
+ --add-modules=java.transaction \
+ --add-modules=java.xml.bind \
+ ${JVM_OPTS}"
+
+elif [ $version -eq 11 ] ; then
+ JVM_OPTS="\
+ --add-exports=java.base/jdk.internal.misc=ALL-UNNAMED \
+ --add-exports=java.base/sun.nio.ch=ALL-UNNAMED \
+ --add-exports=java.management/com.sun.jmx.mbeanserver=ALL-UNNAMED \
+ --add-exports=jdk.internal.jvmstat/sun.jvmstat.monitor=ALL-UNNAMED \
+ --add-exports=java.base/sun.reflect.generics.reflectiveObjects=ALL-UNNAMED \
+ --illegal-access=permit \
+ ${JVM_OPTS}"
+fi
+
+
+ERRORCODE="-1"
+
+QUIET="-DIGNITE_QUIET=false"
+
+while [ "${ERRORCODE}" -ne "130" ]
+do
+ case $osname in
+ Darwin*)
+ "$JAVA" ${JVM_OPTS} ${QUIET} "${DOCK_OPTS}" "${RESTART_SUCCESS_OPT}" \
+ -DIGNITE_UPDATE_NOTIFIER=false -DIGNITE_HOME="${IGNITE_HOME}" \
+ -DIGNITE_PROG_NAME="$0" -cp "${CP}" ${MAIN_CLASS} "${CONFIG}" "$@"
+ ;;
+ *)
+ "$JAVA" ${JVM_OPTS} ${QUIET} "${RESTART_SUCCESS_OPT}" \
+ -DIGNITE_UPDATE_NOTIFIER=false -DIGNITE_HOME="${IGNITE_HOME}" \
+ -DIGNITE_PROG_NAME="$0" -cp "${CP}" ${MAIN_CLASS} "$@"
+ ;;
+ esac
+
+ ERRORCODE="$?"
+
+ if [ ! -f "${RESTART_SUCCESS_FILE}" ] ; then
+ break
+ else
+ rm -f "${RESTART_SUCCESS_FILE}"
+ fi
+done
+
+if [ -f "${RESTART_SUCCESS_FILE}" ] ; then
+ rm -f "${RESTART_SUCCESS_FILE}"
+fi
http://git-wip-us.apache.org/repos/asf/ignite/blob/49237681/modules/tensorflow/pom.xml
----------------------------------------------------------------------
diff --git a/modules/tensorflow/pom.xml b/modules/tensorflow/pom.xml
index b1cfe21..abedb2a 100644
--- a/modules/tensorflow/pom.xml
+++ b/modules/tensorflow/pom.xml
@@ -34,30 +34,6 @@
<version>2.7.0-SNAPSHOT</version>
<url>http://ignite.apache.org</url>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-assembly-plugin</artifactId>
- <executions>
- <execution>
- <id>dist</id>
- <phase>package</phase>
- <goals>
- <goal>single</goal>
- </goals>
- <configuration>
- <appendAssemblyId>false</appendAssemblyId>
- <descriptors>
- <descriptor>src/main/assembly/zip.xml</descriptor>
- </descriptors>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
-
<dependencies>
<dependency>
<groupId>org.apache.ignite</groupId>
@@ -84,6 +60,12 @@
</dependency>
<dependency>
+ <groupId>ch.qos.logback</groupId>
+ <artifactId>logback-core</artifactId>
+ <version>1.2.3</version>
+ </dependency>
+
+ <dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.6</version>
http://git-wip-us.apache.org/repos/asf/ignite/blob/49237681/modules/tensorflow/src/main/assembly/zip.xml
----------------------------------------------------------------------
diff --git a/modules/tensorflow/src/main/assembly/zip.xml b/modules/tensorflow/src/main/assembly/zip.xml
deleted file mode 100644
index 0c90e98..0000000
--- a/modules/tensorflow/src/main/assembly/zip.xml
+++ /dev/null
@@ -1,56 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<!--
- Assembly file.
--->
-<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2
- http://maven.apache.org/xsd/assembly-1.1.2.xsd">
- <id>zip</id>
- <includeBaseDirectory>true</includeBaseDirectory>
-
- <formats>
- <format>zip</format>
- </formats>
-
- <files>
- <file>
- <source>${project.basedir}/src/main/sh/ignite-tf.sh</source>
- <outputDirectory>/</outputDirectory>
- </file>
- <file>
- <source>${project.basedir}/src/main/sh/logback.xml</source>
- <outputDirectory>/</outputDirectory>
- </file>
- <file>
- <source>${project.build.directory}/${project.artifactId}-${project.version}.jar</source>
- <outputDirectory>/lib</outputDirectory>
- </file>
- </files>
-
- <dependencySets>
- <dependencySet>
- <outputDirectory>lib</outputDirectory>
- <useStrictFiltering>true</useStrictFiltering>
- <useProjectArtifact>false</useProjectArtifact>
- <scope>runtime</scope>
- </dependencySet>
- </dependencySets>
-</assembly>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/49237681/modules/tensorflow/src/main/resources/logback.xml
----------------------------------------------------------------------
diff --git a/modules/tensorflow/src/main/resources/logback.xml b/modules/tensorflow/src/main/resources/logback.xml
new file mode 100644
index 0000000..816b5e6
--- /dev/null
+++ b/modules/tensorflow/src/main/resources/logback.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<!--
+ Logback configuration file.
+-->
+<configuration>
+
+ <appender name="FILE" class="ch.qos.logback.core.FileAppender">
+ <file>ignite-tf.log</file>
+ <append>false</append>
+ <encoder>
+ <pattern>%d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger{36} - %msg%n</pattern>
+ </encoder>
+ </appender>
+
+ <root level="warn">
+ <appender-ref ref="FILE" />
+ </root>
+
+</configuration>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/49237681/modules/tensorflow/src/main/sh/ignite-tf.sh
----------------------------------------------------------------------
diff --git a/modules/tensorflow/src/main/sh/ignite-tf.sh b/modules/tensorflow/src/main/sh/ignite-tf.sh
deleted file mode 100755
index fd3e02c..0000000
--- a/modules/tensorflow/src/main/sh/ignite-tf.sh
+++ /dev/null
@@ -1,19 +0,0 @@
-#!/usr/bin/env bash
-
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-SCRIPT_PATH="$( cd "$(dirname "$0")" ; pwd -P )"
-java -Xmx4G -DIGNITE_QUIET=false -cp "$SCRIPT_PATH:$SCRIPT_PATH/lib/*" org.apache.ignite.tensorflow.submitter.JobSubmitter "$@"
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/49237681/modules/tensorflow/src/main/sh/logback.xml
----------------------------------------------------------------------
diff --git a/modules/tensorflow/src/main/sh/logback.xml b/modules/tensorflow/src/main/sh/logback.xml
deleted file mode 100644
index 816b5e6..0000000
--- a/modules/tensorflow/src/main/sh/logback.xml
+++ /dev/null
@@ -1,36 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<!--
- Logback configuration file.
--->
-<configuration>
-
- <appender name="FILE" class="ch.qos.logback.core.FileAppender">
- <file>ignite-tf.log</file>
- <append>false</append>
- <encoder>
- <pattern>%d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger{36} - %msg%n</pattern>
- </encoder>
- </appender>
-
- <root level="warn">
- <appender-ref ref="FILE" />
- </root>
-
-</configuration>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/49237681/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index ace8e8a..6de435a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -93,6 +93,7 @@
<module>modules/rocketmq</module>
<module>modules/sqlline</module>
<module>modules/ml</module>
+ <module>modules/tensorflow</module>
</modules>
<profiles>
@@ -576,13 +577,6 @@
</profile>
<profile>
- <id>tensorflow</id>
- <modules>
- <module>modules/tensorflow</module>
- </modules>
- </profile>
-
- <profile>
<id>update-versions</id>
<!-- updates dotnet & cpp versions -->
<build>