Document JDK version in install steps
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
@chauhang : We could not reproduce this on our local machine(MAC) with latest master.
Logs :
(base) USL07109:serve harsh_bafna$ pip install .
Processing /Users/harsh_bafna/serve
Requirement already satisfied: Pillow in /opt/anaconda3/lib/python3.7/site-packages (from torchserve==0.0.1b20200221) (6.2.0)
Requirement already satisfied: psutil in /opt/anaconda3/lib/python3.7/site-packages (from torchserve==0.0.1b20200221) (5.6.7)
Requirement already satisfied: future in /opt/anaconda3/lib/python3.7/site-packages (from torchserve==0.0.1b20200221) (0.18.2)
Requirement already satisfied: torch in /opt/anaconda3/lib/python3.7/site-packages (from torchserve==0.0.1b20200221) (1.4.0)
Requirement already satisfied: torchvision in /opt/anaconda3/lib/python3.7/site-packages (from torchserve==0.0.1b20200221) (0.5.0)
Requirement already satisfied: torchtext in /opt/anaconda3/lib/python3.7/site-packages (from torchserve==0.0.1b20200221) (0.5.0)
Requirement already satisfied: numpy in /opt/anaconda3/lib/python3.7/site-packages (from torchvision->torchserve==0.0.1b20200221) (1.17.2)
Requirement already satisfied: six in /opt/anaconda3/lib/python3.7/site-packages (from torchvision->torchserve==0.0.1b20200221) (1.12.0)
Requirement already satisfied: tqdm in /opt/anaconda3/lib/python3.7/site-packages (from torchtext->torchserve==0.0.1b20200221) (4.36.1)
Requirement already satisfied: requests in /opt/anaconda3/lib/python3.7/site-packages (from torchtext->torchserve==0.0.1b20200221) (2.22.0)
Requirement already satisfied: sentencepiece in /opt/anaconda3/lib/python3.7/site-packages (from torchtext->torchserve==0.0.1b20200221) (0.1.85)
Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in /opt/anaconda3/lib/python3.7/site-packages (from requests->torchtext->torchserve==0.0.1b20200221) (1.24.2)
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in /opt/anaconda3/lib/python3.7/site-packages (from requests->torchtext->torchserve==0.0.1b20200221) (3.0.4)
Requirement already satisfied: idna<2.9,>=2.5 in /opt/anaconda3/lib/python3.7/site-packages (from requests->torchtext->torchserve==0.0.1b20200221) (2.8)
Requirement already satisfied: certifi>=2017.4.17 in /opt/anaconda3/lib/python3.7/site-packages (from requests->torchtext->torchserve==0.0.1b20200221) (2019.11.28)
Building wheels for collected packages: torchserve
Building wheel for torchserve (setup.py) ... done
Created wheel for torchserve: filename=torchserve-0.0.1b20200221-cp37-none-any.whl size=4537413 sha256=a40f8e35dc58687be95ec3ef68c05c0a1d7efa9fb9a17f1f0b77af29ece754a2
Stored in directory: /private/var/folders/hl/5rqtwh4d4wn97cxm7ptwpn802cq2zb/T/pip-ephem-wheel-cache-hgim2a2p/wheels/eb/0e/7e/269b012583a050f9c54d2a7e0751a97ea742cdf50e80928a97
Successfully built torchserve
Installing collected packages: torchserve
Successfully installed torchserve-0.0.1b20200221
(base) USL07109:serve harsh_bafna$
Even I tried a moment ago on my mac however not reproducible. Now we are trying with a fresh ec2 instance.
Working fine on EC2 ubuntu box as well.
Logs:
ubuntu@ip-172-31-30-157:~/serve$ pip3 install .
Defaulting to user installation because normal site-packages is not writeable
Processing /home/ubuntu/serve
Requirement already satisfied: Pillow in /home/ubuntu/.local/lib/python3.6/site-packages (from torchserve==0.0.1b20200221) (7.0.0)
Requirement already satisfied: psutil in /home/ubuntu/.local/lib/python3.6/site-packages (from torchserve==0.0.1b20200221) (5.7.0)
Requirement already satisfied: future in /home/ubuntu/.local/lib/python3.6/site-packages (from torchserve==0.0.1b20200221) (0.18.2)
Requirement already satisfied: torch in /home/ubuntu/.local/lib/python3.6/site-packages (from torchserve==0.0.1b20200221) (1.4.0)
Requirement already satisfied: torchvision in /home/ubuntu/.local/lib/python3.6/site-packages (from torchserve==0.0.1b20200221) (0.5.0)
Requirement already satisfied: torchtext in /home/ubuntu/.local/lib/python3.6/site-packages (from torchserve==0.0.1b20200221) (0.5.0)
Requirement already satisfied: numpy in /home/ubuntu/.local/lib/python3.6/site-packages (from torchvision->torchserve==0.0.1b20200221) (1.18.1)
Requirement already satisfied: six in /usr/lib/python3/dist-packages (from torchvision->torchserve==0.0.1b20200221) (1.11.0)
Requirement already satisfied: requests in /usr/lib/python3/dist-packages (from torchtext->torchserve==0.0.1b20200221) (2.18.4)
Requirement already satisfied: tqdm in /home/ubuntu/.local/lib/python3.6/site-packages (from torchtext->torchserve==0.0.1b20200221) (4.43.0)
Requirement already satisfied: sentencepiece in /home/ubuntu/.local/lib/python3.6/site-packages (from torchtext->torchserve==0.0.1b20200221) (0.1.85)
Building wheels for collected packages: torchserve
Building wheel for torchserve (setup.py) ... |
\
done
Created wheel for torchserve: filename=torchserve-0.0.1b20200221-py3-none-any.whl size=4537447 sha256=343d44230f617dc11a0225715fdd3dffc3a2955d78b0350cfd42b126a2a9d243
Stored in directory: /tmp/pip-ephem-wheel-cache-z61eqx7f/wheels/85/64/ce/8a07bbfe732768aea253b5242d29b5dd94e4cf72d81f69861a
Successfully built torchserve
Installing collected packages: torchserve
Successfully installed torchserve-0.0.1b20200221
@chauhang : We are able to reproduce this when we ran pip install . for torchserve after running the benchmark's install_dependency.sh script. We observed that the script is installing the default version on jdk which downloads the latest java version available in Ubuntu's packages, where as the the recommended version is jdk8.
Running pip install . for torchserve after this downloads gradle and findbugs compatible to the jdk version installed, due to which the build fails.
Doing a normal install of torchserve as per the guide works fine.
We will fix the java version related issue in install_dependency script along with the fix for #36 .
Could you please confirm if the issue observed on your setup was because of the above reason or else could you please share the steps followed.
@harshbafna You were right problems started after running the benchmark scripts.
Verified it is working on brand new Ubuntu 18.04 CPU machine with the instructions.
We should add clarification in the install steps for exact version of JDK if things are failing on new release. It will be good to also fix with new jdk release so that we don't keep getting support issues. A utility script to check all the dependency versions would be helpful to add.
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?
benchmark scripts updated to use JDK-8 in #80
Closing - I've seen the Java version callout in the docs