diff --git a/tensorflow/tools/ci_build/nightly_release/macos/cpu_py35.sh b/tensorflow/tools/ci_build/nightly_release/macos/cpu_py35.sh new file mode 100644 index 00000000000..7da3b0ea9be --- /dev/null +++ b/tensorflow/tools/ci_build/nightly_release/macos/cpu_py35.sh @@ -0,0 +1,67 @@ +#!/bin/bash +# Copyright 2019 The TensorFlow Authors. All Rights Reserved. +# +# Licensed 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. +# ============================================================================== +set -e +set -x + +source tensorflow/tools/ci_build/release/common.sh +install_bazelisk + +# Pick a version of xcode +export DEVELOPER_DIR=/Applications/Xcode_10.3.app/Contents/Developer +sudo xcode-select -s "${DEVELOPER_DIR}" + +sudo pip3.5 install --upgrade pip + +install_macos_pip_deps sudo pip3.5 + +# For python3 path on Mac +export PATH=$PATH:/usr/local/bin + +sudo pip install twine + +./tensorflow/tools/ci_build/update_version.py --nightly + +# Run configure. +export CC_OPT_FLAGS='-mavx' +export PYTHON_BIN_PATH=$(which python3.5) +yes "" | "$PYTHON_BIN_PATH" configure.py + +# Build the pip package +bazel build --config=release_cpu_macos tensorflow/tools/pip_package:build_pip_package +mkdir pip_pkg +./bazel-bin/tensorflow/tools/pip_package/build_pip_package pip_pkg --cpu --nightly_flag + +# Copy and rename to tf_nightly +for f in $(ls pip_pkg/tf_nightly_cpu-*dev*macosx*.whl); do + copy_to_new_project_name "${f}" tf_nightly +done + +# Upload the built packages to pypi. +for f in $(ls pip_pkg/tf_nightly*dev*macosx*.whl); do + # test the whl pip package + chmod +x tensorflow/tools/ci_build/builds/nightly_release_smoke_test.sh + ./tensorflow/tools/ci_build/builds/nightly_release_smoke_test.sh ${f} + RETVAL=$? + + # Upload the PIP package if whl test passes. + if [ ${RETVAL} -eq 0 ]; then + echo "Basic PIP test PASSED, Uploading package: ${f}" + twine upload -r pypi-warehouse "${f}" || echo + else + echo "Basic PIP test FAILED, will not upload ${f} package" + return 1 + fi +done diff --git a/tensorflow/tools/ci_build/nightly_release/macos/cpu_py36.sh b/tensorflow/tools/ci_build/nightly_release/macos/cpu_py36.sh new file mode 100644 index 00000000000..33e1491dd86 --- /dev/null +++ b/tensorflow/tools/ci_build/nightly_release/macos/cpu_py36.sh @@ -0,0 +1,66 @@ +#!/bin/bash +# Copyright 2019 The TensorFlow Authors. All Rights Reserved. +# +# Licensed 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. +# ============================================================================== +set -e +set -x + +source tensorflow/tools/ci_build/release/common.sh +install_bazelisk + +# Pick a version of xcode +export DEVELOPER_DIR=/Applications/Xcode_10.3.app/Contents/Developer +sudo xcode-select -s "${DEVELOPER_DIR}" + +install_macos_pip_deps sudo pip3.6 + +# For python3 path on Mac +export PATH=$PATH:/usr/local/bin + +sudo pip install twine + +./tensorflow/tools/ci_build/update_version.py --nightly + +# Run configure. +export CC_OPT_FLAGS='-mavx' +export PYTHON_BIN_PATH=$(which python3.6) +yes "" | "$PYTHON_BIN_PATH" configure.py + +# Build the pip package +bazel build --config=release_cpu_macos tensorflow/tools/pip_package:build_pip_package +mkdir pip_pkg +./bazel-bin/tensorflow/tools/pip_package/build_pip_package pip_pkg --cpu --nightly_flag + +# Copy and rename to tf_nightly +for f in $(ls pip_pkg/tf_nightly_cpu-*dev*macosx*.whl); do + copy_to_new_project_name "${f}" tf_nightly +done + +# Upload the built packages to pypi. +for f in $(ls pip_pkg/tf_nightly*dev*macosx*.whl); do + + # test the whl pip package + chmod +x tensorflow/tools/ci_build/builds/nightly_release_smoke_test.sh + ./tensorflow/tools/ci_build/builds/nightly_release_smoke_test.sh ${f} + RETVAL=$? + + # Upload the PIP package if whl test passes. + if [ ${RETVAL} -eq 0 ]; then + echo "Basic PIP test PASSED, Uploading package: ${f}" + twine upload -r pypi-warehouse "${f}" || echo + else + echo "Basic PIP test FAILED, will not upload ${f} package" + return 1 + fi +done diff --git a/tensorflow/tools/ci_build/nightly_release/macos/cpu_py37.sh b/tensorflow/tools/ci_build/nightly_release/macos/cpu_py37.sh new file mode 100644 index 00000000000..631aea318bd --- /dev/null +++ b/tensorflow/tools/ci_build/nightly_release/macos/cpu_py37.sh @@ -0,0 +1,66 @@ +#!/bin/bash +# Copyright 2019 The TensorFlow Authors. All Rights Reserved. +# +# Licensed 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. +# ============================================================================== +set -e +set -x + +source tensorflow/tools/ci_build/release/common.sh +install_bazelisk + +# Pick a version of xcode +export DEVELOPER_DIR=/Applications/Xcode_10.3.app/Contents/Developer +sudo xcode-select -s "${DEVELOPER_DIR}" + +install_macos_pip_deps sudo pip3.7 + +# For python3 path on Mac +export PATH=$PATH:/usr/local/bin + +sudo pip install twine + +./tensorflow/tools/ci_build/update_version.py --nightly + +# Run configure. +export CC_OPT_FLAGS='-mavx' +export PYTHON_BIN_PATH=$(which python3.7) +yes "" | "$PYTHON_BIN_PATH" configure.py + +# Build the pip package +bazel build --config=release_cpu_macos tensorflow/tools/pip_package:build_pip_package +mkdir pip_pkg +./bazel-bin/tensorflow/tools/pip_package/build_pip_package pip_pkg --cpu --nightly_flag + +# Copy and rename to tf_nightly +for f in $(ls pip_pkg/tf_nightly_cpu-*dev*macosx*.whl); do + copy_to_new_project_name "${f}" tf_nightly +done + +# Upload the built packages to pypi. +for f in $(ls pip_pkg/tf_nightly*dev*macosx*.whl); do + + # test the whl pip package + chmod +x tensorflow/tools/ci_build/builds/nightly_release_smoke_test.sh + ./tensorflow/tools/ci_build/builds/nightly_release_smoke_test.sh ${f} + RETVAL=$? + + # Upload the PIP package if whl test passes. + if [ ${RETVAL} -eq 0 ]; then + echo "Basic PIP test PASSED, Uploading package: ${f}" + twine upload -r pypi-warehouse "${f}" || echo + else + echo "Basic PIP test FAILED, will not upload ${f} package" + return 1 + fi +done diff --git a/tensorflow/tools/ci_build/nightly_release/macos/cpu_py38.sh b/tensorflow/tools/ci_build/nightly_release/macos/cpu_py38.sh new file mode 100644 index 00000000000..5ffef89188c --- /dev/null +++ b/tensorflow/tools/ci_build/nightly_release/macos/cpu_py38.sh @@ -0,0 +1,66 @@ +#!/bin/bash +# Copyright 2019 The TensorFlow Authors. All Rights Reserved. +# +# Licensed 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. +# ============================================================================== +set -e +set -x + +source tensorflow/tools/ci_build/release/common.sh +install_bazelisk + +# Pick a version of xcode +export DEVELOPER_DIR=/Applications/Xcode_10.3.app/Contents/Developer +sudo xcode-select -s "${DEVELOPER_DIR}" + +install_macos_pip_deps sudo pip3.8 + +# For python3 path on Mac +export PATH=$PATH:/usr/local/bin + +sudo pip install twine + +./tensorflow/tools/ci_build/update_version.py --nightly + +# Run configure. +export CC_OPT_FLAGS='-mavx' +export PYTHON_BIN_PATH=$(which python3.8) +yes "" | "$PYTHON_BIN_PATH" configure.py + +# Build the pip package +bazel build --config=release_cpu_macos tensorflow/tools/pip_package:build_pip_package +mkdir pip_pkg +./bazel-bin/tensorflow/tools/pip_package/build_pip_package pip_pkg --cpu --nightly_flag + +# Copy and rename to tf_nightly +for f in $(ls pip_pkg/tf_nightly_cpu-*dev*macosx*.whl); do + copy_to_new_project_name "${f}" tf_nightly +done + +# Upload the built packages to pypi. +for f in $(ls pip_pkg/tf_nightly*dev*macosx*.whl); do + + # test the whl pip package + chmod +x tensorflow/tools/ci_build/builds/nightly_release_smoke_test.sh + ./tensorflow/tools/ci_build/builds/nightly_release_smoke_test.sh ${f} + RETVAL=$? + + # Upload the PIP package if whl test passes. + if [ ${RETVAL} -eq 0 ]; then + echo "Basic PIP test PASSED, Uploading package: ${f}" + twine upload -r pypi-warehouse "${f}" || echo + else + echo "Basic PIP test FAILED, will not upload ${f} package" + return 1 + fi +done diff --git a/tensorflow/tools/ci_build/nightly_release/ubuntu/cpu_py35.sh b/tensorflow/tools/ci_build/nightly_release/ubuntu/cpu_py35.sh new file mode 100644 index 00000000000..4af77739c55 --- /dev/null +++ b/tensorflow/tools/ci_build/nightly_release/ubuntu/cpu_py35.sh @@ -0,0 +1,58 @@ +#!/bin/bash +# Copyright 2019 The TensorFlow Authors. All Rights Reserved. +# +# Licensed 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. +# ============================================================================== +set -e +set -x + +source tensorflow/tools/ci_build/release/common.sh + +install_ubuntu_16_pip_deps pip3.5 + +install_bazelisk + +python2.7 tensorflow/tools/ci_build/update_version.py --nightly + +# Run configure. +export CC_OPT_FLAGS='-mavx' +export PYTHON_BIN_PATH=$(which python3.5) +yes "" | "$PYTHON_BIN_PATH" configure.py + +# Build the pip package +bazel build --config=release_cpu_linux tensorflow/tools/pip_package:build_pip_package + +./bazel-bin/tensorflow/tools/pip_package/build_pip_package pip_pkg --cpu --nightly_flag + +# Upload the built packages to pypi. +for WHL_PATH in $(ls pip_pkg/tf_nightly_cpu-*dev*.whl); do + + WHL_DIR=$(dirname "${WHL_PATH}") + WHL_BASE_NAME=$(basename "${WHL_PATH}") + AUDITED_WHL_NAME="${WHL_DIR}"/$(echo "${WHL_BASE_NAME//linux/manylinux2010}") + auditwheel repair --plat manylinux2010_x86_64 -w "${WHL_DIR}" "${WHL_PATH}" + + # test the whl pip package + chmod +x tensorflow/tools/ci_build/builds/nightly_release_smoke_test.sh + ./tensorflow/tools/ci_build/builds/nightly_release_smoke_test.sh ${AUDITED_WHL_NAME} + RETVAL=$? + + # Upload the PIP package if whl test passes. + if [ ${RETVAL} -eq 0 ]; then + echo "Basic PIP test PASSED, Uploading package: ${AUDITED_WHL_NAME}" + twine upload -r pypi-warehouse "${AUDITED_WHL_NAME}" + else + echo "Basic PIP test FAILED, will not upload ${AUDITED_WHL_NAME} package" + return 1 + fi +done diff --git a/tensorflow/tools/ci_build/nightly_release/ubuntu/cpu_py36.sh b/tensorflow/tools/ci_build/nightly_release/ubuntu/cpu_py36.sh new file mode 100644 index 00000000000..9cca17e5517 --- /dev/null +++ b/tensorflow/tools/ci_build/nightly_release/ubuntu/cpu_py36.sh @@ -0,0 +1,58 @@ +#!/bin/bash +# Copyright 2019 The TensorFlow Authors. All Rights Reserved. +# +# Licensed 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. +# ============================================================================== +set -e +set -x + +source tensorflow/tools/ci_build/release/common.sh + +install_ubuntu_16_pip_deps pip3.6 + +install_bazelisk + +python2.7 tensorflow/tools/ci_build/update_version.py --nightly + +# Run configure. +export CC_OPT_FLAGS='-mavx' +export PYTHON_BIN_PATH=$(which python3.6) +yes "" | "$PYTHON_BIN_PATH" configure.py + +# Build the pip package +bazel build --config=release_cpu_linux tensorflow/tools/pip_package:build_pip_package + +./bazel-bin/tensorflow/tools/pip_package/build_pip_package pip_pkg --cpu --nightly_flag + +# Upload the built packages to pypi. +for WHL_PATH in $(ls pip_pkg/tf_nightly_cpu-*dev*.whl); do + + WHL_DIR=$(dirname "${WHL_PATH}") + WHL_BASE_NAME=$(basename "${WHL_PATH}") + AUDITED_WHL_NAME="${WHL_DIR}"/$(echo "${WHL_BASE_NAME//linux/manylinux2010}") + auditwheel repair --plat manylinux2010_x86_64 -w "${WHL_DIR}" "${WHL_PATH}" + + # test the whl pip package + chmod +x tensorflow/tools/ci_build/builds/nightly_release_smoke_test.sh + ./tensorflow/tools/ci_build/builds/nightly_release_smoke_test.sh ${AUDITED_WHL_NAME} + RETVAL=$? + + # Upload the PIP package if whl test passes. + if [ ${RETVAL} -eq 0 ]; then + echo "Basic PIP test PASSED, Uploading package: ${AUDITED_WHL_NAME}" + twine upload -r pypi-warehouse "${AUDITED_WHL_NAME}" + else + echo "Basic PIP test FAILED, will not upload ${AUDITED_WHL_NAME} package" + return 1 + fi +done diff --git a/tensorflow/tools/ci_build/nightly_release/ubuntu/cpu_py37.sh b/tensorflow/tools/ci_build/nightly_release/ubuntu/cpu_py37.sh new file mode 100644 index 00000000000..29fe8f4c351 --- /dev/null +++ b/tensorflow/tools/ci_build/nightly_release/ubuntu/cpu_py37.sh @@ -0,0 +1,58 @@ +#!/bin/bash +# Copyright 2019 The TensorFlow Authors. All Rights Reserved. +# +# Licensed 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. +# ============================================================================== +set -e +set -x + +source tensorflow/tools/ci_build/release/common.sh + +install_ubuntu_16_pip_deps pip3.7 + +install_bazelisk + +python2.7 tensorflow/tools/ci_build/update_version.py --nightly + +# Run configure. +export CC_OPT_FLAGS='-mavx' +export PYTHON_BIN_PATH=$(which python3.7) +yes "" | "$PYTHON_BIN_PATH" configure.py + +# Build the pip package +bazel build --config=release_cpu_linux tensorflow/tools/pip_package:build_pip_package + +./bazel-bin/tensorflow/tools/pip_package/build_pip_package pip_pkg --cpu --nightly_flag + +# Upload the built packages to pypi. +for WHL_PATH in $(ls pip_pkg/tf_nightly_cpu-*dev*.whl); do + + WHL_DIR=$(dirname "${WHL_PATH}") + WHL_BASE_NAME=$(basename "${WHL_PATH}") + AUDITED_WHL_NAME="${WHL_DIR}"/$(echo "${WHL_BASE_NAME//linux/manylinux2010}") + auditwheel repair --plat manylinux2010_x86_64 -w "${WHL_DIR}" "${WHL_PATH}" + + # test the whl pip package + chmod +x tensorflow/tools/ci_build/builds/nightly_release_smoke_test.sh + ./tensorflow/tools/ci_build/builds/nightly_release_smoke_test.sh ${AUDITED_WHL_NAME} + RETVAL=$? + + # Upload the PIP package if whl test passes. + if [ ${RETVAL} -eq 0 ]; then + echo "Basic PIP test PASSED, Uploading package: ${AUDITED_WHL_NAME}" + twine upload -r pypi-warehouse "${AUDITED_WHL_NAME}" + else + echo "Basic PIP test FAILED, will not upload ${AUDITED_WHL_NAME} package" + return 1 + fi +done diff --git a/tensorflow/tools/ci_build/nightly_release/ubuntu/cpu_py38.sh b/tensorflow/tools/ci_build/nightly_release/ubuntu/cpu_py38.sh new file mode 100644 index 00000000000..442d6a4cc76 --- /dev/null +++ b/tensorflow/tools/ci_build/nightly_release/ubuntu/cpu_py38.sh @@ -0,0 +1,58 @@ +#!/bin/bash +# Copyright 2019 The TensorFlow Authors. All Rights Reserved. +# +# Licensed 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. +# ============================================================================== +set -e +set -x + +source tensorflow/tools/ci_build/release/common.sh + +install_ubuntu_16_pip_deps pip3.8 + +install_bazelisk + +python2.7 tensorflow/tools/ci_build/update_version.py --nightly + +# Run configure. +export CC_OPT_FLAGS='-mavx' +export PYTHON_BIN_PATH=$(which python3.8) +yes "" | "$PYTHON_BIN_PATH" configure.py + +# Build the pip package +bazel build --config=release_cpu_linux tensorflow/tools/pip_package:build_pip_package + +./bazel-bin/tensorflow/tools/pip_package/build_pip_package pip_pkg --cpu --nightly_flag + +# Upload the built packages to pypi. +for WHL_PATH in $(ls pip_pkg/tf_nightly_cpu-*dev*.whl); do + + WHL_DIR=$(dirname "${WHL_PATH}") + WHL_BASE_NAME=$(basename "${WHL_PATH}") + AUDITED_WHL_NAME="${WHL_DIR}"/$(echo "${WHL_BASE_NAME//linux/manylinux2010}") + auditwheel repair --plat manylinux2010_x86_64 -w "${WHL_DIR}" "${WHL_PATH}" + + # test the whl pip package + chmod +x tensorflow/tools/ci_build/builds/nightly_release_smoke_test.sh + ./tensorflow/tools/ci_build/builds/nightly_release_smoke_test.sh ${AUDITED_WHL_NAME} + RETVAL=$? + + # Upload the PIP package if whl test passes. + if [ ${RETVAL} -eq 0 ]; then + echo "Basic PIP test PASSED, Uploading package: ${AUDITED_WHL_NAME}" + twine upload -r pypi-warehouse "${AUDITED_WHL_NAME}" + else + echo "Basic PIP test FAILED, will not upload ${AUDITED_WHL_NAME} package" + return 1 + fi +done diff --git a/tensorflow/tools/ci_build/nightly_release/ubuntu/gpu_py35.sh b/tensorflow/tools/ci_build/nightly_release/ubuntu/gpu_py35.sh new file mode 100644 index 00000000000..aac88b57fa7 --- /dev/null +++ b/tensorflow/tools/ci_build/nightly_release/ubuntu/gpu_py35.sh @@ -0,0 +1,63 @@ +#!/bin/bash +# Copyright 2019 The TensorFlow Authors. All Rights Reserved. +# +# Licensed 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. +# ============================================================================== +set -e +set -x + +source tensorflow/tools/ci_build/release/common.sh + +install_ubuntu_16_pip_deps pip3.5 + +install_bazelisk + +python2.7 tensorflow/tools/ci_build/update_version.py --nightly + +# Run configure. +export CC_OPT_FLAGS='-mavx' +export PYTHON_BIN_PATH=$(which python3.5) +yes "" | "$PYTHON_BIN_PATH" configure.py + +# Build the pip package +bazel build --config=release_gpu_linux tensorflow/tools/pip_package:build_pip_package + +./bazel-bin/tensorflow/tools/pip_package/build_pip_package pip_pkg --nightly_flag +./bazel-bin/tensorflow/tools/pip_package/build_pip_package pip_pkg --gpu --nightly_flag + +# Upload the built packages to pypi. +for WHL_PATH in $(ls pip_pkg/tf_nightly*dev*.whl); do + + WHL_DIR=$(dirname "${WHL_PATH}") + WHL_BASE_NAME=$(basename "${WHL_PATH}") + AUDITED_WHL_NAME="${WHL_DIR}"/$(echo "${WHL_BASE_NAME//linux/manylinux2010}") + + # Copy and rename for gpu manylinux as we do not want auditwheel to package in libcudart.so + WHL_PATH=${AUDITED_WHL_NAME} + cp "${WHL_DIR}"/"${WHL_BASE_NAME}" "${WHL_PATH}" + echo "Copied manylinux2010 wheel file at: ${WHL_PATH}" + + # test the whl pip package + chmod +x tensorflow/tools/ci_build/builds/nightly_release_smoke_test.sh + ./tensorflow/tools/ci_build/builds/nightly_release_smoke_test.sh ${AUDITED_WHL_NAME} + RETVAL=$? + + # Upload the PIP package if whl test passes. + if [ ${RETVAL} -eq 0 ]; then + echo "Basic PIP test PASSED, Uploading package: ${AUDITED_WHL_NAME}" + twine upload -r pypi-warehouse "${AUDITED_WHL_NAME}" + else + echo "Basic PIP test FAILED, will not upload ${AUDITED_WHL_NAME} package" + return 1 + fi +done diff --git a/tensorflow/tools/ci_build/nightly_release/ubuntu/gpu_py36.sh b/tensorflow/tools/ci_build/nightly_release/ubuntu/gpu_py36.sh new file mode 100644 index 00000000000..600b4b0be8e --- /dev/null +++ b/tensorflow/tools/ci_build/nightly_release/ubuntu/gpu_py36.sh @@ -0,0 +1,63 @@ +#!/bin/bash +# Copyright 2019 The TensorFlow Authors. All Rights Reserved. +# +# Licensed 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. +# ============================================================================== +set -e +set -x + +source tensorflow/tools/ci_build/release/common.sh + +install_ubuntu_16_pip_deps pip3.6 + +install_bazelisk + +python2.7 tensorflow/tools/ci_build/update_version.py --nightly + +# Run configure. +export CC_OPT_FLAGS='-mavx' +export PYTHON_BIN_PATH=$(which python3.6) +yes "" | "$PYTHON_BIN_PATH" configure.py + +# Build the pip package +bazel build --config=release_gpu_linux tensorflow/tools/pip_package:build_pip_package + +./bazel-bin/tensorflow/tools/pip_package/build_pip_package pip_pkg --nightly_flag +./bazel-bin/tensorflow/tools/pip_package/build_pip_package pip_pkg --gpu --nightly_flag + +# Upload the built packages to pypi. +for WHL_PATH in $(ls pip_pkg/tf_nightly*dev*.whl); do + + WHL_DIR=$(dirname "${WHL_PATH}") + WHL_BASE_NAME=$(basename "${WHL_PATH}") + AUDITED_WHL_NAME="${WHL_DIR}"/$(echo "${WHL_BASE_NAME//linux/manylinux2010}") + + # Copy and rename for gpu manylinux as we do not want auditwheel to package in libcudart.so + WHL_PATH=${AUDITED_WHL_NAME} + cp "${WHL_DIR}"/"${WHL_BASE_NAME}" "${WHL_PATH}" + echo "Copied manylinux2010 wheel file at: ${WHL_PATH}" + + # test the whl pip package + chmod +x tensorflow/tools/ci_build/builds/nightly_release_smoke_test.sh + ./tensorflow/tools/ci_build/builds/nightly_release_smoke_test.sh ${AUDITED_WHL_NAME} + RETVAL=$? + + # Upload the PIP package if whl test passes. + if [ ${RETVAL} -eq 0 ]; then + echo "Basic PIP test PASSED, Uploading package: ${AUDITED_WHL_NAME}" + twine upload -r pypi-warehouse "${AUDITED_WHL_NAME}" + else + echo "Basic PIP test FAILED, will not upload ${AUDITED_WHL_NAME} package" + return 1 + fi +done diff --git a/tensorflow/tools/ci_build/nightly_release/ubuntu/gpu_py37.sh b/tensorflow/tools/ci_build/nightly_release/ubuntu/gpu_py37.sh new file mode 100644 index 00000000000..a9e51461715 --- /dev/null +++ b/tensorflow/tools/ci_build/nightly_release/ubuntu/gpu_py37.sh @@ -0,0 +1,63 @@ +#!/bin/bash +# Copyright 2019 The TensorFlow Authors. All Rights Reserved. +# +# Licensed 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. +# ============================================================================== +set -e +set -x + +source tensorflow/tools/ci_build/release/common.sh + +install_ubuntu_16_pip_deps pip3.7 + +install_bazelisk + +python2.7 tensorflow/tools/ci_build/update_version.py --nightly + +# Run configure. +export CC_OPT_FLAGS='-mavx' +export PYTHON_BIN_PATH=$(which python3.7) +yes "" | "$PYTHON_BIN_PATH" configure.py + +# Build the pip package +bazel build --config=release_gpu_linux tensorflow/tools/pip_package:build_pip_package + +./bazel-bin/tensorflow/tools/pip_package/build_pip_package pip_pkg --nightly_flag +./bazel-bin/tensorflow/tools/pip_package/build_pip_package pip_pkg --gpu --nightly_flag + +# Upload the built packages to pypi. +for WHL_PATH in $(ls pip_pkg/tf_nightly*dev*.whl); do + + WHL_DIR=$(dirname "${WHL_PATH}") + WHL_BASE_NAME=$(basename "${WHL_PATH}") + AUDITED_WHL_NAME="${WHL_DIR}"/$(echo "${WHL_BASE_NAME//linux/manylinux2010}") + + # Copy and rename for gpu manylinux as we do not want auditwheel to package in libcudart.so + WHL_PATH=${AUDITED_WHL_NAME} + cp "${WHL_DIR}"/"${WHL_BASE_NAME}" "${WHL_PATH}" + echo "Copied manylinux2010 wheel file at: ${WHL_PATH}" + + # test the whl pip package + chmod +x tensorflow/tools/ci_build/builds/nightly_release_smoke_test.sh + ./tensorflow/tools/ci_build/builds/nightly_release_smoke_test.sh ${AUDITED_WHL_NAME} + RETVAL=$? + + # Upload the PIP package if whl test passes. + if [ ${RETVAL} -eq 0 ]; then + echo "Basic PIP test PASSED, Uploading package: ${AUDITED_WHL_NAME}" + twine upload -r pypi-warehouse "${AUDITED_WHL_NAME}" + else + echo "Basic PIP test FAILED, will not upload ${AUDITED_WHL_NAME} package" + return 1 + fi +done diff --git a/tensorflow/tools/ci_build/nightly_release/ubuntu/gpu_py38.sh b/tensorflow/tools/ci_build/nightly_release/ubuntu/gpu_py38.sh new file mode 100644 index 00000000000..0b8fd1380f2 --- /dev/null +++ b/tensorflow/tools/ci_build/nightly_release/ubuntu/gpu_py38.sh @@ -0,0 +1,65 @@ +#!/bin/bash +# Copyright 2019 The TensorFlow Authors. All Rights Reserved. +# +# Licensed 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. +# ============================================================================== +set -e +set -x + +source tensorflow/tools/ci_build/release/common.sh + +install_ubuntu_16_pip_deps pip3.8 + +pip3.7 install --upgrade auditwheel --user + +update_bazel_linux + +python2.7 tensorflow/tools/ci_build/update_version.py --nightly + +# Run configure. +export CC_OPT_FLAGS='-mavx' +export PYTHON_BIN_PATH=$(which python3.8) +yes "" | "$PYTHON_BIN_PATH" configure.py + +# Build the pip package +bazel build --config=release_gpu_linux tensorflow/tools/pip_package:build_pip_package + +./bazel-bin/tensorflow/tools/pip_package/build_pip_package pip_pkg --nightly_flag +./bazel-bin/tensorflow/tools/pip_package/build_pip_package pip_pkg --gpu --nightly_flag + +# Upload the built packages to pypi. +for WHL_PATH in $(ls pip_pkg/tf_nightly*dev*.whl); do + + WHL_DIR=$(dirname "${WHL_PATH}") + WHL_BASE_NAME=$(basename "${WHL_PATH}") + AUDITED_WHL_NAME="${WHL_DIR}"/$(echo "${WHL_BASE_NAME//linux/manylinux2010}") + + # Copy and rename for gpu manylinux as we do not want auditwheel to package in libcudart.so + WHL_PATH=${AUDITED_WHL_NAME} + cp "${WHL_DIR}"/"${WHL_BASE_NAME}" "${WHL_PATH}" + echo "Copied manylinux2010 wheel file at: ${WHL_PATH}" + + # test the whl pip package + chmod +x tensorflow/tools/ci_build/builds/nightly_release_smoke_test.sh + ./tensorflow/tools/ci_build/builds/nightly_release_smoke_test.sh ${AUDITED_WHL_NAME} + RETVAL=$? + + # Upload the PIP package if whl test passes. + if [ ${RETVAL} -eq 0 ]; then + echo "Basic PIP test PASSED, Uploading package: ${AUDITED_WHL_NAME}" + twine upload -r pypi-warehouse "${AUDITED_WHL_NAME}" + else + echo "Basic PIP test FAILED, will not upload ${AUDITED_WHL_NAME} package" + return 1 + fi +done diff --git a/tensorflow/tools/ci_build/nightly_release/windows/cpu_py35.bat b/tensorflow/tools/ci_build/nightly_release/windows/cpu_py35.bat new file mode 100644 index 00000000000..6ed1088893f --- /dev/null +++ b/tensorflow/tools/ci_build/nightly_release/windows/cpu_py35.bat @@ -0,0 +1,20 @@ +:: Copyright 2019 The TensorFlow Authors. All Rights Reserved. +:: +:: Licensed 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. +:: ============================================================================= + +SET PYTHON_DIRECTORY=Python35 + +CALL tensorflow\tools\ci_build\release\common_win.bat + +call tensorflow\tools\ci_build\windows\cpu\pip\run.bat --tf_nightly --project_name "tf_nightly_cpu" diff --git a/tensorflow/tools/ci_build/nightly_release/windows/cpu_py36.bat b/tensorflow/tools/ci_build/nightly_release/windows/cpu_py36.bat new file mode 100644 index 00000000000..3af98dddeae --- /dev/null +++ b/tensorflow/tools/ci_build/nightly_release/windows/cpu_py36.bat @@ -0,0 +1,20 @@ +:: Copyright 2019 The TensorFlow Authors. All Rights Reserved. +:: +:: Licensed 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. +:: ============================================================================= + +SET PYTHON_DIRECTORY=Python36 + +CALL tensorflow\tools\ci_build\release\common_win.bat + +call tensorflow\tools\ci_build\windows\cpu\pip\run.bat --tf_nightly --project_name "tf_nightly_cpu" diff --git a/tensorflow/tools/ci_build/nightly_release/windows/cpu_py37.bat b/tensorflow/tools/ci_build/nightly_release/windows/cpu_py37.bat new file mode 100644 index 00000000000..850c21ee962 --- /dev/null +++ b/tensorflow/tools/ci_build/nightly_release/windows/cpu_py37.bat @@ -0,0 +1,20 @@ +:: Copyright 2019 The TensorFlow Authors. All Rights Reserved. +:: +:: Licensed 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. +:: ============================================================================= + +SET PYTHON_DIRECTORY=Python37 + +CALL tensorflow\tools\ci_build\release\common_win.bat + +call tensorflow\tools\ci_build\windows\cpu\pip\run.bat --tf_nightly --project_name "tf_nightly_cpu" diff --git a/tensorflow/tools/ci_build/nightly_release/windows/cpu_py38.bat b/tensorflow/tools/ci_build/nightly_release/windows/cpu_py38.bat new file mode 100644 index 00000000000..2456b1e26bb --- /dev/null +++ b/tensorflow/tools/ci_build/nightly_release/windows/cpu_py38.bat @@ -0,0 +1,20 @@ +:: Copyright 2019 The TensorFlow Authors. All Rights Reserved. +:: +:: Licensed 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. +:: ============================================================================= + +SET PYTHON_DIRECTORY=Python38 + +CALL tensorflow\tools\ci_build\release\common_win.bat + +call tensorflow\tools\ci_build\windows\cpu\pip\run.bat --tf_nightly --project_name "tf_nightly_cpu" diff --git a/tensorflow/tools/ci_build/nightly_release/windows/gpu_py35.bat b/tensorflow/tools/ci_build/nightly_release/windows/gpu_py35.bat new file mode 100644 index 00000000000..43e6414a74b --- /dev/null +++ b/tensorflow/tools/ci_build/nightly_release/windows/gpu_py35.bat @@ -0,0 +1,20 @@ +:: Copyright 2019 The TensorFlow Authors. All Rights Reserved. +:: +:: Licensed 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. +:: ============================================================================= + +SET PYTHON_DIRECTORY=Python35 + +CALL tensorflow\tools\ci_build\release\common_win.bat + +call tensorflow\tools\ci_build\windows\gpu\pip\run.bat --tf_nightly diff --git a/tensorflow/tools/ci_build/nightly_release/windows/gpu_py36.bat b/tensorflow/tools/ci_build/nightly_release/windows/gpu_py36.bat new file mode 100644 index 00000000000..15ec83c054e --- /dev/null +++ b/tensorflow/tools/ci_build/nightly_release/windows/gpu_py36.bat @@ -0,0 +1,20 @@ +:: Copyright 2019 The TensorFlow Authors. All Rights Reserved. +:: +:: Licensed 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. +:: ============================================================================= + +SET PYTHON_DIRECTORY=Python36 + +CALL tensorflow\tools\ci_build\release\common_win.bat + +call tensorflow\tools\ci_build\windows\gpu\pip\run.bat --tf_nightly diff --git a/tensorflow/tools/ci_build/nightly_release/windows/gpu_py37.bat b/tensorflow/tools/ci_build/nightly_release/windows/gpu_py37.bat new file mode 100644 index 00000000000..1eb65d8a284 --- /dev/null +++ b/tensorflow/tools/ci_build/nightly_release/windows/gpu_py37.bat @@ -0,0 +1,20 @@ +:: Copyright 2019 The TensorFlow Authors. All Rights Reserved. +:: +:: Licensed 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. +:: ============================================================================= + +SET PYTHON_DIRECTORY=Python37 + +CALL tensorflow\tools\ci_build\release\common_win.bat + +call tensorflow\tools\ci_build\windows\gpu\pip\run.bat --tf_nightly diff --git a/tensorflow/tools/ci_build/nightly_release/windows/gpu_py38.bat b/tensorflow/tools/ci_build/nightly_release/windows/gpu_py38.bat new file mode 100644 index 00000000000..670793340e8 --- /dev/null +++ b/tensorflow/tools/ci_build/nightly_release/windows/gpu_py38.bat @@ -0,0 +1,20 @@ +:: Copyright 2019 The TensorFlow Authors. All Rights Reserved. +:: +:: Licensed 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. +:: ============================================================================= + +SET PYTHON_DIRECTORY=Python38 + +CALL tensorflow\tools\ci_build\release\common_win.bat + +call tensorflow\tools\ci_build\windows\gpu\pip\run.bat --tf_nightly diff --git a/tensorflow/tools/ci_build/nightly_release/windows/upload_nightly_pip.sh b/tensorflow/tools/ci_build/nightly_release/windows/upload_nightly_pip.sh new file mode 100644 index 00000000000..609c316cca7 --- /dev/null +++ b/tensorflow/tools/ci_build/nightly_release/windows/upload_nightly_pip.sh @@ -0,0 +1,31 @@ +#!/bin/bash +# Copyright 2019 The TensorFlow Authors. All Rights Reserved. +# +# Licensed 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. +# ============================================================================== +set -e +set -x + +source tensorflow/tools/ci_build/release/common.sh + +sudo pip install --upgrade twine + +# Copy and rename to tf_nightly +for f in $(ls "${TF_FILE_DIR}"/tf_nightly_gpu*dev*cp3*-cp3*-win_amd64.whl); do + copy_to_new_project_name "${f}" tf_nightly +done + +# Upload the built packages to pypi. +for f in $(ls "${TF_FILE_DIR}"/tf_nightly*dev*cp3*-cp3*-win_amd64.whl); do + twine upload -r pypi-warehouse "$f" || echo +done