[meta-tensorflow,06/13] tensorflow-estimator: add version 1.13

Submitted by Hongxu Jia on Feb. 21, 2019, 11:37 a.m. | Patch ID: 158960

Details

Message ID 1550749039-67320-7-git-send-email-hongxu.jia@windriver.com
State New
Headers show

Commit Message

Hongxu Jia Feb. 21, 2019, 11:37 a.m.
The build steps refers README of https://github.com/tensorflow/estimator

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
 .../tensorflow/tensorflow-estimator_1.13.bb        | 50 ++++++++++++++++++++++
 1 file changed, 50 insertions(+)
 create mode 100644 recipes-framework/tensorflow/tensorflow-estimator_1.13.bb

Patch hide | download patch | download mbox

diff --git a/recipes-framework/tensorflow/tensorflow-estimator_1.13.bb b/recipes-framework/tensorflow/tensorflow-estimator_1.13.bb
new file mode 100644
index 0000000..5400888
--- /dev/null
+++ b/recipes-framework/tensorflow/tensorflow-estimator_1.13.bb
@@ -0,0 +1,50 @@ 
+DESCRIPTION = "A high-level TensorFlow API that greatly simplifies machine \
+learning programming."
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=01e86893010a1b87e69a213faa753ebd"
+
+SRC_URI = "git://github.com/tensorflow/estimator.git;branch=r1.13 \
+          "
+SRCREV = "340703eed78ba4854862f749ed94f91598826e79"
+S = "${WORKDIR}/git"
+
+inherit python3native bazel
+
+DEPENDS += " \
+    python3-pip-native \
+    python3-wheel-native \
+    python3-six-native \
+    python3-protobuf-native \
+    python3-absl-native \
+    python3-astor-native \
+    python3-gast-native \
+    python3-termcolor-native \
+    tensorflow-native \
+"
+
+do_compile () {
+    unset CC
+    export TMPDIR="${WORKDIR}"
+    ${STAGING_BINDIR_NATIVE}/bazel build \
+        --subcommands --explain=${T}/explain.log \
+        --verbose_explanations --verbose_failures \
+        --verbose_failures \
+        --python_path="${PYTHON}" \
+        //tensorflow_estimator/tools/pip_package:build_pip_package
+
+    ${STAGING_BINDIR_NATIVE}/bazel shutdown
+
+    PYTHON_BIN_PATH="${PYTHON}" \
+    ${S}/bazel-bin/tensorflow_estimator/tools/pip_package/build_pip_package \
+        ${WORKDIR}/estimator_pip
+}
+
+do_install () {
+    echo "Installing pip package"
+    install -d ${D}${PYTHON_SITEPACKAGES_DIR}
+    ${STAGING_BINDIR_NATIVE}/pip3 install --disable-pip-version-check -v --no-deps \
+        -t ${D}/${PYTHON_SITEPACKAGES_DIR} --no-cache-dir ${WORKDIR}/estimator_pip/*.whl
+
+}
+
+FILES_${PN} += "${libdir}/*"