فهرست منبع

Do not build with tensorflow by default

Signed-off-by: Vadim Markovtsev <vadim@sourced.tech>
Vadim Markovtsev 6 سال پیش
والد
کامیت
6b3591e82e
4فایلهای تغییر یافته به همراه13 افزوده شده و 10 حذف شده
  1. 0 1
      .appveyor.yml
  2. 4 4
      .travis.yml
  3. 1 3
      Makefile
  4. 8 2
      README.md

+ 0 - 1
.appveyor.yml

@@ -18,7 +18,6 @@ build_script:
   - set PATH=%PATH:C:\Program Files\Git\usr\bin;=%
   - cd %GOPATH%\src\gopkg.in\src-d\hercules.v5
   - go get -v github.com/golang/dep/cmd/dep
-  - set DISABLE_TENSORFLOW=1
   - make
   - 7z a c:\gopath\src\gopkg.in\src-d\hercules.v5\hercules.win64.zip %GOPATH%\bin\hercules.exe
 

+ 4 - 4
.travis.yml

@@ -38,7 +38,7 @@ stages:
     if: tag =~ .*
 
 env:
-  - PROTOC_VERSION=3.6.0 TENSORFLOW_VERSION=1.8.0
+  - PROTOC_VERSION=3.6.0 TENSORFLOW_VERSION=1.11.0
 
 before_install:
   - wget -O protoc.zip https://github.com/google/protobuf/releases/download/v$PROTOC_VERSION/protoc-$PROTOC_VERSION-linux-x86_64.zip
@@ -58,7 +58,7 @@ before_install:
   - sudo ldconfig
 install:
   - git clean -xfd
-  - make
+  - make TAGS=tensorflow
 script:
   - set -e
   - if [ $TRAVIS_GO_VERSION = "1.11.*" ]; then test -z "$(gofmt -s -l . | grep -v vendor/)"; fi
@@ -101,7 +101,7 @@ jobs:
         - gzip -S .darwin_amd64.gz $GOPATH/bin/hercules
       script: skip
       install:
-        - DISABLE_TENSORFLOW=1 make
+        - make
       deploy:
         provider: releases
         api_key:
@@ -121,7 +121,7 @@ jobs:
         - export PATH=$GOPATH/bin:$PATH
       script: skip
       install:
-        - DISABLE_TENSORFLOW=1 make
+        - make
       after_success:
         - gzip -S .linux_amd64.gz $GOPATH/bin/hercules
       deploy:

+ 1 - 3
Makefile

@@ -5,9 +5,7 @@ else
 EXE = .exe
 endif
 PKG = $(shell go env GOOS)_$(shell go env GOARCH)
-ifneq (${DISABLE_TENSORFLOW},1)
-TAGS ?= tensorflow
-endif
+TAGS ?=
 BBLFSH_DEP =
 
 all: ${GOPATH}/bin/hercules${EXE}

+ 8 - 2
README.md

@@ -65,8 +65,6 @@ make
 ```
 
 Replace `$GOPATH` with `%GOPATH%` on Windows.
-By default the build requires [`libtensorflow`](https://www.tensorflow.org/install/install_go).
-Disable the analyses which require Tensorflow with `DISABLE_TENSORFLOW=1 make`.
 
 ## Contributions
 
@@ -278,6 +276,14 @@ E.g. [`sadly, we need to hide the rect from the documentation finder for now`](h
 is positive. Don't expect too much though - as was written, the sentiment model is
 general purpose and the code comments have different nature, so there is no magic (for now).
 
+Hercules must be built with "tensorflow" tag - it is not by default:
+
+```
+make TAGS=tensorflow
+```
+
+Such a build requires [`libtensorflow`](https://www.tensorflow.org/install/install_go).
+
 #### Everything in a single pass
 
 ```