Commit 3fd637ba authored by Oleg Dzhimiev's avatar Oleg Dzhimiev

readme and builder

parent f2ca38ae
# Step 1 (Java):
bazel build -c opt //tensorflow/java:tensorflow //tensorflow/java:libtensorflow_jni //tensorflow/java:pom
mvn install:install-file -Dfile=bazel-bin/tensorflow/java/libtensorflow.jar -DpomFile=bazel-bin/tensorflow/java/pom.xml
# Step 2 (JNI):
bazel build -c opt //tensorflow/tools/lib_package:libtensorflow_jni.tar.gz
rm -rf bazel-bin/tensorflow/tools/lib_package/maven
mkdir -p bazel-bin/tensorflow/tools/lib_package/maven/org/tensorflow/native/linux-x86_64
POM="
<project>
<modelVersion>4.0.0</modelVersion>
<description>Platform-dependent native code for the TensorFlow Java library. CUDA support depends on the local build.</description>
<groupId>org.tensorflow</groupId>
<artifactId>libtensorflow_jni_gpu</artifactId>
<version>1.15.2</version>
<packaging>jar</packaging>
<build>
<resources>
<resource>
<directory>.</directory>
<excludes>
<exclude>target/**</exclude>
</excludes>
</resource>
</resources>
</build>
</project>
"
echo $POM > bazel-bin/tensorflow/tools/lib_package/maven/pom.xml
tar -zxvf bazel-bin/tensorflow/tools/lib_package/libtensorflow_jni.tar.gz -C bazel-bin/tensorflow/tools/lib_package/maven/org/tensorflow/native/linux-x86_64
cd bazel-bin/tensorflow/tools/lib_package/maven
mvn package
mvn install
cd ../../../../..
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment