Repository: pytorch/serve

Issue #36: benchmark dependencies install script failing on fresh ubuntu 18.04
Created: 2020-02-16T19:16:05Z
The 'install_dependencies.sh' script is not working on a fresh ubuntu 18.04 machine. Tested for both GPU and CPU installs.
Error details:

brew install jmeter --with-plugins
Usage: brew install [options] formula
....
Error: invalid option: --with-plugins
true
wget https://jmeter-plugins.org/get/ -O /home/ubuntu/.linuxbrew/Cellar/jmeter/5.2.1/libexec/lib/ext/jmeter-plugins-manager-1.3.jar
/home/ubuntu/.linuxbrew/Cellar/jmeter/5.2.1/libexec/lib/ext/jmeter-plugins-manager-1.3.jar: No such file or directory

Duplicate issue #56: Document JDK version in install steps
Created: 2020-02-21T01:26:43Z
Install stopped working after the latest changes. Failing with "FindBugs rule violations" for modelarchive.
Error details:
(myenv) ubuntu@ip-172-31-18-32:~/pt/serve$ pip install .
Processing /home/ubuntu/pt/serve
Requirement already satisfied: Pillow in /home/ubuntu/anaconda3/envs/myenv/lib/python3.8/site-packages (from torchserve==0.0.1b20200221) (7.0.0)
Requirement already satisfied: psutil in /home/ubuntu/anaconda3/envs/myenv/lib/python3.8/site-packages (from torchserve==0.0.1b20200221) (5.6.7)
Processing /home/ubuntu/.cache/pip/wheels/8e/70/28/3d6ccd6e315f65f245da085482a2e1c7d14b90b30f239e2cf4/future-0.18.2-py3-none-any.whl
Requirement already satisfied: torch in /home/ubuntu/anaconda3/envs/myenv/lib/python3.8/site-packages (from torchserve==0.0.1b20200221) (1.4.0)
Requirement already satisfied: torchvision in /home/ubuntu/anaconda3/envs/myenv/lib/python3.8/site-packages (from torchserve==0.0.1b20200221) (0.5.0)
Requirement already satisfied: torchtext in /home/ubuntu/anaconda3/envs/myenv/lib/python3.8/site-packages (from torchserve==0.0.1b20200221) (0.5.0)
Requirement already satisfied: numpy in /home/ubuntu/anaconda3/envs/myenv/lib/python3.8/site-packages (from torchvision->torchserve==0.0.1b20200221) (1.18.1)
Requirement already satisfied: six in /home/ubuntu/anaconda3/envs/myenv/lib/python3.8/site-packages (from torchvision->torchserve==0.0.1b20200221) (1.14.0)
Requirement already satisfied: tqdm in /home/ubuntu/anaconda3/envs/myenv/lib/python3.8/site-packages (from torchtext->torchserve==0.0.1b20200221) (4.42.1)
Requirement already satisfied: requests in /home/ubuntu/anaconda3/envs/myenv/lib/python3.8/site-packages (from torchtext->torchserve==0.0.1b20200221) (2.22.0)
Collecting sentencepiece
Using cached sentencepiece-0.1.85-cp38-cp38-manylinux1_x86_64.whl (1.0 MB)
Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in /home/ubuntu/anaconda3/envs/myenv/lib/python3.8/site-packages (from requests->torchtext->torchserve==0.0.1b20200221) (1.25.8)
Requirement already satisfied: idna<2.9,>=2.5 in /home/ubuntu/anaconda3/envs/myenv/lib/python3.8/site-packages (from requests->torchtext->torchserve==0.0.1b20200221) (2.8)
Requirement already satisfied: certifi>=2017.4.17 in /home/ubuntu/anaconda3/envs/myenv/lib/python3.8/site-packages (from requests->torchtext->torchserve==0.0.1b20200221) (2019.11.28)
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in /home/ubuntu/anaconda3/envs/myenv/lib/python3.8/site-packages (from requests->torchtext->torchserve==0.0.1b20200221) (3.0.4)
Building wheels for collected packages: torchserve
Building wheel for torchserve (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /home/ubuntu/anaconda3/envs/myenv/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-srpt9i6p/setup.py'"'"'; file='"'"'/tmp/pip-req-build-srpt9i6p/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-kibaudnl
cwd: /tmp/pip-req-build-srpt9i6p/
Complete output (135 lines):
running bdist_wheel
running build
running build_py
running build_frontend

Task :cts:clean
Task :modelarchive:clean


Task :server:killServer
No server running!


Task :server:clean
Task :cts:compileJava NO-SOURCE
Task :cts:processResources NO-SOURCE
Task :cts:classes UP-TO-DATE
Task :cts:jar
Task :cts:assemble
Task :cts:checkstyleMain NO-SOURCE
Task :cts:compileTestJava NO-SOURCE
Task :cts:processTestResources NO-SOURCE
Task :cts:testClasses UP-TO-DATE
Task :cts:checkstyleTest NO-SOURCE
Task :cts:findbugsMain NO-SOURCE
Task :cts:findbugsTest NO-SOURCE
Task :cts:test NO-SOURCE
Task :cts:jacocoTestCoverageVerification SKIPPED
Task :cts:jacocoTestReport SKIPPED
Task :cts:pmdMain NO-SOURCE
Task :cts:pmdTest SKIPPED
Task :cts:verifyJava
Task :cts:check
Task :cts:build
Task :modelarchive:compileJava
Task :modelarchive:processResources NO-SOURCE
Task :modelarchive:classes
Task :modelarchive:jar
Task :modelarchive:assemble
Task :modelarchive:checkstyleMain
Task :modelarchive:compileTestJava
Task :modelarchive:processTestResources
Task :modelarchive:testClasses
Task :modelarchive:checkstyleTest


Task :modelarchive:findbugsMain
The following classes needed for analysis were missing:
java.lang.Object
java.lang.Exception
java.lang.Enum
java.lang.String
java.lang.Throwable
java.nio.charset.StandardCharsets
java.io.File
java.lang.Class
java.io.InputStream
java.util.regex.Pattern
java.util.regex.Matcher
java.lang.StringBuilder
java.io.FileInputStream
java.net.URL
java.net.HttpURLConnection
java.lang.System
java.io.InputStreamReader
java.io.Reader
java.security.MessageDigest
java.lang.AssertionError
java.security.DigestInputStream
java.util.Map
java.util.LinkedHashMap
java.lang.IllegalArgumentException
java.util.zip.ZipOutputStream
java.io.FileOutputStream
java.util.zip.ZipInputStream
java.util.zip.ZipEntry
java.io.OutputStream
java.lang.NoSuchFieldError
java.lang.Error
java.lang.IllegalAccessError
java.io.Serializable
java.lang.NegativeArraySizeException
java.lang.IncompatibleClassChangeError
java.lang.AbstractMethodError
java.lang.UnsatisfiedLinkError
java.net.MalformedURLException
java.security.NoSuchAlgorithmException
java.net.SocketTimeoutException


Task :modelarchive:findbugsMain FAILED

FAILURE: Build failed with an exception.

What went wrong:
Execution failed for task ':modelarchive:findbugsMain'.


FindBugs rule violations were found. See the report at: file:///tmp/pip-req-build-srpt9i6p/frontend/modelarchive/build/reports/findbugs/main.html



Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.


Get more help at https://help.gradle.org


BUILD FAILED in 3s
13 actionable tasks: 13 executed
Traceback (most recent call last):
File "", line 1, in 
File "/tmp/pip-req-build-srpt9i6p/setup.py", line 137, in 
setup(
File "/home/ubuntu/anaconda3/envs/myenv/lib/python3.8/site-packages/setuptools/init.py", line 144, in setup
return distutils.core.setup(**attrs)
File "/home/ubuntu/anaconda3/envs/myenv/lib/python3.8/distutils/core.py", line 148, in setup
dist.run_commands()
File "/home/ubuntu/anaconda3/envs/myenv/lib/python3.8/distutils/dist.py", line 966, in run_commands
self.run_command(cmd)
File "/home/ubuntu/anaconda3/envs/myenv/lib/python3.8/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/home/ubuntu/anaconda3/envs/myenv/lib/python3.8/site-packages/wheel/bdist_wheel.py", line 223, in run
self.run_command('build')
File "/home/ubuntu/anaconda3/envs/myenv/lib/python3.8/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/home/ubuntu/anaconda3/envs/myenv/lib/python3.8/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/home/ubuntu/anaconda3/envs/myenv/lib/python3.8/distutils/command/build.py", line 135, in run
self.run_command(cmd_name)
File "/home/ubuntu/anaconda3/envs/myenv/lib/python3.8/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/home/ubuntu/anaconda3/envs/myenv/lib/python3.8/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/tmp/pip-req-build-srpt9i6p/setup.py", line 98, in run
self.run_command('build_frontend')
File "/home/ubuntu/anaconda3/envs/myenv/lib/python3.8/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/home/ubuntu/anaconda3/envs/myenv/lib/python3.8/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/tmp/pip-req-build-srpt9i6p/setup.py", line 85, in run
subprocess.check_call('frontend/gradlew -p frontend clean build', shell=True)
File "/home/ubuntu/anaconda3/envs/myenv/lib/python3.8/subprocess.py", line 364, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command 'frontend/gradlew -p frontend clean build' returned non-zero exit status 1.
ERROR: Failed building wheel for torchserve
Running setup.py clean for torchserve
Failed to build torchserve
Installing collected packages: future, torchserve, sentencepiece
Running setup.py install for torchserve ... error
ERROR: Command errored out with exit status 1:
command: /home/ubuntu/anaconda3/envs/myenv/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-srpt9i6p/setup.py'"'"'; file='"'"'/tmp/pip-req-build-srpt9i6p/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /tmp/pip-record-mk_hdekw/install-record.txt --single-version-externally-managed --compile --install-headers /home/ubuntu/anaconda3/envs/myenv/include/python3.8/torchserve
cwd: /tmp/pip-req-build-srpt9i6p/
Complete output (135 lines):
running install
running build
running build_py
running build_frontend
> Task :cts:clean
> Task :modelarchive:clean
> Task :server:killServer
No server running!

> Task :server:clean UP-TO-DATE
> Task :cts:compileJava NO-SOURCE
> Task :cts:processResources NO-SOURCE
> Task :cts:classes UP-TO-DATE
> Task :cts:jar
> Task :cts:assemble
> Task :cts:checkstyleMain NO-SOURCE
> Task :cts:compileTestJava NO-SOURCE
> Task :cts:processTestResources NO-SOURCE
> Task :cts:testClasses UP-TO-DATE
> Task :cts:checkstyleTest NO-SOURCE
> Task :cts:findbugsMain NO-SOURCE
> Task :cts:findbugsTest NO-SOURCE
> Task :cts:test NO-SOURCE
> Task :cts:jacocoTestCoverageVerification SKIPPED
> Task :cts:jacocoTestReport SKIPPED
> Task :cts:pmdMain NO-SOURCE
> Task :cts:pmdTest SKIPPED
> Task :cts:verifyJava
> Task :cts:check
> Task :cts:build
> Task :modelarchive:compileJava
> Task :modelarchive:processResources NO-SOURCE
> Task :modelarchive:classes
> Task :modelarchive:jar
> Task :modelarchive:assemble
> Task :modelarchive:checkstyleMain
> Task :modelarchive:compileTestJava
> Task :modelarchive:processTestResources
> Task :modelarchive:testClasses
> Task :modelarchive:checkstyleTest

> Task :modelarchive:findbugsMain FAILED
The following classes needed for analysis were missing:
  java.lang.Object
  java.lang.Exception
  java.lang.Enum
  java.lang.String
  java.lang.Throwable
  java.nio.charset.StandardCharsets
  java.io.File
  java.lang.Class
  java.io.InputStream
  java.util.regex.Pattern
  java.util.regex.Matcher
  java.lang.StringBuilder
  java.io.FileInputStream
  java.net.URL
  java.net.HttpURLConnection
  java.lang.System
  java.io.InputStreamReader
  java.io.Reader
  java.security.MessageDigest
  java.lang.AssertionError
  java.security.DigestInputStream
  java.util.Map
  java.util.LinkedHashMap
  java.lang.IllegalArgumentException
  java.util.zip.ZipOutputStream
  java.io.FileOutputStream
  java.util.zip.ZipInputStream
  java.util.zip.ZipEntry
  java.io.OutputStream
  java.lang.NoSuchFieldError
  java.lang.Error
  java.lang.IllegalAccessError
  java.io.Serializable
  java.lang.NegativeArraySizeException
  java.lang.IncompatibleClassChangeError
  java.lang.AbstractMethodError
  java.lang.UnsatisfiedLinkError
  java.net.MalformedURLException
  java.security.NoSuchAlgorithmException
  java.net.SocketTimeoutException

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':modelarchive:findbugsMain'.
> FindBugs rule violations were found. See the report at: file:///tmp/pip-req-build-srpt9i6p/frontend/modelarchive/build/reports/findbugs/main.html

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 3s
13 actionable tasks: 12 executed, 1 up-to-date
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/tmp/pip-req-build-srpt9i6p/setup.py", line 137, in <module>
    setup(
  File "/home/ubuntu/anaconda3/envs/myenv/lib/python3.8/site-packages/setuptools/__init__.py", line 144, in setup
    return distutils.core.setup(**attrs)
  File "/home/ubuntu/anaconda3/envs/myenv/lib/python3.8/distutils/core.py", line 148, in setup
    dist.run_commands()
  File "/home/ubuntu/anaconda3/envs/myenv/lib/python3.8/distutils/dist.py", line 966, in run_commands
    self.run_command(cmd)
  File "/home/ubuntu/anaconda3/envs/myenv/lib/python3.8/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "/home/ubuntu/anaconda3/envs/myenv/lib/python3.8/site-packages/setuptools/command/install.py", line 61, in run
    return orig.install.run(self)
  File "/home/ubuntu/anaconda3/envs/myenv/lib/python3.8/distutils/command/install.py", line 545, in run
    self.run_command('build')
  File "/home/ubuntu/anaconda3/envs/myenv/lib/python3.8/distutils/cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "/home/ubuntu/anaconda3/envs/myenv/lib/python3.8/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "/home/ubuntu/anaconda3/envs/myenv/lib/python3.8/distutils/command/build.py", line 135, in run
    self.run_command(cmd_name)
  File "/home/ubuntu/anaconda3/envs/myenv/lib/python3.8/distutils/cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "/home/ubuntu/anaconda3/envs/myenv/lib/python3.8/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "/tmp/pip-req-build-srpt9i6p/setup.py", line 98, in run
    self.run_command('build_frontend')
  File "/home/ubuntu/anaconda3/envs/myenv/lib/python3.8/distutils/cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "/home/ubuntu/anaconda3/envs/myenv/lib/python3.8/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "/tmp/pip-req-build-srpt9i6p/setup.py", line 85, in run
    subprocess.check_call('frontend/gradlew -p frontend clean build', shell=True)
  File "/home/ubuntu/anaconda3/envs/myenv/lib/python3.8/subprocess.py", line 364, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command 'frontend/gradlew -p frontend clean build' returned non-zero exit status 1.
----------------------------------------

ERROR: Command errored out with exit status 1: /home/ubuntu/anaconda3/envs/myenv/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-srpt9i6p/setup.py'"'"'; file='"'"'/tmp/pip-req-build-srpt9i6p/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /tmp/pip-record-mk_hdekw/install-record.txt --single-version-externally-managed --compile --install-headers /home/ubuntu/anaconda3/envs/myenv/include/python3.8/torchserve Check the logs for full command output

Closing comment (2020-03-05T06:49:52Z): Required JDK version is already documented in the pre-requisites section of the README file.
The issue was observed because incorrect java version got installed by the benchmark's install_dependency script. The fixes in install_dependency.sh script is already in progress and being tracked in #36 .
@fbbradheintz : can we close this ticket?