编译tensflow:因为非法指令(吐核)

intel官网

https://software.intel.com/zh-cn/articles/intel-optimization-for-tensorflow-installation-guide
在linux(centos)上从源码安装tensorflow:
https://blog.csdn.net/mafeiyu80/article/details/51397795

来自官网:

不推荐使用源代码构建 TensorFlow。然而,如果上述指令因为 ISA 不受支持而无法运行,您随时可使用源代码进行构建。

使用源代码构建 TensorFlow 需要安装 Bazel,相关信息请参考 安装 Bazel。
https://docs.bazel.build/versions/master/install.html#mac-os-x

https://docs.bazel.build/versions/master/install-redhat.html

安装说明:

运行 TensorFlow 源代码目录中的 "./configure
执行以下命令创建 pip 程序包,以安装经过优化的 TensorFlow build。
可更改PATH,使其指向特定 GCC 编译器版本:
export PATH=/PATH//bin:$PATH
LD_LIBRARY_PATH 还支持全新:
export LD_LIBRARY_PATH=/PATH//lib64:$LD_LIBRARY_PATH
对标记进行相应设置,以使用英特尔® 数学核心函数库(英特尔® MLK)构建 TensorFlow,并传递您希望用于编译库的合适指令集:

bazel build --config=mkl -c opt --copt=-mavx --copt=-mavx2 --copt=-mfma --copt=-mavx512f --copt=-mavx512pf --copt=-mavx512cd --copt=-mavx512er //tensorflow/tools/pip_package:build_pip_package

3.安装优化的 TensorFlow wheel

bazel-bin/tensorflow/tools/pip_package/build_pip_package ~/path_to_save_wheel

pip install --upgrade --user ~/path_to_save_wheel /<wheel_name.whl>

其他

https://www.cnblogs.com/harrymore/p/10028489.html
使用的是python2.7 未测试

stackoverflow.com

https://stackoverflow.com/questions/45877158/illegal-instruction-error-when-building-tensorflow-from-source

https://github.com/naruai/wiki/blob/master/TensorFlow/BuildTensorFlowWOAVX.md

oracleLinux 编译

参考地址:
https://www.tensorflow.org/install/source

配置yum源后安装python及必须包


yum  install  -y python3-devel   python3-pip
yum install python3-devel   g++ unzip zip  gcc-c++  patch
 
##安装 TensorFlow pip 软件包依赖项(如果使用虚拟环境,请省略 --user 参数):  暂时


    pip install -U --user pip six numpy wheel setuptools mock future>=0.17.1
    pip install -U --user keras_applications==1.0.6 --no-deps
    pip install -U --user keras_preprocessing==1.0.5 --no-deps

##下载离线包及安装
pip3 download  six numpy wheel setuptools mock future==0.17.1
pip3 download  keras_applications==1.0.6
pip3 download  keras_applications==1.0.6  keras_preprocessing==1.0.5

-rw-r--r-- 1 root root      762 Feb 17 15:55 =0.17.1
-rw-r--r-- 1 root root    44277 Feb 17 15:56 Keras_Applications-1.0.6-py2.py3-none-any.whl
-rw-r--r-- 1 root root    30674 Feb 17 15:57 Keras_Preprocessing-1.0.5-py2.py3-none-any.whl
-rw-r--r-- 1 root root   829119 Feb 17 15:56 future-0.17.1.tar.gz
-rw-r--r-- 1 root root   829220 Feb 17 15:55 future-0.18.2.tar.gz
-rw-r--r-- 1 root root  2870576 Feb 17 15:56 h5py-2.10.0-cp36-cp36m-manylinux1_x86_64.whl
-rw-r--r-- 1 root root    28699 Feb 17 15:55 mock-4.0.1-py3-none-any.whl
-rw-r--r-- 1 root root 20143300 Feb 17 15:55 numpy-1.18.1-cp36-cp36m-manylinux1_x86_64.whl
-rw-r--r-- 1 root root   584228 Feb 17 15:55 setuptools-45.2.0-py3-none-any.whl
-rw-r--r-- 1 root root    10938 Feb 17 15:55 six-1.14.0-py2.py3-none-any.whl
-rw-r--r-- 1 root root    26502 Feb 17 15:55 wheel-0.34.2-py2.py3-none-any.whl


安装 Bazel:

到https://github.com/bazelbuild/bazel/releases 下载指定版本bazel-0.15.0-installer-linux-x86_64.sh
https://github.com/bazelbuild/bazel/releases?after=0.19.1

参考链接:
https://docs.bazel.build/versions/master/install-redhat.html
https://docs.bazel.build/versions/master/install-ubuntu.html ubuntu版本

##download the corresponding .repo file from Fedora COPR and copy it to /etc/yum.repos.d/. 
##   https://copr.fedorainfracloud.org/coprs/vbatts/bazel/repo/epel-7/vbatts-bazel-epel-7.repo
vbatts-bazel-epel-7.repo
[copr:copr.fedorainfracloud.org:vbatts:bazel]
name=Copr repo for bazel owned by vbatts
baseurl=https://download.copr.fedorainfracloud.org/results/vbatts/bazel/epel-7-$basearch/
type=rpm-md
skip_if_unavailable=True
gpgcheck=1
gpgkey=https://download.copr.fedorainfracloud.org/results/vbatts/bazel/pubkey.gpg
repo_gpgcheck=0
enabled=1
enabled_metadata=1


curl  -o /etc/yum.repos.d/vbatts-bazel-epel-7.repo  https://copr.fedorainfracloud.org/coprs/vbatts/bazel/repo/epel-7/vbatts-bazel-epel-7.repo



##需要安装jdk1.8.x   g++ unzip zip   
rpm  -ivh  jdk-8u221-linux-x64.rpm
##Run the following command:

##yum install bazel
##需要使用二进制安装bazel  yum 安装的版本太高
chmod +x bazel-<version>-installer-linux-x86_64.sh
./bazel-<version>-installer-linux-x86_64.sh --user 

--user flag installs Bazel to the $HOME/bin directory on your system and sets the .bazelrc path to $HOME/.bazelrc

##设置环境变量
export PATH="$PATH:$HOME/bin"

##查看版本
bazel   version
Build label: 0.15.0

下载tensorflow源码

https://github.com/tensorflow/tensorflow/archive/v1.10.0.zip
https://github.com/tensorflow/tensorflow.git


来源: tensflow版本分选择
https://blog.csdn.net/qiancaobaicheng/article/details/95226499
python 库选择:
/usr/lib/python3.6/site-packages

./configure 配置的选择:

[root@wn10aimapap1001 tensorflow-1.10.0]# ./configure 
WARNING: --batch mode is deprecated. Please instead explicitly shut down your Bazel server using the command "bazel shutdown".
You have bazel 0.15.0 installed.
Please specify the location of python. [Default is /usr/bin/python]: 


Found possible Python library paths:
  /usr/lib/python2.7/site-packages
  /usr/lib64/python2.7/site-packages
Please input the desired Python library path to use.  Default is [/usr/lib/python2.7/site-packages]
/usr/lib/python3.6/site-packages
Do you wish to build TensorFlow with jemalloc as malloc support? [Y/n]: n
No jemalloc as malloc support will be enabled for TensorFlow.

Do you wish to build TensorFlow with Google Cloud Platform support? [Y/n]: n
No Google Cloud Platform support will be enabled for TensorFlow.

Do you wish to build TensorFlow with Hadoop File System support? [Y/n]: n
No Hadoop File System support will be enabled for TensorFlow.

Do you wish to build TensorFlow with Amazon AWS Platform support? [Y/n]: n
No Amazon AWS Platform support will be enabled for TensorFlow.

Do you wish to build TensorFlow with Apache Kafka Platform support? [Y/n]: n
No Apache Kafka Platform support will be enabled for TensorFlow.

Do you wish to build TensorFlow with XLA JIT support? [y/N]: n
No XLA JIT support will be enabled for TensorFlow.

Do you wish to build TensorFlow with GDR support? [y/N]: n
No GDR support will be enabled for TensorFlow.

Do you wish to build TensorFlow with VERBS support? [y/N]: n
No VERBS support will be enabled for TensorFlow.

Do you wish to build TensorFlow with OpenCL SYCL support? [y/N]: n
No OpenCL SYCL support will be enabled for TensorFlow.

Do you wish to build TensorFlow with CUDA support? [y/N]: n
No CUDA support will be enabled for TensorFlow.

Do you wish to download a fresh release of clang? (Experimental) [y/N]: n
Clang will not be downloaded.

Do you wish to build TensorFlow with MPI support? [y/N]: n
No MPI support will be enabled for TensorFlow.

Please specify optimization flags to use during compilation when bazel option "--config=opt" is specified [Default is -march=native]: 
Would you like to interactively configure ./WORKSPACE for Android builds? [y/N]: n
Not configuring the WORKSPACE for Android builds.

Preconfigured Bazel build configs. You can use any of the below by adding "--config=<>" to your build command. See tools/bazel.rc for more details.
        --config=mkl            # Build with MKL support.
        --config=monolithic     # Config for mostly static monolithic build.
Configuration finished

bazel编译报错解决示例:

[root@wn10aimapap1001 tensorflow-1.10.0]#     bazel build --config=opt //tensorflow/tools/pip_package:build_pip_package
    Starting local Bazel server and connecting to it...
...............
ERROR: in target '//external:cc_toolchain': no such package '@local_config_cc//': Traceback (most recent call last):
        File "/root/.cache/bazel/_bazel_xxxx/6922e28936bf9c1ce50ca7cdbe5953e3/external/bazel_tools/tools/cpp/cc_configure.bzl", line 56
                configure_unix_toolchain(repository_ctx, cpu_value, overriden...)
        File "/root/.cache/bazel/_bazel_xxxx/6922e28936bf9c1ce50ca7cdbe5953e3/external/bazel_tools/tools/cpp/unix_cc_configure.bzl", line 477, in configure_unix_toolchain
                _find_generic(repository_ctx, "gcc", "CC", overriden...)
        File "/root/.cache/bazel/_bazel_xxxx/6922e28936bf9c1ce50ca7cdbe5953e3/external/bazel_tools/tools/cpp/unix_cc_configure.bzl", line 459, in _find_generic
                auto_configure_fail(msg)
        File "/root/.cache/bazel/_bazel_xxxx/6922e28936bf9c1ce50ca7cdbe5953e3/external/bazel_tools/tools/cpp/lib_cc_configure.bzl", line 109, in auto_configure_fail
                fail(("
%sAuto-Configuration Error:%...)))

Auto-Configuration Error: Cannot find gcc or CC; either correct your path or set the CC environment variable
INFO: Elapsed time: 8.434s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (2 packages loaded)

##############################################################
[root@wn10aimapap1001 tensorflow-1.10.0]#     bazel build --config=opt //tensorflow/tools/pip_package:build_pip_package
ERROR: /home/ap/xxxx/tensorflow-1.10.0/tensorflow/tools/pip_package/BUILD:123:1: no such package '@png_archive//': Traceback (most recent call last):
        File "/home/ap/xxxx/tensorflow-1.10.0/third_party/repo.bzl", line 99
                _apply_patch(ctx, ctx.attr.patch_file)
        File "/home/ap/xxxx/tensorflow-1.10.0/third_party/repo.bzl", line 64, in _apply_patch
                fail("patch command is not found, ple...")
patch command is not found, please install it and referenced by '//tensorflow/tools/pip_package:licenses'
ERROR: Analysis of target '//tensorflow/tools/pip_package:build_pip_package' failed; build aborted: no such package '@png_archive//': Traceback (most recent call last):
        File "/home/ap/xxxx/tensorflow-1.10.0/third_party/repo.bzl", line 99
                _apply_patch(ctx, ctx.attr.patch_file)
        File "/home/ap/xxxx/tensorflow-1.10.0/third_party/repo.bzl", line 64, in _apply_patch
                fail("patch command is not found, ple...")
patch command is not found, please install it
INFO: Elapsed time: 16.697s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (79 packages loaded)
    currently loading: tensorflow/core

