Commit 42cd6927 authored by Amir MOHAMMADI's avatar Amir MOHAMMADI

pull 761f470895ae382142d80d6d895f299746aef754 from 3d1221c13b472a585187d972a7112b332d78b32d

parent b4a8cb29
This file is automatically generated by conda-smithy. To change any matrix elements, you should change conda-smithy's input conda_build_config.yaml and re-render the recipe, rather than editing these files directly.
\ No newline at end of file
c_compiler:
- gcc
c_compiler_version:
- '7'
cdt_name:
- cos6
channel_sources:
- conda-forge,defaults
channel_targets:
- conda-forge main
cxx_compiler:
- gxx
cxx_compiler_version:
- '7'
docker_image:
- quay.io/condaforge/linux-anvil-comp7
libcurl:
- '7'
libpng:
- '1.6'
pin_run_as_build:
libcurl:
max_pin: x
libpng:
max_pin: x.x
python:
min_pin: x.x
max_pin: x.x
zlib:
max_pin: x.x
python:
- 3.6.* *_cpython
target_platform:
- linux-64
zip_keys:
- - c_compiler_version
- cxx_compiler_version
zlib:
- '1.2'
c_compiler:
- gcc
c_compiler_version:
- '7'
cdt_name:
- cos6
channel_sources:
- conda-forge,defaults
channel_targets:
- conda-forge main
cxx_compiler:
- gxx
cxx_compiler_version:
- '7'
docker_image:
- quay.io/condaforge/linux-anvil-comp7
libcurl:
- '7'
libpng:
- '1.6'
pin_run_as_build:
libcurl:
max_pin: x
libpng:
max_pin: x.x
python:
min_pin: x.x
max_pin: x.x
zlib:
max_pin: x.x
python:
- 3.7.* *_cpython
target_platform:
- linux-64
zip_keys:
- - c_compiler_version
- cxx_compiler_version
zlib:
- '1.2'
c_compiler:
- gcc
c_compiler_version:
- '7'
cdt_name:
- cos6
channel_sources:
- conda-forge,defaults
channel_targets:
- conda-forge main
cxx_compiler:
- gxx
cxx_compiler_version:
- '7'
docker_image:
- quay.io/condaforge/linux-anvil-comp7
libcurl:
- '7'
libpng:
- '1.6'
pin_run_as_build:
libcurl:
max_pin: x
libpng:
max_pin: x.x
python:
min_pin: x.x
max_pin: x.x
zlib:
max_pin: x.x
python:
- 3.8.* *_cpython
target_platform:
- linux-64
zip_keys:
- - c_compiler_version
- cxx_compiler_version
zlib:
- '1.2'
MACOSX_DEPLOYMENT_TARGET:
- '10.9'
channel_sources:
- conda-forge,defaults
channel_targets:
- conda-forge main
macos_machine:
- x86_64-apple-darwin13.4.0
pin_run_as_build:
python:
min_pin: x.x
max_pin: x.x
python:
- 3.6.* *_cpython
target_platform:
- osx-64
MACOSX_DEPLOYMENT_TARGET:
- '10.9'
channel_sources:
- conda-forge,defaults
channel_targets:
- conda-forge main
macos_machine:
- x86_64-apple-darwin13.4.0
pin_run_as_build:
python:
min_pin: x.x
max_pin: x.x
python:
- 3.7.* *_cpython
target_platform:
- osx-64
MACOSX_DEPLOYMENT_TARGET:
- '10.9'
channel_sources:
- conda-forge,defaults
channel_targets:
- conda-forge main
macos_machine:
- x86_64-apple-darwin13.4.0
pin_run_as_build:
python:
min_pin: x.x
max_pin: x.x
python:
- 3.8.* *_cpython
target_platform:
- osx-64
channel_sources:
- conda-forge,defaults
channel_targets:
- conda-forge main
pin_run_as_build:
python:
min_pin: x.x
max_pin: x.x
python:
- 3.6.* *_cpython
target_platform:
- win-64
channel_sources:
- conda-forge,defaults
channel_targets:
- conda-forge main
pin_run_as_build:
python:
min_pin: x.x
max_pin: x.x
python:
- 3.7.* *_cpython
target_platform:
- win-64
channel_sources:
- conda-forge,defaults
channel_targets:
- conda-forge main
pin_run_as_build:
python:
min_pin: x.x
max_pin: x.x
python:
- 3.8.* *_cpython
target_platform:
- win-64
* text=auto
*.patch binary
*.diff binary
meta.yaml text eol=lf
build.sh text eol=lf
bld.bat text eol=crlf
# github helper pieces to make some files not show up in diffs automatically
.azure-pipelines/* linguist-generated=true
.circleci/* linguist-generated=true
.drone/* linguist-generated=true
.drone.yml linguist-generated=true
.github/* linguist-generated=true
.travis/* linguist-generated=true
.appveyor.yml linguist-generated=true
.gitattributes linguist-generated=true
.gitignore linguist-generated=true
.travis.yml linguist-generated=true
.scripts/* linguist-generated=true
LICENSE.txt linguist-generated=true
README.md linguist-generated=true
azure-pipelines.yml linguist-generated=true
build-locally.py linguist-generated=true
shippable.yml linguist-generated=true
*.pyc
build_artifacts
#!/usr/bin/env bash
# PLEASE NOTE: This script has been automatically generated by conda-smithy. Any changes here
# will be lost next time ``conda smithy rerender`` is run. If you would like to make permanent
# changes to this script, consider a proposal to conda-smithy so that other feedstocks can also
# benefit from the improvement.
set -xeuo pipefail
export PYTHONUNBUFFERED=1
export FEEDSTOCK_ROOT="${FEEDSTOCK_ROOT:-/home/conda/feedstock_root}"
export RECIPE_ROOT="${RECIPE_ROOT:-/home/conda/recipe_root}"
export CI_SUPPORT="${FEEDSTOCK_ROOT}/.ci_support"
export CONFIG_FILE="${CI_SUPPORT}/${CONFIG}.yaml"
cat >~/.condarc <<CONDARC
conda-build:
root-dir: ${FEEDSTOCK_ROOT}/build_artifacts
CONDARC
conda install --yes --quiet "conda-forge-ci-setup=3" conda-build pip -c conda-forge
# set up the condarc
setup_conda_rc "${FEEDSTOCK_ROOT}" "${RECIPE_ROOT}" "${CONFIG_FILE}"
source run_conda_forge_build_setup
# make the build number clobber
make_build_number "${FEEDSTOCK_ROOT}" "${RECIPE_ROOT}" "${CONFIG_FILE}"
if [[ "${BUILD_WITH_CONDA_DEBUG:-0}" == 1 ]]; then
if [[ "x${BUILD_OUTPUT_ID:-}" != "x" ]]; then
EXTRA_CB_OPTIONS="${EXTRA_CB_OPTIONS:-} --output-id ${BUILD_OUTPUT_ID}"
fi
conda debug "${RECIPE_ROOT}" -m "${CI_SUPPORT}/${CONFIG}.yaml" \
${EXTRA_CB_OPTIONS:-} \
--clobber-file "${CI_SUPPORT}/clobber_${CONFIG}.yaml"
# Drop into an interactive shell
/bin/bash
else
conda build "${RECIPE_ROOT}" -m "${CI_SUPPORT}/${CONFIG}.yaml" \
--suppress-variables ${EXTRA_CB_OPTIONS:-} \
--clobber-file "${CI_SUPPORT}/clobber_${CONFIG}.yaml"
validate_recipe_outputs "${FEEDSTOCK_NAME}"
if [[ "${UPLOAD_PACKAGES}" != "False" ]]; then
upload_package --validate --feedstock-name="${FEEDSTOCK_NAME}" "${FEEDSTOCK_ROOT}" "${RECIPE_ROOT}" "${CONFIG_FILE}"
fi
fi
touch "${FEEDSTOCK_ROOT}/build_artifacts/conda-forge-build-done-${CONFIG}"
\ No newline at end of file
#!/usr/bin/env bash
# PLEASE NOTE: This script has been automatically generated by conda-smithy. Any changes here
# will be lost next time ``conda smithy rerender`` is run. If you would like to make permanent
# changes to this script, consider a proposal to conda-smithy so that other feedstocks can also
# benefit from the improvement.
set -xeo pipefail
THISDIR="$( cd "$( dirname "$0" )" >/dev/null && pwd )"
PROVIDER_DIR="$(basename $THISDIR)"
FEEDSTOCK_ROOT=$(cd "$(dirname "$0")/.."; pwd;)
RECIPE_ROOT="${FEEDSTOCK_ROOT}/recipe"
if [ -z ${FEEDSTOCK_NAME} ]; then
export FEEDSTOCK_NAME=$(basename ${FEEDSTOCK_ROOT})
fi
docker info
# In order for the conda-build process in the container to write to the mounted
# volumes, we need to run with the same id as the host machine, which is
# normally the owner of the mounted volumes, or at least has write permission
export HOST_USER_ID=$(id -u)
# Check if docker-machine is being used (normally on OSX) and get the uid from
# the VM
if hash docker-machine 2> /dev/null && docker-machine active > /dev/null; then
export HOST_USER_ID=$(docker-machine ssh $(docker-machine active) id -u)
fi
ARTIFACTS="$FEEDSTOCK_ROOT/build_artifacts"
if [ -z "$CONFIG" ]; then
set +x
FILES=`ls .ci_support/linux_*`
CONFIGS=""
for file in $FILES; do
CONFIGS="${CONFIGS}'${file:12:-5}' or ";
done
echo "Need to set CONFIG env variable. Value can be one of ${CONFIGS:0:-4}"
exit 1
fi
if [ -z "${DOCKER_IMAGE}" ]; then
SHYAML_INSTALLED="$(shyaml -h || echo NO)"
if [ "${SHYAML_INSTALLED}" == "NO" ]; then
echo "WARNING: DOCKER_IMAGE variable not set and shyaml not installed. Falling back to condaforge/linux-anvil-comp7"
DOCKER_IMAGE="condaforge/linux-anvil-comp7"
else
DOCKER_IMAGE="$(cat "${FEEDSTOCK_ROOT}/.ci_support/${CONFIG}.yaml" | shyaml get-value docker_image.0 condaforge/linux-anvil-comp7 )"
fi
fi
mkdir -p "$ARTIFACTS"
DONE_CANARY="$ARTIFACTS/conda-forge-build-done-${CONFIG}"
rm -f "$DONE_CANARY"
# Allow people to specify extra default arguments to `docker run` (e.g. `--rm`)
DOCKER_RUN_ARGS="${CONDA_FORGE_DOCKER_RUN_ARGS}"
if [ -z "${CI}" ]; then
DOCKER_RUN_ARGS="-it ${DOCKER_RUN_ARGS}"
fi
export UPLOAD_PACKAGES="${UPLOAD_PACKAGES:-True}"
docker run ${DOCKER_RUN_ARGS} \
-v "${RECIPE_ROOT}":/home/conda/recipe_root:rw,z \
-v "${FEEDSTOCK_ROOT}":/home/conda/feedstock_root:rw,z \
-e CONFIG \
-e HOST_USER_ID \
-e UPLOAD_PACKAGES \
-e GIT_BRANCH \
-e UPLOAD_ON_BRANCH \
-e CI \
-e FEEDSTOCK_NAME \
-e CPU_COUNT \
-e BUILD_WITH_CONDA_DEBUG \
-e BUILD_OUTPUT_ID \
-e BINSTAR_TOKEN \
-e FEEDSTOCK_TOKEN \
-e STAGING_BINSTAR_TOKEN \
$DOCKER_IMAGE \
bash \
/home/conda/feedstock_root/${PROVIDER_DIR}/build_steps.sh
# verify that the end of the script was reached
test -f "$DONE_CANARY"
\ No newline at end of file
#!/usr/bin/env bash
set -x
echo -e "\n\nInstalling a fresh version of Miniforge."
if [[ ${CI} == "travis" ]]; then
echo -en 'travis_fold:start:install_miniforge\\r'
fi
MINIFORGE_URL="https://github.com/conda-forge/miniforge/releases/latest/download"
MINIFORGE_FILE="Miniforge3-MacOSX-x86_64.sh"
curl -L -O "${MINIFORGE_URL}/${MINIFORGE_FILE}"
bash $MINIFORGE_FILE -b
if [[ ${CI} == "travis" ]]; then
echo -en 'travis_fold:end:install_miniforge\\r'
fi
echo -e "\n\nConfiguring conda."
if [[ ${CI} == "travis" ]]; then
echo -en 'travis_fold:start:configure_conda\\r'
fi
source ${HOME}/miniforge3/etc/profile.d/conda.sh
conda activate base
echo -e "\n\nInstalling conda-forge-ci-setup=3 and conda-build."
conda install -n base --quiet --yes "conda-forge-ci-setup=3" conda-build pip
echo -e "\n\nSetting up the condarc and mangling the compiler."
setup_conda_rc ./ ./recipe ./.ci_support/${CONFIG}.yaml
mangle_compiler ./ ./recipe .ci_support/${CONFIG}.yaml
echo -e "\n\nMangling homebrew in the CI to avoid conflicts."
/usr/bin/sudo mangle_homebrew
/usr/bin/sudo -k
echo -e "\n\nRunning the build setup script."
source run_conda_forge_build_setup
if [[ ${CI} == "travis" ]]; then
echo -en 'travis_fold:end:configure_conda\\r'
fi
set -e
echo -e "\n\nMaking the build clobber file and running the build."
make_build_number ./ ./recipe ./.ci_support/${CONFIG}.yaml
conda build ./recipe -m ./.ci_support/${CONFIG}.yaml --suppress-variables --clobber-file ./.ci_support/clobber_${CONFIG}.yaml ${EXTRA_CB_OPTIONS:-}
validate_recipe_outputs "${FEEDSTOCK_NAME}"
if [[ "${UPLOAD_PACKAGES}" != "False" ]]; then
echo -e "\n\nUploading the packages."
upload_package --validate --feedstock-name="${FEEDSTOCK_NAME}" ./ ./recipe ./.ci_support/${CONFIG}.yaml
fi
\ No newline at end of file
BSD 3-clause license
Copyright (c) 2015-2020, conda-forge contributors
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
This diff is collapsed.
# This file was generated automatically from conda-smithy. To update this configuration,
# update the conda-forge.yml and/or the recipe/meta.yaml.
# -*- mode: yaml -*-
jobs:
- template: ./.azure-pipelines/azure-pipelines-linux.yml
- template: ./.azure-pipelines/azure-pipelines-win.yml
- template: ./.azure-pipelines/azure-pipelines-osx.yml
\ No newline at end of file
#!/usr/bin/env python3
#
# This file has been generated by conda-smithy in order to build the recipe
# locally.
#
import os
import glob
import subprocess
from argparse import ArgumentParser
def setup_environment(ns):
os.environ["CONFIG"] = ns.config
os.environ["UPLOAD_PACKAGES"] = "False"
if ns.debug:
os.environ["BUILD_WITH_CONDA_DEBUG"] = "1"
if ns.output_id:
os.environ["BUILD_OUTPUT_ID"] = ns.output_id
def run_docker_build(ns):
script = ".scripts/run_docker_build.sh"
subprocess.check_call([script])
def verify_config(ns):
valid_configs = {
os.path.basename(f)[:-5] for f in glob.glob(".ci_support/*.yaml")
}
print(f"valid configs are {valid_configs}")
if ns.config in valid_configs:
print("Using " + ns.config + " configuration")
return
elif len(valid_configs) == 1:
ns.config = valid_configs.pop()
print("Found " + ns.config + " configuration")
elif ns.config is None:
print("config not selected, please choose from the following:\n")
selections = list(enumerate(sorted(valid_configs), 1))
for i, c in selections:
print(f"{i}. {c}")
s = input("\n> ")
idx = int(s) - 1
ns.config = selections[idx][1]
print(f"selected {ns.config}")
else:
raise ValueError("config " + ns.config + " is not valid")
# Remove the following, as implemented
if not ns.config.startswith("linux"):
raise ValueError(
f"only Linux configs currently supported, got {ns.config}"
)
def main(args=None):
p = ArgumentParser("build-locally")
p.add_argument("config", default=None, nargs="?")
p.add_argument(
"--debug",
action="store_true",
help="Setup debug environment using `conda debug`",
)
p.add_argument(
"--output-id", help="If running debug, specify the output to setup."
)
ns = p.parse_args(args=args)
verify_config(ns)
setup_environment(ns)
run_docker_build(ns)
if __name__ == "__main__":
main()
travis:
secure:
BINSTAR_TOKEN: NBULVMw70vHV7ch6QWoFGS84M9ghYbix6Fru8O6db3pTyPXZoNlOaNdkHKaOdR88sahmjZx23T00bk9G/UjDqNO+SmPpf30m2Mt8DY+in3rAB9fi9xSJBjZ51xnAVH3JXXGo884wgtjLkCwk7aBYNLtNWtJl0AA5VgxS+1guMGYsqWiPDAtiFEswyhB4ZVO2budldeatef5unjpYC2im9gok5/fGHlRFGf8ds1K4xc22uIDeqnlR4hbu1IUS4n1+qLNi+TYLjoVyoghIm6BBuJyVMoWyGNayGootFByfPGttnfYU/9D9Z/cfonpW3iBkz3oLfq6vtKRE0mwxRdY0ZpPhQitCH6dLWA7z+9aRSLSfnZkwuFGr8uosVWFTqG0WwudgURr2PLSZf14U7tK1sVLnlVaRIfghmCFh9m8GYTImlrfUPZHsS+dtXOnLosPmH97XJke028J6dIwtNXsMaiQSJc+R7ugN6QbGKgDklsgEWJyUm7+LfSVbMf03u9fslU8V7U/TUeCqZye86GWjmcz+s42sqQ0XooPdqj3PMG6f9SeH/muxpMFnnxSoiITnmgB64dhTrymv1U0edWlbgvg9u4F7/opKExfBZtTcL5op5MKrKsMRgOAho6hixedoBXtXUts8UB4xMt3qTzDz43PkaeA096TCqyJbYJTtZqM=
appveyor:
secure:
BINSTAR_TOKEN: tumuXLL8PU75WMnRDemRy02ruEq2RpNxeK3dz0MjFssnosPm2v4EFjfNB4PTotA1
provider:
win: azure
conda_forge_output_validation: true
This diff is collapsed.
pip install --no-deps -vv *.whl
for %%f in (*.whl) do pip install --no-deps -vv "%%f"
#!/bin/bash
set -ex
if [[ "$target_platform" == "osx-64" ]]; then
# install the whl using pip
pip install --no-deps *.whl
# The tensorboard package has the proper entrypoint
ls -l ${SP_DIR}
# rm -f ${PREFIX}/bin/tensorboard
exit 0
fi
export PATH="$PWD:$PATH"
export CC=$(basename $CC)
export CXX=$(basename $CXX)
export LIBDIR=$PREFIX/lib
export INCLUDEDIR=$PREFIX/include
export TF_SYSTEM_LIBS="llvm,swig"
# do not build with MKL support
export TF_NEED_MKL=0
export BAZEL_MKL_OPT=""
mkdir -p ./bazel_output_base
export BAZEL_OPTS=""
if [[ "$target_platform" == "osx-64" ]]; then
# set up bazel config file for conda provided clang toolchain
cp -r ${RECIPE_DIR}/custom_clang_toolchain .
pushd custom_clang_toolchain
cp ../$CC cc_wrapper.sh
sed -e "s:\${PREFIX}:${BUILD_PREFIX}:" \
-e "s:\${LD}:${LD}:" \
-e "s:\${NM}:${NM}:" \
-e "s:\${STRIP}:${STRIP}:" \
-e "s:\${LIBTOOL}:${LIBTOOL}:" \
-e "s:\${CONDA_BUILD_SYSROOT}:${CONDA_BUILD_SYSROOT}:" \
CROSSTOOL.template > CROSSTOOL
popd
export BAZEL_USE_CPP_ONLY_TOOLCHAIN=1
BUILD_OPTS="
--crosstool_top=//custom_clang_toolchain:toolchain
--verbose_failures
${BAZEL_MKL_OPT}
--config=opt"
export TF_ENABLE_XLA=0
export BUILD_TARGET="//tensorflow/tools/pip_package:build_pip_package"
else
# Linux
# the following arguments are useful for debugging
# --logging=6
# --subcommands
# jobs can be used to limit parallel builds and reduce resource needs
# --jobs=20
# Set compiler and linker flags as bazel does not account for CFLAGS,
# CXXFLAGS and LDFLAGS.
BUILD_OPTS="
--copt=-march=nocona
--copt=-mtune=haswell
--copt=-ftree-vectorize
--copt=-fPIC
--copt=-fstack-protector-strong
--copt=-O2
--cxxopt=-fvisibility-inlines-hidden
--cxxopt=-fmessage-length=0
--linkopt=-zrelro
--linkopt=-znow
--verbose_failures
${BAZEL_MKL_OPT}
--config=opt"
export TF_ENABLE_XLA=0
export BUILD_TARGET="//tensorflow/tools/pip_package:build_pip_package //tensorflow:libtensorflow.so //tensorflow:libtensorflow_cc.so"
fi
# TODO: publish 2.0 branch in bazel-feedstock
export BAZEL_VERSION=2.0.0
export EXTRA_BAZEL_ARGS="--host_javabase=@local_jdk//:jdk"
mkdir bazel_local
cd bazel_local
curl -sSOL https://github.com/bazelbuild/bazel/releases/download/${BAZEL_VERSION}/bazel-${BAZEL_VERSION}-dist.zip
unzip bazel-${BAZEL_VERSION}-dist.zip
./compile.sh
cd ..
export PATH="$PWD/bazel_local/output:$PATH"
bazel version
# Python settings
export PYTHON_BIN_PATH=${PYTHON}
export PYTHON_LIB_PATH=${SP_DIR}
export USE_DEFAULT_PYTHON_LIB_PATH=1
# additional settings
export CC_OPT_FLAGS="-march=nocona -mtune=haswell"
export TF_NEED_OPENCL=0
export TF_NEED_OPENCL_SYCL=0
export TF_NEED_COMPUTECPP=0
export TF_NEED_CUDA=0
export TF_CUDA_CLANG=0
export TF_NEED_TENSORRT=0
export TF_NEED_ROCM=0
export TF_NEED_MPI=0
export TF_DOWNLOAD_CLANG=0
export TF_SET_ANDROID_WORKSPACE=0
./configure
# build using bazel
bazel ${BAZEL_OPTS} build ${BUILD_OPTS} ${BUILD_TARGET}
# build a whl file
mkdir -p $SRC_DIR/tensorflow_pkg
bazel-bin/tensorflow/tools/pip_package/build_pip_package $SRC_DIR/tensorflow_pkg
# install the whl using pip
pip install --no-deps $SRC_DIR/tensorflow_pkg/*.whl
# The tensorboard package has the proper entrypoint
rm -f ${PREFIX}/bin/tensorboard
# copy libraries
mkdir -p ${PREFIX}/lib
cp bazel-bin/tensorflow/*.so ${PREFIX}/lib/
# copy includes
mkdir -p ${PREFIX}/include/tensorflow/c
cp -R tensorflow/c/* ${PREFIX}/include/tensorflow/c/.
# copy libraries
mkdir -p ${PREFIX}/lib
cp bazel-bin/tensorflow/libtensorflow_cc.so ${PREFIX}/lib/
cp bazel-bin/tensorflow/libtensorflow_framework.so ${PREFIX}/lib/
# remove cc files
find bazel-genfiles/ -name "*.cc" -type f -delete
find tensorflow/cc -name "*.cc" -type f -delete
find tensorflow/core -name "*.cc" -type f -delete
find third_party -name "*.cc" -type f -delete
find bazel-work/external/com_google_absl/absl -name "*.cc" -type f -delete
# copy includes
mkdir -p ${PREFIX}/include/tensorflow
cp -r bazel-genfiles/* ${PREFIX}/include/
cp -r tensorflow/cc/ ${PREFIX}/include/tensorflow
cp -r tensorflow/core/ ${PREFIX}/include/tensorflow
cp -r third_party/ ${PREFIX}/include