#########################################################
[root@wn10aimapap1001 tensorflow-1.10.0]#     bazel build --config=opt //tensorflow/tools/pip_package:build_pip_package
ERROR: /home/ap/xxxx/tensorflow-1.10.0/third_party/python_runtime/BUILD:5:1: no such package '@local_config_python//': Traceback (most recent call last):
        File "/home/ap/xxxx/tensorflow-1.10.0/third_party/py/python_configure.bzl", line 308
                _create_local_python_repository(repository_ctx)
        File "/home/ap/xxxx/tensorflow-1.10.0/third_party/py/python_configure.bzl", line 272, in _create_local_python_repository
                _get_numpy_include(repository_ctx, python_bin)
        File "/home/ap/xxxx/tensorflow-1.10.0/third_party/py/python_configure.bzl", line 256, in _get_numpy_include
                _execute(repository_ctx, [python_bin, "-c",..."], <2 more arguments>)
        File "/home/ap/xxxx/tensorflow-1.10.0/third_party/py/python_configure.bzl", line 55, in _execute
                _fail("
".join([error_msg.strip() if ... ""]))
        File "/home/ap/xxxx/tensorflow-1.10.0/third_party/py/python_configure.bzl", line 28, in _fail
                fail(("%sPython Configuration Error:%...)))
Python Configuration Error: Problem getting numpy include path.
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ImportError: No module named numpy
Is numpy installed?
 and referenced by '//third_party/python_runtime:headers'
ERROR: Analysis of target '//tensorflow/tools/pip_package:build_pip_package' failed; build aborted: Analysis failed
INFO: Elapsed time: 5.363s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (146 packages loaded)
    currently loading: tensorflow/core/kernels
    Fetching https://mirror.bazel.build/github.com/google/re2/archive/2018-04-01.tar.gz

#######################
ERROR: /root/.cache/bazel/_bazel_xxxx/6922e28936bf9c1ce50ca7cdbe5953e3/external/protobuf_archive/BUILD:260:1: C++ compilation of rule '@protobuf_archive//:js_embed' failed (Exit 1)
gcc: error trying to exec 'cc1plus': execvp: No such file or directory
Target //tensorflow/tools/pip_package:build_pip_package failed to build
Use --verbose_failures to see the command lines of failed build steps.


##
yum  install  gcc   patch  
yum  install  gcc-c++

复制python 的头文件到系统目录下
 cp  /usr/include/python3.6m/*   /usr/include/ 

##多个python版本导致yum 下载问题

bazel依赖

bazel build 时需要更多的依赖,离线时安装比较麻烦,参考如下
离线源码安https://blog.csdn.net/s_sunnyy/article/details/86074114 装tensorflow:

所有要下载的文件见: tensorflow 源代码根目录下

WORKSPACE
tensorflow/workspace.bzl  

### cd  /home/ap/xxxx/tensorflow-1.10.0
grep   '"http'  WORKSPACE 
        "https://mirror.bazel.build/github.com/bazelbuild/rules_closure/archive/dbb96841cc0a5fb2664c37822803b06dab20c7d1.tar.gz",
        "https://github.com/bazelbuild/rules_closure/archive/dbb96841cc0a5fb2664c37822803b06dab20c7d1.tar.gz",  # 2018-04-13
        "http://storage.googleapis.com/download.tensorflow.org/models/inception_v1.zip",
        "http://download.tensorflow.org/models/inception_v1.zip",
        "http://storage.googleapis.com/download.tensorflow.org/models/object_detection/ssd_mobilenet_v1_android_export.zip",
        "http://download.tensorflow.org/models/object_detection/ssd_mobilenet_v1_android_export.zip",
        "http://storage.googleapis.com/download.tensorflow.org/models/mobile_multibox_v1a.zip",
        "http://download.tensorflow.org/models/mobile_multibox_v1a.zip",
        "http://storage.googleapis.com/download.tensorflow.org/models/stylize_v1.zip",
        "http://download.tensorflow.org/models/stylize_v1.zip",
        "http://storage.googleapis.com/download.tensorflow.org/models/speech_commands_v0.01.zip",
        "http://download.tensorflow.org/models/speech_commands_v0.01.zip",


 grep   '"http'  tensorflow/workspace.bzl 

          "https://mirror.bazel.build/github.com/intel/mkl-dnn/releases/download/v0.14/mklml_lnx_2018.0.3.20180406.tgz",
          "https://github.com/intel/mkl-dnn/releases/download/v0.14/mklml_lnx_2018.0.3.20180406.tgz"
          "https://mirror.bazel.build/github.com/intel/mkl-dnn/releases/download/v0.14/mklml_win_2018.0.3.20180406.zip",
          "https://github.com/intel/mkl-dnn/releases/download/v0.14/mklml_win_2018.0.3.20180406.zip"
          "https://mirror.bazel.build/github.com/intel/mkl-dnn/releases/download/v0.14/mklml_mac_2018.0.3.20180406.tgz",
          "https://github.com/intel/mkl-dnn/releases/download/v0.14/mklml_mac_2018.0.3.20180406.tgz"
          "https://mirror.bazel.build/github.com/intel/mkl-dnn/archive/v0.14.tar.gz",
          "https://github.com/intel/mkl-dnn/archive/v0.14.tar.gz",
          "https://mirror.bazel.build/github.com/abseil/abseil-cpp/archive/9613678332c976568272c8f4a78631a29159271d.tar.gz",
          "https://github.com/abseil/abseil-cpp/archive/9613678332c976568272c8f4a78631a29159271d.tar.gz",
          "https://mirror.bazel.build/bitbucket.org/eigen/eigen/get/fd6845384b86.tar.gz",
          "https://bitbucket.org/eigen/eigen/get/fd6845384b86.tar.gz",
          "https://mirror.bazel.build/github.com/raspberrypi/tools/archive/0e906ebc527eab1cdbf7adabff5b474da9562e9f.tar.gz",
          # "https://github.com/raspberrypi/tools/archive/0e906ebc527eab1cdbf7adabff5b474da9562e9f.tar.gz",
          "https://mirror.bazel.build/github.com/hfp/libxsmm/archive/1.9.tar.gz",
          "https://github.com/hfp/libxsmm/archive/1.9.tar.gz",
          "https://mirror.bazel.build/github.com/google/or-tools/archive/253f7955c6a1fd805408fba2e42ac6d45b312d15.tar.gz",
          # "https://github.com/google/or-tools/archive/253f7955c6a1fd805408fba2e42ac6d45b312d15.tar.gz",
          "https://mirror.bazel.build/github.com/google/re2/archive/2018-04-01.tar.gz",
          "https://github.com/google/re2/archive/2018-04-01.tar.gz",
          "https://mirror.bazel.build/github.com/GoogleCloudPlatform/google-cloud-cpp/archive/f875700a023bdd706333cde45aee8758b272c357.tar.gz",
          "https://github.com/GoogleCloudPlatform/google-cloud-cpp/archive/f875700a023bdd706333cde45aee8758b272c357.tar.gz",
          "https://mirror.bazel.build/github.com/googleapis/googleapis/archive/f81082ea1e2f85c43649bee26e0d9871d4b41cdb.zip",
          "https://github.com/googleapis/googleapis/archive/f81082ea1e2f85c43649bee26e0d9871d4b41cdb.zip",
          "https://mirror.bazel.build/github.com/google/gemmlowp/archive/38ebac7b059e84692f53e5938f97a9943c120d98.zip",
          "https://github.com/google/gemmlowp/archive/38ebac7b059e84692f53e5938f97a9943c120d98.zip",
          "https://mirror.bazel.build/github.com/google/farmhash/archive/816a4ae622e964763ca0862d9dbd19324a1eaf45.tar.gz",
          "https://github.com/google/farmhash/archive/816a4ae622e964763ca0862d9dbd19324a1eaf45.tar.gz",
          "http://mirror.bazel.build/github.com/google/highwayhash/archive/fd3d9af80465e4383162e4a7c5e2f406e82dd968.tar.gz",
          "https://github.com/google/highwayhash/archive/fd3d9af80465e4383162e4a7c5e2f406e82dd968.tar.gz",
          "https://mirror.bazel.build/www.nasm.us/pub/nasm/releasebuilds/2.13.03/nasm-2.13.03.tar.bz2",
          "http://pkgs.fedoraproject.org/repo/pkgs/nasm/nasm-2.13.03.tar.bz2/sha512/d7a6b4cee8dfd603d8d4c976e5287b5cc542fa0b466ff989b743276a6e28114e64289bf02a7819eca63142a5278aa6eed57773007e5f589e15768e6456a8919d/nasm-2.13.03.tar.bz2",
          "http://www.nasm.us/pub/nasm/releasebuilds/2.13.03/nasm-2.13.03.tar.bz2",
          "https://mirror.bazel.build/github.com/libjpeg-turbo/libjpeg-turbo/archive/1.5.3.tar.gz",
          "https://github.com/libjpeg-turbo/libjpeg-turbo/archive/1.5.3.tar.gz",
          "https://mirror.bazel.build/github.com/glennrp/libpng/archive/v1.6.34.tar.gz",
          "https://github.com/glennrp/libpng/archive/v1.6.34.tar.gz",
          "https://mirror.bazel.build/www.sqlite.org/2018/sqlite-amalgamation-3240000.zip",
          "https://www.sqlite.org/2018/sqlite-amalgamation-3240000.zip",
          "https://mirror.bazel.build/ufpr.dl.sourceforge.net/project/giflib/giflib-5.1.4.tar.gz",
          "http://pilotfiber.dl.sourceforge.net/project/giflib/giflib-5.1.4.tar.gz",
          "https://mirror.bazel.build/pypi.python.org/packages/source/s/six/six-1.10.0.tar.gz",
          "https://pypi.python.org/packages/source/s/six/six-1.10.0.tar.gz",
          "https://mirror.bazel.build/pypi.python.org/packages/d8/be/c4276b3199ec3feee2a88bc64810fbea8f26d961e0a4cd9c68387a9f35de/astor-0.6.2.tar.gz",
          "https://pypi.python.org/packages/d8/be/c4276b3199ec3feee2a88bc64810fbea8f26d961e0a4cd9c68387a9f35de/astor-0.6.2.tar.gz",
          "https://mirror.bazel.build/pypi.python.org/packages/5c/78/ff794fcae2ce8aa6323e789d1f8b3b7765f601e7702726f430e814822b96/gast-0.2.0.tar.gz",
          "https://pypi.python.org/packages/5c/78/ff794fcae2ce8aa6323e789d1f8b3b7765f601e7702726f430e814822b96/gast-0.2.0.tar.gz",
          "https://mirror.bazel.build/pypi.python.org/packages/8a/48/a76be51647d0eb9f10e2a4511bf3ffb8cc1e6b14e9e4fab46173aa79f981/termcolor-1.1.0.tar.gz",
          "https://pypi.python.org/packages/8a/48/a76be51647d0eb9f10e2a4511bf3ffb8cc1e6b14e9e4fab46173aa79f981/termcolor-1.1.0.tar.gz",
          "https://mirror.bazel.build/github.com/abseil/abseil-py/archive/pypi-v0.2.2.tar.gz",
          "https://github.com/abseil/abseil-py/archive/pypi-v0.2.2.tar.gz",
          "https://mirror.bazel.build/pypi.python.org/packages/bc/cc/3cdb0a02e7e96f6c70bd971bc8a90b8463fda83e264fa9c5c1c98ceabd81/backports.weakref-1.0rc1.tar.gz",
          "https://pypi.python.org/packages/bc/cc/3cdb0a02e7e96f6c70bd971bc8a90b8463fda83e264fa9c5c1c98ceabd81/backports.weakref-1.0rc1.tar.gz",
          "https://mirror.bazel.build/docs.python.org/2.7/_sources/license.txt",
          "https://docs.python.org/2.7/_sources/license.txt",
          "https://mirror.bazel.build/github.com/google/protobuf/archive/v3.6.0.tar.gz",
          "https://github.com/google/protobuf/archive/v3.6.0.tar.gz",
          "https://mirror.bazel.build/github.com/google/protobuf/archive/v3.6.0.tar.gz",
          "https://github.com/google/protobuf/archive/v3.6.0.tar.gz",
          "https://mirror.bazel.build/github.com/google/protobuf/archive/v3.6.0.tar.gz",
          "https://github.com/google/protobuf/archive/v3.6.0.tar.gz",
          "https://mirror.bazel.build/github.com/google/nsync/archive/1.20.0.tar.gz",
          "https://github.com/google/nsync/archive/1.20.0.tar.gz",
          "https://mirror.bazel.build/github.com/google/googletest/archive/9816b96a6ddc0430671693df90192bbee57108b6.zip",
          "https://github.com/google/googletest/archive/9816b96a6ddc0430671693df90192bbee57108b6.zip",
          "https://mirror.bazel.build/github.com/gflags/gflags/archive/v2.2.1.tar.gz",
          "https://github.com/gflags/gflags/archive/v2.2.1.tar.gz",
          "https://mirror.bazel.build/ftp.exim.org/pub/pcre/pcre-8.42.tar.gz",
          "http://ftp.exim.org/pub/pcre/pcre-8.42.tar.gz",
          "https://mirror.bazel.build/ufpr.dl.sourceforge.net/project/swig/swig/swig-3.0.8/swig-3.0.8.tar.gz",
          "http://ufpr.dl.sourceforge.net/project/swig/swig/swig-3.0.8/swig-3.0.8.tar.gz",
          "http://pilotfiber.dl.sourceforge.net/project/swig/swig/swig-3.0.8/swig-3.0.8.tar.gz",
          "https://mirror.bazel.build/curl.haxx.se/download/curl-7.60.0.tar.gz",
          "https://curl.haxx.se/download/curl-7.60.0.tar.gz",
          "https://mirror.bazel.build/github.com/grpc/grpc/archive/v1.13.0.tar.gz",
          "https://github.com/grpc/grpc/archive/v1.13.0.tar.gz",
          "https://mirror.bazel.build/github.com/antirez/linenoise/archive/c894b9e59f02203dbe4e2be657572cf88c4230c3.tar.gz",
          "https://github.com/antirez/linenoise/archive/c894b9e59f02203dbe4e2be657572cf88c4230c3.tar.gz",
          "https://mirror.bazel.build/github.com/llvm-mirror/llvm/archive/bd8c8d759852871609ba2e4e79868420f751949d.tar.gz",
          "https://github.com/llvm-mirror/llvm/archive/bd8c8d759852871609ba2e4e79868420f751949d.tar.gz",
          "https://mirror.bazel.build/github.com/LMDB/lmdb/archive/LMDB_0.9.22.tar.gz",
          "https://github.com/LMDB/lmdb/archive/LMDB_0.9.22.tar.gz",
          "https://mirror.bazel.build/github.com/open-source-parsers/jsoncpp/archive/1.8.4.tar.gz",
          "https://github.com/open-source-parsers/jsoncpp/archive/1.8.4.tar.gz",
          "https://mirror.bazel.build/github.com/google/boringssl/archive/a0fb951d2a26a8ee746b52f3ba81ab011a0af778.tar.gz",
          "https://github.com/google/boringssl/archive/a0fb951d2a26a8ee746b52f3ba81ab011a0af778.tar.gz",
          "https://mirror.bazel.build/zlib.net/zlib-1.2.11.tar.gz",
          "https://zlib.net/zlib-1.2.11.tar.gz",
          "https://mirror.bazel.build/www.kurims.kyoto-u.ac.jp/~ooura/fft.tgz",
          "http://www.kurims.kyoto-u.ac.jp/~ooura/fft.tgz",
          "https://mirror.bazel.build/github.com/google/snappy/archive/1.1.7.tar.gz",
          "https://github.com/google/snappy/archive/1.1.7.tar.gz",
          "https://mirror.bazel.build/github.com/nvidia/nccl/archive/03d856977ecbaac87e598c0c4bafca96761b9ac7.tar.gz",
          "https://github.com/nvidia/nccl/archive/03d856977ecbaac87e598c0c4bafca96761b9ac7.tar.gz",
          "https://mirror.bazel.build/github.com/edenhill/librdkafka/archive/v0.11.4.tar.gz",
          "https://github.com/edenhill/librdkafka/archive/v0.11.4.tar.gz",
          "https://mirror.bazel.build/github.com/aws/aws-sdk-cpp/archive/1.3.15.tar.gz",
          "https://github.com/aws/aws-sdk-cpp/archive/1.3.15.tar.gz",
          "https://mirror.bazel.build/repo1.maven.org/maven2/junit/junit/4.12/junit-4.12.jar",
          "http://repo1.maven.org/maven2/junit/junit/4.12/junit-4.12.jar",
          "http://maven.ibiblio.org/maven2/junit/junit/4.12/junit-4.12.jar",
          "https://mirror.bazel.build/repo1.maven.org/maven2/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar",
          "http://repo1.maven.org/maven2/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar",
          "http://maven.ibiblio.org/maven2/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar",
          "https://mirror.bazel.build/github.com/jemalloc/jemalloc/archive/4.4.0.tar.gz",
          "https://github.com/jemalloc/jemalloc/archive/4.4.0.tar.gz",
          "http://mirror.bazel.build/repo1.maven.org/maven2/com/google/testing/compile/compile-testing/0.11/compile-testing-0.11.jar",
          "http://repo1.maven.org/maven2/com/google/testing/compile/compile-testing/0.11/compile-testing-0.11.jar",
          "http://mirror.bazel.build/repo1.maven.org/maven2/com/google/truth/truth/0.32/truth-0.32.jar",
          "http://repo1.maven.org/maven2/com/google/truth/truth/0.32/truth-0.32.jar",
          "http://mirror.bazel.build/repo1.maven.org/maven2/org/checkerframework/checker-qual/2.4.0/checker-qual-2.4.0.jar",
          "http://repo1.maven.org/maven2/org/checkerframework/checker-qual/2.4.0/checker-qual-2.4.0.jar",
          "http://mirror.bazel.build/repo1.maven.org/maven2/com/squareup/javapoet/1.9.0/javapoet-1.9.0.jar",
          "http://repo1.maven.org/maven2/com/squareup/javapoet/1.9.0/javapoet-1.9.0.jar",
          "https://mirror.bazel.build/github.com/google/pprof/archive/c0fb62ec88c411cc91194465e54db2632845b650.tar.gz",
          "https://github.com/google/pprof/archive/c0fb62ec88c411cc91194465e54db2632845b650.tar.gz",
          "https://mirror.bazel.build/github.com/NVlabs/cub/archive/1.8.0.zip",
          "https://github.com/NVlabs/cub/archive/1.8.0.zip",
          "https://mirror.bazel.build/github.com/cython/cython/archive/0.28.4.tar.gz",
          "https://github.com/cython/cython/archive/0.28.4.tar.gz",
          "https://mirror.bazel.build/github.com/bazelbuild/bazel-toolchains/archive/37acf1841ab1475c98a152cb9e446460c8ae29e1.tar.gz",
          "https://github.com/bazelbuild/bazel-toolchains/archive/37acf1841ab1475c98a152cb9e446460c8ae29e1.tar.gz",
          "https://mirror.bazel.build/github.com/intel/ARM_NEON_2_x86_SSE/archive/0f77d9d182265259b135dad949230ecbf1a2633d.tar.gz",
          "https://github.com/intel/ARM_NEON_2_x86_SSE/archive/0f77d9d182265259b135dad949230ecbf1a2633d.tar.gz",
          "https://mirror.bazel.build/github.com/google/flatbuffers/archive/v1.9.0.tar.gz",
          "https://github.com/google/flatbuffers/archive/v1.9.0.tar.gz",
          "https://github.com/google/double-conversion/archive/3992066a95b823efc8ccc1baf82a1cfc73f6e9b8.zip",
          "https://mirror.bazel.build/storage.googleapis.com/download.tensorflow.org/models/tflite/mobilenet_v1_224_android_quant_2017_11_08.zip",
          "https://storage.googleapis.com/download.tensorflow.org/models/tflite/mobilenet_v1_224_android_quant_2017_11_08.zip",
          "https://mirror.bazel.build/storage.googleapis.com/download.tensorflow.org/models/tflite/mobilenet_ssd_tflite_v1.zip",
          "https://storage.googleapis.com/download.tensorflow.org/models/tflite/mobilenet_ssd_tflite_v1.zip",
          "https://mirror.bazel.build/storage.googleapis.com/download.tensorflow.org/models/tflite/coco_ssd_mobilenet_v1_0.75_quant_2018_06_29.zip",
          "https://storage.googleapis.com/download.tensorflow.org/models/tflite/coco_ssd_mobilenet_v1_0.75_quant_2018_06_29.zip",
          "https://mirror.bazel.build/storage.googleapis.com/download.tensorflow.org/models/tflite/conv_actions_tflite.zip",
          "https://storage.googleapis.com/download.tensorflow.org/models/tflite/conv_actions_tflite.zip",
          "https://mirror.bazel.build/storage.googleapis.com/download.tensorflow.org/models/tflite/smartreply_1.0_2017_11_01.zip",
          "https://storage.googleapis.com/download.tensorflow.org/models/tflite/smartreply_1.0_2017_11_01.zip"
          "https://mirror.bazel.build/storage.googleapis.com/download.tensorflow.org/data/ovic.zip",
          "https://storage.googleapis.com/download.tensorflow.org/data/ovic.zip",
          "https://mirror.bazel.build/github.com/bazelbuild/rules_android/archive/v0.1.1.zip",
          "https://github.com/bazelbuild/rules_android/archive/v0.1.1.zip",





####未去重
https://mirror.bazel.build/github.com/bazelbuild/rules_closure/archive/dbb96841cc0a5fb2664c37822803b06dab20c7d1.tar.gz
https://github.com/bazelbuild/rules_closure/archive/dbb96841cc0a5fb2664c37822803b06dab20c7d1.tar.gz 
http://storage.googleapis.com/download.tensorflow.org/models/inception_v1.zip
http://download.tensorflow.org/models/inception_v1.zip
http://storage.googleapis.com/download.tensorflow.org/models/object_detection/ssd_mobilenet_v1_android_export.zip
http://download.tensorflow.org/models/object_detection/ssd_mobilenet_v1_android_export.zip
http://storage.googleapis.com/download.tensorflow.org/models/mobile_multibox_v1a.zip
http://download.tensorflow.org/models/mobile_multibox_v1a.zip
http://storage.googleapis.com/download.tensorflow.org/models/stylize_v1.zip
http://download.tensorflow.org/models/stylize_v1.zip
http://storage.googleapis.com/download.tensorflow.org/models/speech_commands_v0.01.zip
http://download.tensorflow.org/models/speech_commands_v0.01.zip
https://mirror.bazel.build/github.com/intel/mkl-dnn/releases/download/v0.14/mklml_lnx_2018.0.3.20180406.tgz
https://github.com/intel/mkl-dnn/releases/download/v0.14/mklml_lnx_2018.0.3.20180406.tgz
https://mirror.bazel.build/github.com/intel/mkl-dnn/releases/download/v0.14/mklml_win_2018.0.3.20180406.zip
https://github.com/intel/mkl-dnn/releases/download/v0.14/mklml_win_2018.0.3.20180406.zip
https://mirror.bazel.build/github.com/intel/mkl-dnn/releases/download/v0.14/mklml_mac_2018.0.3.20180406.tgz
https://github.com/intel/mkl-dnn/releases/download/v0.14/mklml_mac_2018.0.3.20180406.tgz
https://mirror.bazel.build/github.com/intel/mkl-dnn/archive/v0.14.tar.gz
https://github.com/intel/mkl-dnn/archive/v0.14.tar.gz
https://mirror.bazel.build/github.com/abseil/abseil-cpp/archive/9613678332c976568272c8f4a78631a29159271d.tar.gz
https://github.com/abseil/abseil-cpp/archive/9613678332c976568272c8f4a78631a29159271d.tar.gz
https://mirror.bazel.build/bitbucket.org/eigen/eigen/get/fd6845384b86.tar.gz
https://bitbucket.org/eigen/eigen/get/fd6845384b86.tar.gz
https://mirror.bazel.build/github.com/raspberrypi/tools/archive/0e906ebc527eab1cdbf7adabff5b474da9562e9f.tar.gz
https://github.com/raspberrypi/tools/archive/0e906ebc527eab1cdbf7adabff5b474da9562e9f.tar.gz
https://mirror.bazel.build/github.com/hfp/libxsmm/archive/1.9.tar.gz
https://github.com/hfp/libxsmm/archive/1.9.tar.gz
https://mirror.bazel.build/github.com/google/or-tools/archive/253f7955c6a1fd805408fba2e42ac6d45b312d15.tar.gz
https://github.com/google/or-tools/archive/253f7955c6a1fd805408fba2e42ac6d45b312d15.tar.gz
https://mirror.bazel.build/github.com/google/re2/archive/2018-04-01.tar.gz
https://github.com/google/re2/archive/2018-04-01.tar.gz
https://mirror.bazel.build/github.com/GoogleCloudPlatform/google-cloud-cpp/archive/f875700a023bdd706333cde45aee8758b272c357.tar.gz
https://github.com/GoogleCloudPlatform/google-cloud-cpp/archive/f875700a023bdd706333cde45aee8758b272c357.tar.gz
https://mirror.bazel.build/github.com/googleapis/googleapis/archive/f81082ea1e2f85c43649bee26e0d9871d4b41cdb.zip
https://github.com/googleapis/googleapis/archive/f81082ea1e2f85c43649bee26e0d9871d4b41cdb.zip
https://mirror.bazel.build/github.com/google/gemmlowp/archive/38ebac7b059e84692f53e5938f97a9943c120d98.zip
https://github.com/google/gemmlowp/archive/38ebac7b059e84692f53e5938f97a9943c120d98.zip
https://mirror.bazel.build/github.com/google/farmhash/archive/816a4ae622e964763ca0862d9dbd19324a1eaf45.tar.gz
https://github.com/google/farmhash/archive/816a4ae622e964763ca0862d9dbd19324a1eaf45.tar.gz
http://mirror.bazel.build/github.com/google/highwayhash/archive/fd3d9af80465e4383162e4a7c5e2f406e82dd968.tar.gz
https://github.com/google/highwayhash/archive/fd3d9af80465e4383162e4a7c5e2f406e82dd968.tar.gz
https://mirror.bazel.build/www.nasm.us/pub/nasm/releasebuilds/2.13.03/nasm-2.13.03.tar.bz2
http://pkgs.fedoraproject.org/repo/pkgs/nasm/nasm-2.13.03.tar.bz2/sha512/d7a6b4cee8dfd603d8d4c976e5287b5cc542fa0b466ff989b743276a6e28114e64289bf02a7819eca63142a5278aa6eed57773007e5f589e15768e6456a8919d/nasm-2.13.03.tar.bz2
http://www.nasm.us/pub/nasm/releasebuilds/2.13.03/nasm-2.13.03.tar.bz2
https://mirror.bazel.build/github.com/libjpeg-turbo/libjpeg-turbo/archive/1.5.3.tar.gz
https://github.com/libjpeg-turbo/libjpeg-turbo/archive/1.5.3.tar.gz
https://mirror.bazel.build/github.com/glennrp/libpng/archive/v1.6.34.tar.gz
https://github.com/glennrp/libpng/archive/v1.6.34.tar.gz
https://mirror.bazel.build/www.sqlite.org/2018/sqlite-amalgamation-3240000.zip
https://www.sqlite.org/2018/sqlite-amalgamation-3240000.zip
https://mirror.bazel.build/ufpr.dl.sourceforge.net/project/giflib/giflib-5.1.4.tar.gz
http://pilotfiber.dl.sourceforge.net/project/giflib/giflib-5.1.4.tar.gz
https://mirror.bazel.build/pypi.python.org/packages/source/s/six/six-1.10.0.tar.gz
https://pypi.python.org/packages/source/s/six/six-1.10.0.tar.gz
https://mirror.bazel.build/pypi.python.org/packages/d8/be/c4276b3199ec3feee2a88bc64810fbea8f26d961e0a4cd9c68387a9f35de/astor-0.6.2.tar.gz
https://pypi.python.org/packages/d8/be/c4276b3199ec3feee2a88bc64810fbea8f26d961e0a4cd9c68387a9f35de/astor-0.6.2.tar.gz
https://mirror.bazel.build/pypi.python.org/packages/5c/78/ff794fcae2ce8aa6323e789d1f8b3b7765f601e7702726f430e814822b96/gast-0.2.0.tar.gz
https://pypi.python.org/packages/5c/78/ff794fcae2ce8aa6323e789d1f8b3b7765f601e7702726f430e814822b96/gast-0.2.0.tar.gz
https://mirror.bazel.build/pypi.python.org/packages/8a/48/a76be51647d0eb9f10e2a4511bf3ffb8cc1e6b14e9e4fab46173aa79f981/termcolor-1.1.0.tar.gz
https://pypi.python.org/packages/8a/48/a76be51647d0eb9f10e2a4511bf3ffb8cc1e6b14e9e4fab46173aa79f981/termcolor-1.1.0.tar.gz
https://mirror.bazel.build/github.com/abseil/abseil-py/archive/pypi-v0.2.2.tar.gz
https://github.com/abseil/abseil-py/archive/pypi-v0.2.2.tar.gz
https://mirror.bazel.build/pypi.python.org/packages/bc/cc/3cdb0a02e7e96f6c70bd971bc8a90b8463fda83e264fa9c5c1c98ceabd81/backports.weakref-1.0rc1.tar.gz
https://pypi.python.org/packages/bc/cc/3cdb0a02e7e96f6c70bd971bc8a90b8463fda83e264fa9c5c1c98ceabd81/backports.weakref-1.0rc1.tar.gz
https://mirror.bazel.build/docs.python.org/2.7/_sources/license.txt
https://docs.python.org/2.7/_sources/license.txt
https://mirror.bazel.build/github.com/google/protobuf/archive/v3.6.0.tar.gz
https://github.com/google/protobuf/archive/v3.6.0.tar.gz
https://mirror.bazel.build/github.com/google/protobuf/archive/v3.6.0.tar.gz
https://github.com/google/protobuf/archive/v3.6.0.tar.gz
https://mirror.bazel.build/github.com/google/protobuf/archive/v3.6.0.tar.gz
https://github.com/google/protobuf/archive/v3.6.0.tar.gz
https://mirror.bazel.build/github.com/google/nsync/archive/1.20.0.tar.gz
https://github.com/google/nsync/archive/1.20.0.tar.gz
https://mirror.bazel.build/github.com/google/googletest/archive/9816b96a6ddc0430671693df90192bbee57108b6.zip
https://github.com/google/googletest/archive/9816b96a6ddc0430671693df90192bbee57108b6.zip
https://mirror.bazel.build/github.com/gflags/gflags/archive/v2.2.1.tar.gz
https://github.com/gflags/gflags/archive/v2.2.1.tar.gz
https://mirror.bazel.build/ftp.exim.org/pub/pcre/pcre-8.42.tar.gz
http://ftp.exim.org/pub/pcre/pcre-8.42.tar.gz
https://mirror.bazel.build/ufpr.dl.sourceforge.net/project/swig/swig/swig-3.0.8/swig-3.0.8.tar.gz
http://ufpr.dl.sourceforge.net/project/swig/swig/swig-3.0.8/swig-3.0.8.tar.gz
http://pilotfiber.dl.sourceforge.net/project/swig/swig/swig-3.0.8/swig-3.0.8.tar.gz
https://mirror.bazel.build/curl.haxx.se/download/curl-7.60.0.tar.gz
https://curl.haxx.se/download/curl-7.60.0.tar.gz
https://mirror.bazel.build/github.com/grpc/grpc/archive/v1.13.0.tar.gz
https://github.com/grpc/grpc/archive/v1.13.0.tar.gz
https://mirror.bazel.build/github.com/antirez/linenoise/archive/c894b9e59f02203dbe4e2be657572cf88c4230c3.tar.gz
https://github.com/antirez/linenoise/archive/c894b9e59f02203dbe4e2be657572cf88c4230c3.tar.gz
https://mirror.bazel.build/github.com/llvm-mirror/llvm/archive/bd8c8d759852871609ba2e4e79868420f751949d.tar.gz
https://github.com/llvm-mirror/llvm/archive/bd8c8d759852871609ba2e4e79868420f751949d.tar.gz
https://mirror.bazel.build/github.com/LMDB/lmdb/archive/LMDB_0.9.22.tar.gz
https://github.com/LMDB/lmdb/archive/LMDB_0.9.22.tar.gz
https://mirror.bazel.build/github.com/open-source-parsers/jsoncpp/archive/1.8.4.tar.gz
https://github.com/open-source-parsers/jsoncpp/archive/1.8.4.tar.gz
https://mirror.bazel.build/github.com/google/boringssl/archive/a0fb951d2a26a8ee746b52f3ba81ab011a0af778.tar.gz
https://github.com/google/boringssl/archive/a0fb951d2a26a8ee746b52f3ba81ab011a0af778.tar.gz
https://mirror.bazel.build/zlib.net/zlib-1.2.11.tar.gz
https://zlib.net/zlib-1.2.11.tar.gz
https://mirror.bazel.build/www.kurims.kyoto-u.ac.jp/~ooura/fft.tgz
http://www.kurims.kyoto-u.ac.jp/~ooura/fft.tgz
https://mirror.bazel.build/github.com/google/snappy/archive/1.1.7.tar.gz
https://github.com/google/snappy/archive/1.1.7.tar.gz
https://mirror.bazel.build/github.com/nvidia/nccl/archive/03d856977ecbaac87e598c0c4bafca96761b9ac7.tar.gz
https://github.com/nvidia/nccl/archive/03d856977ecbaac87e598c0c4bafca96761b9ac7.tar.gz
https://mirror.bazel.build/github.com/edenhill/librdkafka/archive/v0.11.4.tar.gz
https://github.com/edenhill/librdkafka/archive/v0.11.4.tar.gz
https://mirror.bazel.build/github.com/aws/aws-sdk-cpp/archive/1.3.15.tar.gz
https://github.com/aws/aws-sdk-cpp/archive/1.3.15.tar.gz
https://mirror.bazel.build/repo1.maven.org/maven2/junit/junit/4.12/junit-4.12.jar
http://repo1.maven.org/maven2/junit/junit/4.12/junit-4.12.jar
http://maven.ibiblio.org/maven2/junit/junit/4.12/junit-4.12.jar
https://mirror.bazel.build/repo1.maven.org/maven2/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar
http://repo1.maven.org/maven2/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar
http://maven.ibiblio.org/maven2/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar
https://mirror.bazel.build/github.com/jemalloc/jemalloc/archive/4.4.0.tar.gz
https://github.com/jemalloc/jemalloc/archive/4.4.0.tar.gz
http://mirror.bazel.build/repo1.maven.org/maven2/com/google/testing/compile/compile-testing/0.11/compile-testing-0.11.jar
http://repo1.maven.org/maven2/com/google/testing/compile/compile-testing/0.11/compile-testing-0.11.jar
http://mirror.bazel.build/repo1.maven.org/maven2/com/google/truth/truth/0.32/truth-0.32.jar
http://repo1.maven.org/maven2/com/google/truth/truth/0.32/truth-0.32.jar
http://mirror.bazel.build/repo1.maven.org/maven2/org/checkerframework/checker-qual/2.4.0/checker-qual-2.4.0.jar
http://repo1.maven.org/maven2/org/checkerframework/checker-qual/2.4.0/checker-qual-2.4.0.jar
http://mirror.bazel.build/repo1.maven.org/maven2/com/squareup/javapoet/1.9.0/javapoet-1.9.0.jar
http://repo1.maven.org/maven2/com/squareup/javapoet/1.9.0/javapoet-1.9.0.jar
https://mirror.bazel.build/github.com/google/pprof/archive/c0fb62ec88c411cc91194465e54db2632845b650.tar.gz
https://github.com/google/pprof/archive/c0fb62ec88c411cc91194465e54db2632845b650.tar.gz
https://mirror.bazel.build/github.com/NVlabs/cub/archive/1.8.0.zip
https://github.com/NVlabs/cub/archive/1.8.0.zip
https://mirror.bazel.build/github.com/cython/cython/archive/0.28.4.tar.gz
https://github.com/cython/cython/archive/0.28.4.tar.gz
https://mirror.bazel.build/github.com/bazelbuild/bazel-toolchains/archive/37acf1841ab1475c98a152cb9e446460c8ae29e1.tar.gz
https://github.com/bazelbuild/bazel-toolchains/archive/37acf1841ab1475c98a152cb9e446460c8ae29e1.tar.gz
https://mirror.bazel.build/github.com/intel/ARM_NEON_2_x86_SSE/archive/0f77d9d182265259b135dad949230ecbf1a2633d.tar.gz
https://github.com/intel/ARM_NEON_2_x86_SSE/archive/0f77d9d182265259b135dad949230ecbf1a2633d.tar.gz
https://mirror.bazel.build/github.com/google/flatbuffers/archive/v1.9.0.tar.gz
https://github.com/google/flatbuffers/archive/v1.9.0.tar.gz
https://github.com/google/double-conversion/archive/3992066a95b823efc8ccc1baf82a1cfc73f6e9b8.zip
https://mirror.bazel.build/storage.googleapis.com/download.tensorflow.org/models/tflite/mobilenet_v1_224_android_quant_2017_11_08.zip
https://storage.googleapis.com/download.tensorflow.org/models/tflite/mobilenet_v1_224_android_quant_2017_11_08.zip
https://mirror.bazel.build/storage.googleapis.com/download.tensorflow.org/models/tflite/mobilenet_ssd_tflite_v1.zip
https://storage.googleapis.com/download.tensorflow.org/models/tflite/mobilenet_ssd_tflite_v1.zip
https://mirror.bazel.build/storage.googleapis.com/download.tensorflow.org/models/tflite/coco_ssd_mobilenet_v1_0.75_quant_2018_06_29.zip
https://storage.googleapis.com/download.tensorflow.org/models/tflite/coco_ssd_mobilenet_v1_0.75_quant_2018_06_29.zip
https://mirror.bazel.build/storage.googleapis.com/download.tensorflow.org/models/tflite/conv_actions_tflite.zip
https://storage.googleapis.com/download.tensorflow.org/models/tflite/conv_actions_tflite.zip
https://mirror.bazel.build/storage.googleapis.com/download.tensorflow.org/models/tflite/smartreply_1.0_2017_11_01.zip
https://storage.googleapis.com/download.tensorflow.org/models/tflite/smartreply_1.0_2017_11_01.zip
https://mirror.bazel.build/storage.googleapis.com/download.tensorflow.org/data/ovic.zip
https://storage.googleapis.com/download.tensorflow.org/data/ovic.zip
https://mirror.bazel.build/github.com/bazelbuild/rules_android/archive/v0.1.1.zip
https://github.com/bazelbuild/rules_android/archive/v0.1.1.zip

python脚本下载

##########实验################
url = "https://github.com/bazelbuild/rules_android/archive/v0.1.1.zip"
import  re
r = re.split(r'/', url)
['https:', '', 'github.com', 'bazelbuild', 'rules_android', 'archive', 'v0.1.1.zip']

print(r[-1])
v0.1.1.zip
##########去换行符号#############
#!/bin/env  python3
import re
#read txt method three
f2 = open("/home/ap/xxxx/txt.tt","r")
lines = f2.readlines()
for line3 in lines:
    r = re.split(r'/', line3.replace("
", ""))
    print(r[-1])
#################################

#####完整版下载###########
#!/bin/env  python3
import re
import os
#read txt method three
path = "/home/ap/xxxx/tensdownload/"
f2 = open("/home/ap/xxxx/txt.tt","r")
lines = f2.readlines()
for line3 in lines:
    r = re.split(r'/', line3.replace("
", ""))
    # print(r[-1])
    if  os.path.exists(path + r[-1]):
         continue
    else:
         os.system("wget " + line3.replace("
", ""))


搭建http服务器

作为文件下载站点,并更改tensorflow WORKSPACE tensorflow/workspace.bzl 内的下载链接地址

wget http://repo.okay.com.mx/centos/7/x86_64/release//httpd-2.4.35-5.el7.x86_64.rpm
rpm  -ivh  httpd-2.4.35-5.el7.x86_64.rpm 
warning: httpd-2.4.35-5.el7.x86_64.rpm: Header V4 RSA/SHA256 Signature, key ID ac25decd: NOKEY
error: Failed dependencies:
        /etc/mime.types is needed by httpd-2.4.35-5.el7.x86_64
        httpd-tools = 2.4.35-5.el7 is needed by httpd-2.4.35-5.el7.x86_64
        httpd-filesystem = 2.4.35-5.el7 is needed by httpd-2.4.35-5.el7.x86_64
        apr15 is needed by httpd-2.4.35-5.el7.x86_64
        libapr-1.so.0()(64bit) is needed by httpd-2.4.35-5.el7.x86_64
        libaprutil-1.so.0()(64bit) is needed by httpd-2.4.35-5.el7.x86_64
        libnghttp2.so.14()(64bit) is needed by httpd-2.4.35-5.el7.x86_64


###
下载所有依赖
################无用
yum install yum-utils
yumdownloader --resolve httpd   #默认下载到当前目录下
 ll
total 3120
-rw-r--r-- 1 root root  105968 Aug 22 21:20 apr-1.4.8-5.el7.x86_64.rpm
-rw-r--r-- 1 root root   94132 Jul  4  2014 apr-util-1.5.2-6.el7.x86_64.rpm
-rw-r--r-- 1 root root 2844388 Aug 22 21:25 httpd-2.4.6-90.el7.centos.x86_64.rpm
-rw-r--r-- 1 root root   92944 Aug 22 21:25 httpd-tools-2.4.6-90.el7.centos.x86_64.rpm
-rw-r--r-- 1 root root   31264 Jul  4  2014 mailcap-2.1.41-2.el7.noarch.rpm

###########################
使用nginx 作为文件服务器
 server {
        listen       80 default_server;
        listen       [::]:80 default_server;
        server_name  _;
        root         /usr/share/nginx/html;
        # Load configuration files for the default server block.
        include /etc/nginx/default.d/*.conf;

        location / {
        }

        ##文件服务器配置
        ### /home/ap/xxxx 目录必须配置为nginx用户为属主和属组,其目录下必须有/httpddownload  该目录下必须有文件
        location /httpddownload {
        root  /home/ap/xxxx/;
        autoindex on;
        }
        ###################### 文件服务器配置结束
        error_page 404 /404.html;
            location = /40x.html {
        }

        error_page 500 502 503 504 /50x.html;
            location = /50x.html {
        }
    }

tensorflow 编译需要的依赖


##地址需要替换

http://128.196.124.193/httpddownload/

#########WORKSPACE#########################
workspace(name = "org_tensorflow")

http_archive(
    name = "io_bazel_rules_closure",
    sha256 = "a38539c5b5c358548e75b44141b4ab637bba7c4dc02b46b1f62a96d6433f56ae",
    strip_prefix = "rules_closure-dbb96841cc0a5fb2664c37822803b06dab20c7d1",
    urls = [
        "https://mirror.bazel.build/github.com/bazelbuild/rules_closure/archive/dbb96841cc0a5fb2664c37822803b06dab20c7d1.tar.gz",
        "http://128.196.124.193/httpddownload/dbb96841cc0a5fb2664c37822803b06dab20c7d1.tar.gz",  # 2018-04-13
    ],
)

load("@io_bazel_rules_closure//closure:defs.bzl", "closure_repositories")

closure_repositories()

# We must check the bazel version before trying to parse any other BUILD
# files, in case the parsing of those build files depends on the bazel
# version we require here.
load("//tensorflow:version_check.bzl", "check_bazel_version_at_least")
check_bazel_version_at_least("0.15.0")

load("//tensorflow:workspace.bzl", "tf_workspace")

load("//third_party/android:android_configure.bzl", "android_configure")
android_configure(name="local_config_android")
load("@local_config_android//:android.bzl", "android_workspace")
android_workspace()

# Please add all new TensorFlow dependencies in workspace.bzl.
tf_workspace()

new_http_archive(
    name = "inception_v1",
    build_file = "models.BUILD",
    sha256 = "7efe12a8363f09bc24d7b7a450304a15655a57a7751929b2c1593a71183bb105",
    urls = [
        "http://storage.googleapis.com/download.tensorflow.org/models/inception_v1.zip",
        "http://128.196.124.193/httpddownload/inception_v1.zip",
    ],
)

new_http_archive(
    name = "mobile_ssd",
    build_file = "models.BUILD",
    sha256 = "bddd81ea5c80a97adfac1c9f770e6f55cbafd7cce4d3bbe15fbeb041e6b8f3e8",
    urls = [
        "http://storage.googleapis.com/download.tensorflow.org/models/object_detection/ssd_mobilenet_v1_android_export.zip",
        "http://128.196.124.193/httpddownload/ssd_mobilenet_v1_android_export.zip",
    ],
)

new_http_archive(
    name = "mobile_multibox",
    build_file = "models.BUILD",
    sha256 = "859edcddf84dddb974c36c36cfc1f74555148e9c9213dedacf1d6b613ad52b96",
    urls = [
        "http://storage.googleapis.com/download.tensorflow.org/models/mobile_multibox_v1a.zip",
        "http://128.196.124.193/httpddownload/mobile_multibox_v1a.zip",
    ],
)

new_http_archive(
    name = "stylize",
    build_file = "models.BUILD",
    sha256 = "3d374a730aef330424a356a8d4f04d8a54277c425e274ecb7d9c83aa912c6bfa",
    urls = [
        "http://storage.googleapis.com/download.tensorflow.org/models/stylize_v1.zip",
        "http://128.196.124.193/httpddownload/stylize_v1.zip",
    ],
)

new_http_archive(
    name = "speech_commands",
    build_file = "models.BUILD",
    sha256 = "c3ec4fea3158eb111f1d932336351edfe8bd515bb6e87aad4f25dbad0a600d0c",
    urls = [
        "http://storage.googleapis.com/download.tensorflow.org/models/speech_commands_v0.01.zip",
        "http://128.196.124.193/httpddownload/speech_commands_v0.01.zip",
    ],
)


################cat  tensorflow/workspace.bzl ######
# TensorFlow external dependencies that can be loaded in WORKSPACE files.

load("//third_party/gpus:cuda_configure.bzl", "cuda_configure")
load("//third_party/tensorrt:tensorrt_configure.bzl", "tensorrt_configure")
load("//third_party:nccl/nccl_configure.bzl", "nccl_configure")
load("//third_party/mkl:build_defs.bzl", "mkl_repository")
load("//third_party/git:git_configure.bzl", "git_configure")
load("//third_party/py:python_configure.bzl", "python_configure")

load("//third_party/sycl:sycl_configure.bzl", "sycl_configure")
load("//third_party/systemlibs:syslibs_configure.bzl", "syslibs_configure")
load("//third_party/toolchains/clang6:repo.bzl", "clang6_configure")
load("//third_party/toolchains/cpus/arm:arm_compiler_configure.bzl", "arm_compiler_configure")
load("//third_party:repo.bzl", "tf_http_archive")
load("//third_party/clang_toolchain:cc_configure_clang.bzl", "cc_download_clang_toolchain")
load("@io_bazel_rules_closure//closure/private:java_import_external.bzl", "java_import_external")
load("@io_bazel_rules_closure//closure:defs.bzl", "filegroup_external")
load("//tensorflow/tools/def_file_filter:def_file_filter_configure.bzl",
     "def_file_filter_configure")


# Sanitize a dependency so that it works correctly from code that includes
# TensorFlow as a submodule.
def clean_dep(dep):
  return str(Label(dep))

# If TensorFlow is linked as a submodule.
# path_prefix is no longer used.
# tf_repo_name is thought to be under consideration.
def tf_workspace(path_prefix="", tf_repo_name=""):
  # Note that we check the minimum bazel version in WORKSPACE.
  clang6_configure(name="local_config_clang6")
  cc_download_clang_toolchain(name="local_config_download_clang")
  cuda_configure(name="local_config_cuda")
  tensorrt_configure(name="local_config_tensorrt")
  nccl_configure(name="local_config_nccl")
  git_configure(name="local_config_git")
  sycl_configure(name="local_config_sycl")
  syslibs_configure(name="local_config_syslibs")
  python_configure(name="local_config_python")

  # For windows bazel build
  # TODO: Remove def file filter when TensorFlow can export symbols properly on Windows.
  def_file_filter_configure(name = "local_config_def_file_filter")

  # Point //external/local_config_arm_compiler to //external/arm_compiler
  arm_compiler_configure(
      name="local_config_arm_compiler",
      remote_config_repo="../arm_compiler",
      build_file = clean_dep("//third_party/toolchains/cpus/arm:BUILD"))

  mkl_repository(
      name = "mkl_linux",
      urls = [
          "https://mirror.bazel.build/github.com/intel/mkl-dnn/releases/download/v0.14/mklml_lnx_2018.0.3.20180406.tgz",
          "https://github.com/intel/mkl-dnn/releases/download/v0.14/mklml_lnx_2018.0.3.20180406.tgz"
      ],
      sha256 = "d2305244fdc9b87db7426ed4496e87a4b3977ad3374d73b8000e8b7a5b7aa725",
      strip_prefix = "mklml_lnx_2018.0.3.20180406",
      build_file = clean_dep("//third_party/mkl:mkl.BUILD")
  )
  mkl_repository(
      name = "mkl_windows",
      urls = [
          "https://mirror.bazel.build/github.com/intel/mkl-dnn/releases/download/v0.14/mklml_win_2018.0.3.20180406.zip",
          "https://github.com/intel/mkl-dnn/releases/download/v0.14/mklml_win_2018.0.3.20180406.zip"
      ],
      sha256 = "a584a5bf1c8d2ad70b90d12b52652030e9a338217719064fdb84b7ad0d693694",
      strip_prefix = "mklml_win_2018.0.3.20180406",
      build_file = clean_dep("//third_party/mkl:mkl.BUILD")
  )
  mkl_repository(
      name = "mkl_darwin",
      urls = [
          "https://mirror.bazel.build/github.com/intel/mkl-dnn/releases/download/v0.14/mklml_mac_2018.0.3.20180406.tgz",
          "https://github.com/intel/mkl-dnn/releases/download/v0.14/mklml_mac_2018.0.3.20180406.tgz"
      ],
      sha256 = "094e3dfd61c816136dc8d12a45cc611ce26c5f4828176a3644cd0b0efa15a25b",
      strip_prefix = "mklml_mac_2018.0.3.20180406",
      build_file = clean_dep("//third_party/mkl:mkl.BUILD")
  )

  if path_prefix:
    print("path_prefix was specified to tf_workspace but is no longer used " +
          "and will be removed in the future.")

  tf_http_archive(
      name = "mkl_dnn",
      urls = [
          "https://mirror.bazel.build/github.com/intel/mkl-dnn/archive/v0.14.tar.gz",
          "https://github.com/intel/mkl-dnn/archive/v0.14.tar.gz",
      ],
      sha256 = "efebc53882856afec86457a2da644693f5d59c68772d41d640d6b60a8efc4eb0",
      strip_prefix = "mkl-dnn-0.14",
      build_file = clean_dep("//third_party/mkl_dnn:mkldnn.BUILD"),
  )

  tf_http_archive(
      name = "com_google_absl",
      urls = [
          "https://mirror.bazel.build/github.com/abseil/abseil-cpp/archive/9613678332c976568272c8f4a78631a29159271d.tar.gz",
          "http://128.196.124.193/httpddownload/9613678332c976568272c8f4a78631a29159271d.tar.gz",
      ],
     sha256 = "1273a1434ced93bc3e703a48c5dced058c95e995c8c009e9bdcb24a69e2180e9",
     strip_prefix = "abseil-cpp-9613678332c976568272c8f4a78631a29159271d",
     build_file = clean_dep("//third_party:com_google_absl.BUILD"),
  )

  tf_http_archive(
      name = "eigen_archive",
      urls = [
          "https://mirror.bazel.build/bitbucket.org/eigen/eigen/get/fd6845384b86.tar.gz",
          "http://128.196.124.193/httpddownload/fd6845384b86.tar.gz",
      ],
      sha256 = "d956415d784fa4e42b6a2a45c32556d6aec9d0a3d8ef48baee2522ab762556a9",
      strip_prefix = "eigen-eigen-fd6845384b86",
      build_file = clean_dep("//third_party:eigen.BUILD"),
  )

  tf_http_archive(
      name = "arm_compiler",
      sha256 = "970285762565c7890c6c087d262b0a18286e7d0384f13a37786d8521773bc969",
      strip_prefix = "tools-0e906ebc527eab1cdbf7adabff5b474da9562e9f/arm-bcm2708/arm-rpi-4.9.3-linux-gnueabihf",
      urls = [
          "https://mirror.bazel.build/github.com/raspberrypi/tools/archive/0e906ebc527eab1cdbf7adabff5b474da9562e9f.tar.gz",
          # Please uncomment me, when the next upgrade happens. Then
          # remove the whitelist entry in third_party/repo.bzl.
          # "https://github.com/raspberrypi/tools/archive/0e906ebc527eab1cdbf7adabff5b474da9562e9f.tar.gz",
      ],
      build_file = clean_dep("//:arm_compiler.BUILD"),
  )

  tf_http_archive(
      name = "libxsmm_archive",
      urls = [
          "https://mirror.bazel.build/github.com/hfp/libxsmm/archive/1.9.tar.gz",
          "http://128.196.124.193/httpddownload/1.9.tar.gz",
      ],
      sha256 = "cd8532021352b4a0290d209f7f9bfd7c2411e08286a893af3577a43457287bfa",
      strip_prefix = "libxsmm-1.9",
      build_file = clean_dep("//third_party:libxsmm.BUILD"),
  )

  tf_http_archive(
      name = "ortools_archive",
      urls = [
          "http://128.196.124.193/httpddownload/253f7955c6a1fd805408fba2e42ac6d45b312d15.tar.gz",
          # Please uncomment me, when the next upgrade happens. Then
          # remove the whitelist entry in third_party/repo.bzl.
          # "https://github.com/google/or-tools/archive/253f7955c6a1fd805408fba2e42ac6d45b312d15.tar.gz",
      ],
      sha256 = "932075525642b04ac6f1b50589f1df5cd72ec2f448b721fd32234cf183f0e755",
      strip_prefix = "or-tools-253f7955c6a1fd805408fba2e42ac6d45b312d15/src",
      build_file = clean_dep("//third_party:ortools.BUILD"),
  )

  tf_http_archive(
      name = "com_googlesource_code_re2",
      urls = [
          "https://mirror.bazel.build/github.com/google/re2/archive/2018-04-01.tar.gz",
          "http://128.196.124.193/httpddownload/2018-04-01.tar.gz",

      ],
      sha256 = "2f945446b71336e7f5a2bcace1abcf0b23fbba368266c6a1be33de3de3b3c912",
      strip_prefix = "re2-2018-04-01",
      system_build_file = clean_dep("//third_party/systemlibs:re2.BUILD"),
  )

  tf_http_archive(
      name = "com_github_googlecloudplatform_google_cloud_cpp",
      urls = [
          "https://mirror.bazel.build/github.com/GoogleCloudPlatform/google-cloud-cpp/archive/f875700a023bdd706333cde45aee8758b272c357.tar.gz",
          "http://128.196.124.193/httpddownload/f875700a023bdd706333cde45aee8758b272c357.tar.gz",
      ],
      sha256 = "a34f3c50b237686dc870b13baaa6a5836ce3473f2f2a02717299f0ff318372db",
      strip_prefix = "google-cloud-cpp-f875700a023bdd706333cde45aee8758b272c357",
  )

  tf_http_archive(
      name = "com_github_googleapis_googleapis",
      urls = [
          "https://mirror.bazel.build/github.com/googleapis/googleapis/archive/f81082ea1e2f85c43649bee26e0d9871d4b41cdb.zip",
          "http://128.196.124.193/httpddownload/f81082ea1e2f85c43649bee26e0d9871d4b41cdb.zip",
      ],
      sha256 = "824870d87a176f26bcef663e92051f532fac756d1a06b404055dc078425f4378",
      strip_prefix="googleapis-f81082ea1e2f85c43649bee26e0d9871d4b41cdb",
      build_file = clean_dep("//third_party:googleapis.BUILD"),
  )

  tf_http_archive(
      name = "gemmlowp",
      urls = [
          "https://mirror.bazel.build/github.com/google/gemmlowp/archive/38ebac7b059e84692f53e5938f97a9943c120d98.zip",
          "http://128.196.124.193/httpddownload/38ebac7b059e84692f53e5938f97a9943c120d98.zip",
      ],
      sha256 = "b87faa7294dfcc5d678f22a59d2c01ca94ea1e2a3b488c38a95a67889ed0a658",
      strip_prefix = "gemmlowp-38ebac7b059e84692f53e5938f97a9943c120d98",
  )

  tf_http_archive(
      name = "farmhash_archive",
      urls = [
          "https://mirror.bazel.build/github.com/google/farmhash/archive/816a4ae622e964763ca0862d9dbd19324a1eaf45.tar.gz",
          "http://128.196.124.193/httpddownload/816a4ae622e964763ca0862d9dbd19324a1eaf45.tar.gz",
      ],
      sha256 = "6560547c63e4af82b0f202cb710ceabb3f21347a4b996db565a411da5b17aba0",
      strip_prefix = "farmhash-816a4ae622e964763ca0862d9dbd19324a1eaf45",
      build_file = clean_dep("//third_party:farmhash.BUILD"),
  )

  tf_http_archive(
      name = "highwayhash",
      urls = [
          "http://mirror.bazel.build/github.com/google/highwayhash/archive/fd3d9af80465e4383162e4a7c5e2f406e82dd968.tar.gz",
          "http://128.196.124.193/httpddownload/fd3d9af80465e4383162e4a7c5e2f406e82dd968.tar.gz",
      ],
      sha256 = "9c3e0e87d581feeb0c18d814d98f170ff23e62967a2bd6855847f0b2fe598a37",
      strip_prefix = "highwayhash-fd3d9af80465e4383162e4a7c5e2f406e82dd968",
      build_file = clean_dep("//third_party:highwayhash.BUILD"),
  )

  tf_http_archive(
      name = "nasm",
      urls = [
          "https://mirror.bazel.build/www.nasm.us/pub/nasm/releasebuilds/2.13.03/nasm-2.13.03.tar.bz2",
          "http://pkgs.fedoraproject.org/repo/pkgs/nasm/nasm-2.13.03.tar.bz2/sha512/d7a6b4cee8dfd603d8d4c976e5287b5cc542fa0b466ff989b743276a6e28114e64289bf02a7819eca63142a5278aa6eed57773007e5f589e15768e6456a8919d/nasm-2.13.03.tar.bz2",
          "http://128.196.124.193/httpddownload/nasm-2.13.03.tar.bz2",
      ],
      sha256 = "63ec86477ad3f0f6292325fd89e1d93aea2e2fd490070863f17d48f7cd387011",
      strip_prefix = "nasm-2.13.03",
      build_file = clean_dep("//third_party:nasm.BUILD"),
      system_build_file = clean_dep("//third_party/systemlibs:nasm.BUILD"),
  )

  tf_http_archive(
      name = "jpeg",
      urls = [
          "https://mirror.bazel.build/github.com/libjpeg-turbo/libjpeg-turbo/archive/1.5.3.tar.gz",
          "http://128.196.124.193/httpddownload/1.5.3.tar.gz",
      ],
      sha256 = "1a17020f859cb12711175a67eab5c71fc1904e04b587046218e36106e07eabde",
      strip_prefix = "libjpeg-turbo-1.5.3",
      build_file = clean_dep("//third_party/jpeg:jpeg.BUILD"),
      system_build_file = clean_dep("//third_party/systemlibs:jpeg.BUILD"),
  )

  tf_http_archive(
      name = "png_archive",
      urls = [
          "https://mirror.bazel.build/github.com/glennrp/libpng/archive/v1.6.34.tar.gz",
          "http://128.196.124.193/httpddownload/v1.6.34.tar.gz",
      ],
      sha256 = "e45ce5f68b1d80e2cb9a2b601605b374bdf51e1798ef1c2c2bd62131dfcf9eef",
      strip_prefix = "libpng-1.6.34",
      build_file = clean_dep("//third_party:png.BUILD"),
      patch_file = clean_dep("//third_party:png_fix_rpi.patch"),
      system_build_file = clean_dep("//third_party/systemlibs:png.BUILD"),
  )

  tf_http_archive(
      name = "org_sqlite",
      urls = [
          "https://mirror.bazel.build/www.sqlite.org/2018/sqlite-amalgamation-3240000.zip",
          "http://128.196.124.193/httpddownload/sqlite-amalgamation-3240000.zip",
      ],
      sha256 = "ad68c1216c3a474cf360c7581a4001e952515b3649342100f2d7ca7c8e313da6",
      strip_prefix = "sqlite-amalgamation-3240000",
      build_file = clean_dep("//third_party:sqlite.BUILD"),
      system_build_file = clean_dep("//third_party/systemlibs:sqlite.BUILD"),
  )

  tf_http_archive(
      name = "gif_archive",
      urls = [
          "https://mirror.bazel.build/ufpr.dl.sourceforge.net/project/giflib/giflib-5.1.4.tar.gz",
          "http://128.196.124.193/httpddownload/giflib-5.1.4.tar.gz",
      ],
      sha256 = "34a7377ba834397db019e8eb122e551a49c98f49df75ec3fcc92b9a794a4f6d1",
      strip_prefix = "giflib-5.1.4",
      build_file = clean_dep("//third_party:gif.BUILD"),
      system_build_file = clean_dep("//third_party/systemlibs:gif.BUILD"),
  )

  tf_http_archive(
      name = "six_archive",
      urls = [
          "https://mirror.bazel.build/pypi.python.org/packages/source/s/six/six-1.10.0.tar.gz",
          "http://128.196.124.193/httpddownload/six-1.10.0.tar.gz",
      ],
      sha256 = "105f8d68616f8248e24bf0e9372ef04d3cc10104f1980f54d57b2ce73a5ad56a",
      strip_prefix = "six-1.10.0",
      build_file = clean_dep("//third_party:six.BUILD"),
      system_build_file = clean_dep("//third_party/systemlibs:six.BUILD"),
  )

  tf_http_archive(
      name = "astor_archive",
      urls = [
          "https://mirror.bazel.build/pypi.python.org/packages/d8/be/c4276b3199ec3feee2a88bc64810fbea8f26d961e0a4cd9c68387a9f35de/astor-0.6.2.tar.gz",
          "http://128.196.124.193/httpddownload/astor-0.6.2.tar.gz",
      ],
      sha256 = "ff6d2e2962d834acb125cc4dcc80c54a8c17c253f4cc9d9c43b5102a560bb75d",
      strip_prefix = "astor-0.6.2",
      build_file = clean_dep("//third_party:astor.BUILD"),
      system_build_file = clean_dep("//third_party/systemlibs:astor.BUILD"),
  )

  tf_http_archive(
      name = "gast_archive",
      urls = [
          "https://mirror.bazel.build/pypi.python.org/packages/5c/78/ff794fcae2ce8aa6323e789d1f8b3b7765f601e7702726f430e814822b96/gast-0.2.0.tar.gz",
          "http://128.196.124.193/httpddownload/gast-0.2.0.tar.gz",
      ],
      sha256 = "7068908321ecd2774f145193c4b34a11305bd104b4551b09273dfd1d6a374930",
      strip_prefix = "gast-0.2.0",
      build_file = clean_dep("//third_party:gast.BUILD"),
  )

  tf_http_archive(
      name = "termcolor_archive",
      urls = [
          "https://mirror.bazel.build/pypi.python.org/packages/8a/48/a76be51647d0eb9f10e2a4511bf3ffb8cc1e6b14e9e4fab46173aa79f981/termcolor-1.1.0.tar.gz",
          "http://128.196.124.193/httpddownload/termcolor-1.1.0.tar.gz",
      ],
      sha256 = "1d6d69ce66211143803fbc56652b41d73b4a400a2891d7bf7a1cdf4c02de613b",
      strip_prefix = "termcolor-1.1.0",
      build_file = clean_dep("//third_party:termcolor.BUILD"),
      system_build_file = clean_dep("//third_party/systemlibs:termcolor.BUILD"),
  )

  tf_http_archive(
      name = "absl_py",
      urls = [
          "https://mirror.bazel.build/github.com/abseil/abseil-py/archive/pypi-v0.2.2.tar.gz",
          "http://128.196.124.193/httpddownload/pypi-v0.2.2.tar.gz",
      ],
      sha256 = "95160f778a62c7a60ddeadc7bf2d83f85a23a27359814aca12cf949e896fa82c",
      strip_prefix = "abseil-py-pypi-v0.2.2",
  )

  tf_http_archive(
      name = "org_python_pypi_backports_weakref",
      urls = [
          "https://mirror.bazel.build/pypi.python.org/packages/bc/cc/3cdb0a02e7e96f6c70bd971bc8a90b8463fda83e264fa9c5c1c98ceabd81/backports.weakref-1.0rc1.tar.gz",
          "http://128.196.124.193/httpddownload/backports.weakref-1.0rc1.tar.gz",
      ],
      sha256 = "8813bf712a66b3d8b85dc289e1104ed220f1878cf981e2fe756dfaabe9a82892",
      strip_prefix = "backports.weakref-1.0rc1/src",
      build_file = clean_dep("//third_party:backports_weakref.BUILD"),
  )

  filegroup_external(
      name = "org_python_license",
      licenses = ["notice"],  # Python 2.0
      sha256_urls = {
          "b5556e921715ddb9242c076cae3963f483aa47266c5e37ea4c187f77cc79501c": [
              "https://mirror.bazel.build/docs.python.org/2.7/_sources/license.txt",
              "http://128.196.124.193/httpddownload/license.txt",
          ],
      },
  )

  tf_http_archive(
      name = "protobuf_archive",
      urls = [
          "https://mirror.bazel.build/github.com/google/protobuf/archive/v3.6.0.tar.gz",
          "http://128.196.124.193/httpddownload/v3.6.0.tar.gz",
      ],
      sha256 = "50a5753995b3142627ac55cfd496cebc418a2e575ca0236e29033c67bd5665f4",
      strip_prefix = "protobuf-3.6.0",
  )

  # We need to import the protobuf library under the names com_google_protobuf
  # and com_google_protobuf_cc to enable proto_library support in bazel.
  # Unfortunately there is no way to alias http_archives at the moment.
  tf_http_archive(
      name = "com_google_protobuf",
      urls = [
          "https://mirror.bazel.build/github.com/google/protobuf/archive/v3.6.0.tar.gz",
          "http://128.196.124.193/httpddownload/v3.6.0.tar.gz",
      ],
      sha256 = "50a5753995b3142627ac55cfd496cebc418a2e575ca0236e29033c67bd5665f4",
      strip_prefix = "protobuf-3.6.0",
  )

  tf_http_archive(
      name = "com_google_protobuf_cc",
      urls = [
          "https://mirror.bazel.build/github.com/google/protobuf/archive/v3.6.0.tar.gz",
          "https://github.com/google/protobuf/archive/v3.6.0.tar.gz",
      ],
      sha256 = "50a5753995b3142627ac55cfd496cebc418a2e575ca0236e29033c67bd5665f4",
      strip_prefix = "protobuf-3.6.0",
  )

  tf_http_archive(
      name = "nsync",
      urls = [
          "https://mirror.bazel.build/github.com/google/nsync/archive/1.20.0.tar.gz",
          "http://128.196.124.193/httpddownload/1.20.0.tar.gz",
      ],
      sha256 = "0c1b03962b2f8450f21e74a5a46116bf2d6009a807c57eb4207e974a8c4bb7dd",
      strip_prefix = "nsync-1.20.0",
  )

  tf_http_archive(
      name = "com_google_googletest",
      urls = [
          "https://mirror.bazel.build/github.com/google/googletest/archive/9816b96a6ddc0430671693df90192bbee57108b6.zip",
          "http://128.196.124.193/httpddownload/9816b96a6ddc0430671693df90192bbee57108b6.zip",
      ],
      sha256 = "9cbca84c4256bed17df2c8f4d00c912c19d247c11c9ba6647cd6dd5b5c996b8d",
      strip_prefix = "googletest-9816b96a6ddc0430671693df90192bbee57108b6",
  )

  tf_http_archive(
      name = "com_github_gflags_gflags",
      urls = [
          "https://mirror.bazel.build/github.com/gflags/gflags/archive/v2.2.1.tar.gz",
          "http://128.196.124.193/httpddownload/v2.2.1.tar.gz",
      ],
      sha256 = "ae27cdbcd6a2f935baa78e4f21f675649271634c092b1be01469440495609d0e",
      strip_prefix = "gflags-2.2.1",
  )

  tf_http_archive(
      name = "pcre",
      sha256 = "69acbc2fbdefb955d42a4c606dfde800c2885711d2979e356c0636efde9ec3b5",
      urls = [
          "https://mirror.bazel.build/ftp.exim.org/pub/pcre/pcre-8.42.tar.gz",
          "http://128.196.124.193/httpddownload/pcre-8.42.tar.gz",
      ],
      strip_prefix = "pcre-8.42",
      build_file = clean_dep("//third_party:pcre.BUILD"),
      system_build_file = clean_dep("//third_party/systemlibs:pcre.BUILD"),
  )

  tf_http_archive(
      name = "swig",
      sha256 = "58a475dbbd4a4d7075e5fe86d4e54c9edde39847cdb96a3053d87cb64a23a453",
      urls = [
          "https://mirror.bazel.build/ufpr.dl.sourceforge.net/project/swig/swig/swig-3.0.8/swig-3.0.8.tar.gz",
          "http://128.196.124.193/httpddownload/swig-3.0.8.tar.gz",
          "http://pilotfiber.dl.sourceforge.net/project/swig/swig/swig-3.0.8/swig-3.0.8.tar.gz",
      ],
      strip_prefix = "swig-3.0.8",
      build_file = clean_dep("//third_party:swig.BUILD"),
      system_build_file = clean_dep("//third_party/systemlibs:swig.BUILD"),
  )

  tf_http_archive(
      name = "curl",
      sha256 = "e9c37986337743f37fd14fe8737f246e97aec94b39d1b71e8a5973f72a9fc4f5",
      urls = [
          "https://mirror.bazel.build/curl.haxx.se/download/curl-7.60.0.tar.gz",
          "http://128.196.124.193/httpddownload/curl-7.60.0.tar.gz",
      ],
      strip_prefix = "curl-7.60.0",
      build_file = clean_dep("//third_party:curl.BUILD"),
      system_build_file = clean_dep("//third_party/systemlibs:curl.BUILD"),
  )

  tf_http_archive(
      name = "grpc",
      urls = [
          "https://mirror.bazel.build/github.com/grpc/grpc/archive/v1.13.0.tar.gz",
          "http://128.196.124.193/httpddownload/v1.13.0.tar.gz",
      ],
      sha256 = "50db9cf2221354485eb7c3bd55a4c27190caef7048a2a1a15fbe60a498f98b44",
      strip_prefix = "grpc-1.13.0",
      system_build_file = clean_dep("//third_party/systemlibs:grpc.BUILD"),
  )

  tf_http_archive(
      name = "linenoise",
      sha256 = "7f51f45887a3d31b4ce4fa5965210a5e64637ceac12720cfce7954d6a2e812f7",
      urls = [
          "https://mirror.bazel.build/github.com/antirez/linenoise/archive/c894b9e59f02203dbe4e2be657572cf88c4230c3.tar.gz",
          "http://128.196.124.193/httpddownload/c894b9e59f02203dbe4e2be657572cf88c4230c3.tar.gz",
      ],
      strip_prefix = "linenoise-c894b9e59f02203dbe4e2be657572cf88c4230c3",
      build_file = clean_dep("//third_party:linenoise.BUILD"),
  )

  # TODO(phawkins): currently, this rule uses an unofficial LLVM mirror.
  # Switch to an official source of snapshots if/when possible.
  tf_http_archive(
      name = "llvm",
      urls = [
          "https://mirror.bazel.build/github.com/llvm-mirror/llvm/archive/bd8c8d759852871609ba2e4e79868420f751949d.tar.gz",
	  "http://128.196.124.193/httpddownload/bd8c8d759852871609ba2e4e79868420f751949d.tar.gz",
      ],
      sha256 = "0c63e8583b213543309e8577ffe87a0cf34cc22269630d2c5c2f0a2345fda4a8",
      strip_prefix = "llvm-bd8c8d759852871609ba2e4e79868420f751949d",
      build_file = clean_dep("//third_party/llvm:llvm.autogenerated.BUILD"),
  )

  tf_http_archive(
      name = "lmdb",
      urls = [
          "https://mirror.bazel.build/github.com/LMDB/lmdb/archive/LMDB_0.9.22.tar.gz",
          "http://128.196.124.193/httpddownload/LMDB_0.9.22.tar.gz",
      ],
      sha256 = "f3927859882eb608868c8c31586bb7eb84562a40a6bf5cc3e13b6b564641ea28",
      strip_prefix = "lmdb-LMDB_0.9.22/libraries/liblmdb",
      build_file = clean_dep("//third_party:lmdb.BUILD"),
      system_build_file = clean_dep("//third_party/systemlibs:lmdb.BUILD"),
  )

  tf_http_archive(
      name = "jsoncpp_git",
      urls = [
          "https://mirror.bazel.build/github.com/open-source-parsers/jsoncpp/archive/1.8.4.tar.gz",
          "http://128.196.124.193/httpddownload/1.8.4.tar.gz",
      ],
      sha256 = "c49deac9e0933bcb7044f08516861a2d560988540b23de2ac1ad443b219afdb6",
      strip_prefix = "jsoncpp-1.8.4",
      build_file = clean_dep("//third_party:jsoncpp.BUILD"),
      system_build_file = clean_dep("//third_party/systemlibs:jsoncpp.BUILD"),
  )

  tf_http_archive(
      name = "boringssl",
      urls = [
          "https://mirror.bazel.build/github.com/google/boringssl/archive/a0fb951d2a26a8ee746b52f3ba81ab011a0af778.tar.gz",
          "http://128.196.124.193/httpddownload/a0fb951d2a26a8ee746b52f3ba81ab011a0af778.tar.gz",
      ],
      sha256 = "524ba98a56300149696481b4cb9ddebd0c7b7ac9b9f6edee81da2d2d7e5d2bb3",
      strip_prefix = "boringssl-a0fb951d2a26a8ee746b52f3ba81ab011a0af778",
  )

  tf_http_archive(
      name = "zlib_archive",
      urls = [
          "https://mirror.bazel.build/zlib.net/zlib-1.2.11.tar.gz",
          "http://128.196.124.193/httpddownload/zlib-1.2.11.tar.gz",
      ],
      sha256 = "c3e5e9fdd5004dcb542feda5ee4f0ff0744628baf8ed2dd5d66f8ca1197cb1a1",
      strip_prefix = "zlib-1.2.11",
      build_file = clean_dep("//third_party:zlib.BUILD"),
      system_build_file = clean_dep("//third_party/systemlibs:zlib.BUILD"),
  )

  tf_http_archive(
      name = "fft2d",
      urls = [
          "https://mirror.bazel.build/www.kurims.kyoto-u.ac.jp/~ooura/fft.tgz",
          "http://128.196.124.193/httpddownload/fft.tgz",
      ],
      sha256 = "52bb637c70b971958ec79c9c8752b1df5ff0218a4db4510e60826e0cb79b5296",
      build_file = clean_dep("//third_party/fft2d:fft2d.BUILD"),
  )

  tf_http_archive(
      name = "snappy",
      urls = [
          "https://mirror.bazel.build/github.com/google/snappy/archive/1.1.7.tar.gz",
          "http://128.196.124.193/httpddownload/1.1.7.tar.gz",
      ],
      sha256 = "3dfa02e873ff51a11ee02b9ca391807f0c8ea0529a4924afa645fbf97163f9d4",
      strip_prefix = "snappy-1.1.7",
      build_file = clean_dep("//third_party:snappy.BUILD"),
      system_build_file = clean_dep("//third_party/systemlibs:snappy.BUILD"),
  )

  tf_http_archive(
      name = "nccl_archive",
      urls = [
          "https://mirror.bazel.build/github.com/nvidia/nccl/archive/03d856977ecbaac87e598c0c4bafca96761b9ac7.tar.gz",
          "http://128.196.124.193/httpddownload/03d856977ecbaac87e598c0c4bafca96761b9ac7.tar.gz",
      ],
      sha256 = "2ca86fb6179ecbff789cc67c836139c1bbc0324ed8c04643405a30bf26325176",
      strip_prefix = "nccl-03d856977ecbaac87e598c0c4bafca96761b9ac7",
      build_file = clean_dep("//third_party:nccl/nccl_archive.BUILD"),
  )

  tf_http_archive(
      name = "kafka",
      urls = [
          "https://mirror.bazel.build/github.com/edenhill/librdkafka/archive/v0.11.4.tar.gz",
          "http://128.196.124.193/httpddownload/v0.11.4.tar.gz",
      ],
      sha256 = "9d8f1eb7b0e29e9ab1168347c939cb7ae5dff00a39cef99e7ef033fd8f92737c",
      strip_prefix = "librdkafka-0.11.4",
      build_file = clean_dep("//third_party:kafka/BUILD"),
      patch_file = clean_dep("//third_party/kafka:config.patch"),
  )

  tf_http_archive(
      name = "aws",
      urls = [
          "https://mirror.bazel.build/github.com/aws/aws-sdk-cpp/archive/1.3.15.tar.gz",
          "http://128.196.124.193/httpddownload/1.3.15.tar.gz",
      ],
      sha256 = "b888d8ce5fc10254c3dd6c9020c7764dd53cf39cf011249d0b4deda895de1b7c",
      strip_prefix = "aws-sdk-cpp-1.3.15",
      build_file = clean_dep("//third_party:aws.BUILD"),
  )

  java_import_external(
      name = "junit",
      jar_sha256 = "59721f0805e223d84b90677887d9ff567dc534d7c502ca903c0c2b17f05c116a",
      jar_urls = [
          "https://mirror.bazel.build/repo1.maven.org/maven2/junit/junit/4.12/junit-4.12.jar",
          "http://128.196.124.193/httpddownload/junit-4.12.jar",
          "http://maven.ibiblio.org/maven2/junit/junit/4.12/junit-4.12.jar",
      ],
      licenses = ["reciprocal"],  # Common Public License Version 1.0
      testonly_ = True,
      deps = ["@org_hamcrest_core"],
  )

  java_import_external(
      name = "org_hamcrest_core",
      jar_sha256 = "66fdef91e9739348df7a096aa384a5685f4e875584cce89386a7a47251c4d8e9",
      jar_urls = [
          "https://mirror.bazel.build/repo1.maven.org/maven2/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar",
          "http://128.196.124.193/httpddownload/hamcrest-core-1.3.jar",
          "http://maven.ibiblio.org/maven2/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar",
      ],
      licenses = ["notice"],  # New BSD License
      testonly_ = True,
  )

  tf_http_archive(
      name = "jemalloc",
      urls = [
          "https://mirror.bazel.build/github.com/jemalloc/jemalloc/archive/4.4.0.tar.gz",
          "http://128.196.124.193/httpddownload/4.4.0.tar.gz",
      ],
      sha256 = "3c8f25c02e806c3ce0ab5fb7da1817f89fc9732709024e2a81b6b82f7cc792a8",
      strip_prefix = "jemalloc-4.4.0",
      build_file = clean_dep("//third_party:jemalloc.BUILD"),
      system_build_file = clean_dep("//third_party/systemlibs:jemalloc.BUILD"),
  )

  java_import_external(
      name = "com_google_testing_compile",
      jar_sha256 = "edc180fdcd9f740240da1a7a45673f46f59c5578d8cd3fbc912161f74b5aebb8",
      jar_urls = [
          "http://mirror.bazel.build/repo1.maven.org/maven2/com/google/testing/compile/compile-testing/0.11/compile-testing-0.11.jar",
          "http://128.196.124.193/httpddownload/compile-testing-0.11.jar",
      ],
      licenses = ["notice"],  # New BSD License
      testonly_ = True,
      deps = ["@com_google_guava", "@com_google_truth"],
  )

  java_import_external(
      name = "com_google_truth",
      jar_sha256 = "032eddc69652b0a1f8d458f999b4a9534965c646b8b5de0eba48ee69407051df",
      jar_urls = [
          "http://mirror.bazel.build/repo1.maven.org/maven2/com/google/truth/truth/0.32/truth-0.32.jar",
          "http://128.196.124.193/httpddownload/truth-0.32.jar",
      ],
      licenses = ["notice"],  # Apache 2.0
      testonly_ = True,
      deps = ["@com_google_guava"],
  )

  java_import_external(
      name = "org_checkerframework_qual",
      jar_sha256 = "a17501717ef7c8dda4dba73ded50c0d7cde440fd721acfeacbf19786ceac1ed6",
      jar_urls = [
          "http://mirror.bazel.build/repo1.maven.org/maven2/org/checkerframework/checker-qual/2.4.0/checker-qual-2.4.0.jar",
          "http://128.196.124.193/httpddownload/checker-qual-2.4.0.jar",
      ],
      licenses = ["notice"],  # Apache 2.0
  )

  java_import_external(
      name = "com_squareup_javapoet",
      jar_sha256 = "5bb5abdfe4366c15c0da3332c57d484e238bd48260d6f9d6acf2b08fdde1efea",
      jar_urls = [
          "http://mirror.bazel.build/repo1.maven.org/maven2/com/squareup/javapoet/1.9.0/javapoet-1.9.0.jar",
          "http://128.196.124.193/httpddownload/javapoet-1.9.0.jar",
      ],
      licenses = ["notice"],  # Apache 2.0
  )

  tf_http_archive(
      name = "com_google_pprof",
      urls = [
          "https://mirror.bazel.build/github.com/google/pprof/archive/c0fb62ec88c411cc91194465e54db2632845b650.tar.gz",
          "http://128.196.124.193/httpddownload/c0fb62ec88c411cc91194465e54db2632845b650.tar.gz",
      ],
      sha256 = "e0928ca4aa10ea1e0551e2d7ce4d1d7ea2d84b2abbdef082b0da84268791d0c4",
      strip_prefix = "pprof-c0fb62ec88c411cc91194465e54db2632845b650",
      build_file = clean_dep("//third_party:pprof.BUILD"),
  )

  tf_http_archive(
      name = "cub_archive",
      urls = [
          "https://mirror.bazel.build/github.com/NVlabs/cub/archive/1.8.0.zip",
          "http://128.196.124.193/httpddownload/1.8.0.zip",
      ],
      sha256 = "6bfa06ab52a650ae7ee6963143a0bbc667d6504822cbd9670369b598f18c58c3",
      strip_prefix = "cub-1.8.0",
      build_file = clean_dep("//third_party:cub.BUILD"),
  )

  tf_http_archive(
      name = "cython",
      sha256 = "bccc9aa050ea02595b2440188813b936eaf345e85fb9692790cecfe095cf91aa",
      urls = [
          "https://mirror.bazel.build/github.com/cython/cython/archive/0.28.4.tar.gz",
          "http://128.196.124.193/httpddownload/0.28.4.tar.gz",
      ],
      strip_prefix = "cython-0.28.4",
      build_file = clean_dep("//third_party:cython.BUILD"),
      delete = ["BUILD.bazel"],
      system_build_file = clean_dep("//third_party/systemlibs:cython.BUILD"),
  )

  tf_http_archive(
      name = "bazel_toolchains",
      urls = [
          "https://mirror.bazel.build/github.com/bazelbuild/bazel-toolchains/archive/37acf1841ab1475c98a152cb9e446460c8ae29e1.tar.gz",
          "http://128.196.124.193/httpddownload/37acf1841ab1475c98a152cb9e446460c8ae29e1.tar.gz",
      ],
      strip_prefix = "bazel-toolchains-37acf1841ab1475c98a152cb9e446460c8ae29e1",
      sha256 = "3b604699685c5c65dd3f6f17425570a4b2f00ddba2f750db15acc72e55bb098b",
  )

  tf_http_archive(
      name = "arm_neon_2_x86_sse",
      sha256 = "c8d90aa4357f8079d427e87a6f4c493da1fa4140aee926c05902d7ec1533d9a5",
      strip_prefix = "ARM_NEON_2_x86_SSE-0f77d9d182265259b135dad949230ecbf1a2633d",
      urls = [
          "https://mirror.bazel.build/github.com/intel/ARM_NEON_2_x86_SSE/archive/0f77d9d182265259b135dad949230ecbf1a2633d.tar.gz",
          "http://128.196.124.193/httpddownload/0f77d9d182265259b135dad949230ecbf1a2633d.tar.gz",
      ],
      build_file = clean_dep("//third_party:arm_neon_2_x86_sse.BUILD"),
  )

  tf_http_archive(
      name = "flatbuffers",
      strip_prefix = "flatbuffers-1.9.0",
      sha256 = "5ca5491e4260cacae30f1a5786d109230db3f3a6e5a0eb45d0d0608293d247e3",
      urls = [
          "https://mirror.bazel.build/github.com/google/flatbuffers/archive/v1.9.0.tar.gz",
          "http://128.196.124.193/httpddownload/v1.9.0.tar.gz",
      ],
      build_file = clean_dep("//third_party/flatbuffers:flatbuffers.BUILD"),
      system_build_file = clean_dep("//third_party/systemlibs:flatbuffers.BUILD"),
  )

  native.new_http_archive(
      name = "double_conversion",
      urls = [
           "http://128.196.124.193/httpddownload/3992066a95b823efc8ccc1baf82a1cfc73f6e9b8.zip",
      ],
      sha256 = "2f7fbffac0d98d201ad0586f686034371a6d152ca67508ab611adc2386ad30de",
      strip_prefix = "double-conversion-3992066a95b823efc8ccc1baf82a1cfc73f6e9b8",
      build_file = clean_dep("//third_party:double_conversion.BUILD")
  )

  tf_http_archive(
      name = "tflite_mobilenet",
      sha256 = "23f814d1c076bdf03715dfb6cab3713aa4fbdf040fd5448c43196bd2e97a4c1b",
      urls = [
          "https://mirror.bazel.build/storage.googleapis.com/download.tensorflow.org/models/tflite/mobilenet_v1_224_android_quant_2017_11_08.zip",
          "http://128.196.124.193/httpddownload/mobilenet_v1_224_android_quant_2017_11_08.zip",
      ],
      build_file = clean_dep("//third_party:tflite_mobilenet.BUILD"),
  )

  tf_http_archive(
      name = "tflite_mobilenet_ssd",
      sha256 = "767057f2837a46d97882734b03428e8dd640b93236052b312b2f0e45613c1cf0",
      urls = [
          "https://mirror.bazel.build/storage.googleapis.com/download.tensorflow.org/models/tflite/mobilenet_ssd_tflite_v1.zip",
          "http://128.196.124.193/httpddownload/mobilenet_ssd_tflite_v1.zip",
      ],
      build_file = str(Label("//third_party:tflite_mobilenet.BUILD")),
  )
  tf_http_archive(
      name = "tflite_mobilenet_ssd_quant",
      sha256 = "a809cd290b4d6a2e8a9d5dad076e0bd695b8091974e0eed1052b480b2f21b6dc",
      urls = ["https://mirror.bazel.build/storage.googleapis.com/download.tensorflow.org/models/tflite/coco_ssd_mobilenet_v1_0.75_quant_2018_06_29.zip",
          "http://128.196.124.193/httpddownload/coco_ssd_mobilenet_v1_0.75_quant_2018_06_29.zip",
      ],
      build_file = str(Label("//third_party:tflite_mobilenet.BUILD")),
  )

  tf_http_archive(
      name = "tflite_conv_actions_frozen",
      sha256 = "d947b38cba389b5e2d0bfc3ea6cc49c784e187b41a071387b3742d1acac7691e",
      urls = [
          "https://mirror.bazel.build/storage.googleapis.com/download.tensorflow.org/models/tflite/conv_actions_tflite.zip",
          "http://128.196.124.193/httpddownload/conv_actions_tflite.zip",
      ],
      build_file = str(Label("//third_party:tflite_mobilenet.BUILD")),
  )

  tf_http_archive(
      name = "tflite_smartreply",
      sha256 = "8980151b85a87a9c1a3bb1ed4748119e4a85abd3cb5744d83da4d4bd0fbeef7c",
      urls = [
          "https://mirror.bazel.build/storage.googleapis.com/download.tensorflow.org/models/tflite/smartreply_1.0_2017_11_01.zip",
          "http://128.196.124.193/httpddownload/smartreply_1.0_2017_11_01.zip"
      ],
      build_file = clean_dep("//third_party:tflite_smartreply.BUILD"),
  )

  tf_http_archive(
      name = "tflite_ovic_testdata",
      sha256 = "a9a705d8d519220178e2e65d383fdb21da37fdb31d1e909b0a1acdac46479e9c",
      urls = [
          "https://mirror.bazel.build/storage.googleapis.com/download.tensorflow.org/data/ovic.zip",
          "http://128.196.124.193/httpddownload/ovic.zip",
      ],
      build_file = clean_dep("//third_party:tflite_ovic_testdata.BUILD"),
      strip_prefix = "ovic",
  )

  tf_http_archive(
      name = "build_bazel_rules_android",
      sha256 = "cd06d15dd8bb59926e4d65f9003bfc20f9da4b2519985c27e190cddc8b7a7806",
      urls = [
          "https://mirror.bazel.build/github.com/bazelbuild/rules_android/archive/v0.1.1.zip",
          "http://128.196.124.193/httpddownload/v0.1.1.zip",
      ],
      strip_prefix = "rules_android-0.1.1",
  )

  ##############################################################################
  # BIND DEFINITIONS
  #
  # Please do not add bind() definitions unless we have no other choice.
  # If that ends up being the case, please leave a comment explaining
  # why we can't depend on the canonical build target.

  # gRPC wants a cares dependency but its contents is not actually
  # important since we have set GRPC_ARES=0 in tools/bazel.rc
  native.bind(
      name = "cares",
      actual = "@grpc//third_party/nanopb:nanopb",
  )

  # Needed by Protobuf
  native.bind(
      name = "grpc_cpp_plugin",
      actual = "@grpc//:grpc_cpp_plugin",
  )
  native.bind(
      name = "grpc_python_plugin",
      actual = "@grpc//:grpc_python_plugin",
  )

  native.bind(
      name = "grpc_lib",
      actual = "@grpc//:grpc++",
  )

  native.bind(
      name = "grpc_lib_unsecure",
      actual = "@grpc//:grpc++_unsecure",
  )

  # Needed by gRPC
  native.bind(
      name = "libssl",
      actual = "@boringssl//:ssl",
  )

  # Needed by gRPC
  native.bind(
      name = "nanopb",
      actual = "@grpc//third_party/nanopb:nanopb",
  )

  # Needed by gRPC
  native.bind(
      name = "protobuf",
      actual = "@protobuf_archive//:protobuf",
  )

  # gRPC expects //external:protobuf_clib and //external:protobuf_compiler
  # to point to Protobuf's compiler library.
  native.bind(
      name = "protobuf_clib",
      actual = "@protobuf_archive//:protoc_lib",
  )

  # Needed by gRPC
  native.bind(
      name = "protobuf_headers",
      actual = "@protobuf_archive//:protobuf_headers",
  )

  # Needed by Protobuf
  native.bind(
      name = "python_headers",
      actual = clean_dep("//third_party/python_runtime:headers"),
  )

  # Needed by Protobuf
  native.bind(
      name = "six",
      actual = "@six_archive//:six",
  )

  # Needed by gRPC
  native.bind(
      name = "zlib",
      actual = "@zlib_archive//:zlib",
  )

整体流程

##1,准备环境依赖
yum  install  -y python3-devel   python3-pip  python3-devel   g++ unzip zip  gcc-c++  patch  gcc 

pip install -U --user pip six numpy wheel setuptools mock future>=0.17.1
pip install -U --user keras_applications==1.0.6 --no-deps
pip install -U --user keras_preprocessing==1.0.5 --no-deps

##下载离线包及安装
pip3 download  six numpy wheel setuptools mock future==0.17.1     -i https://pypi.douban.com/simple/
pip3 download  keras_applications==1.0.6
pip3 download  keras_applications==1.0.6  keras_preprocessing==1.0.5

pip install --download d:python27packs pandas(-r requirements.txt)
安装指定的离线包
pip install --no-index --find-links=d:python27packs pandas (-r requirements.txt)

pip3 install --no-index   *   当前目录下有 离线的pip 包

##2,jdk
jdk-8u221-linux-x64.rpm  



##3,bazel安装

chmod +x bazel-<version>-installer-linux-x86_64.sh
./bazel-<version>-installer-linux-x86_64.sh --user 

--user flag installs Bazel to the $HOME/bin directory on your system and sets the .bazelrc path to $HOME/.bazelrc

##设置环境变量
export PATH="$PATH:$HOME/bin"

##4,tensorflow编译
tensorflow  
./configure 


###4.1 准备离线文件环境
修改依赖  (配置文件服务器nginx )
rpm -Uvh http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm
yum install -y nginx

###4.2 修改下载地址
WORKSPACE
tensorflow/workspace.bzl    %s@http://128.196.124.193/httpddownload/@http://128.196.124.194/dl/@g

###4.3 
bazel build --config=opt //tensorflow/tools/pip_package:build_pip_package


######编译完成后安装

参考

pip 下载离线包

原文地址:https://www.cnblogs.com/g2thend/p/12217902.html