microsoft / AI-System

System for AI Education Resource.
https://microsoft.github.io/AI-System/
Creative Commons Attribution 4.0 International
3.64k stars 451 forks source link

Fix subprocess.CalledProcessError when building TorchServe GPU image in basic lab 5 #27

Closed bc-li closed 3 years ago

bc-li commented 3 years ago

Environment

## Gradle output
```bash
FAILURE: Build failed with an exception.

  * What went wrong:
  Execution failed for task ':server:compileJava'.
  > Compilation failed; see the compiler error output for details.

  * 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 1s
    9 actionable tasks: 8 executed, 1 up-to-date
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-req-build-8zsfe839/setup.py", line 164, in <module>
        license='Apache License Version 2.0'
      File "/usr/local/lib/python3.6/dist-packages/setuptools/__init__.py", line 153, in setup
        return distutils.core.setup(**attrs)
      File "/usr/lib/python3.6/distutils/core.py", line 148, in setup
        dist.run_commands()
      File "/usr/lib/python3.6/distutils/dist.py", line 955, in run_commands
        self.run_command(cmd)
      File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command
        cmd_obj.run()
      File "/usr/local/lib/python3.6/dist-packages/setuptools/command/install.py", line 61, in run
        return orig.install.run(self)
      File "/usr/lib/python3.6/distutils/command/install.py", line 589, in run
        self.run_command('build')
      File "/usr/lib/python3.6/distutils/cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command
        cmd_obj.run()
      File "/usr/lib/python3.6/distutils/command/build.py", line 135, in run
        self.run_command(cmd_name)
      File "/usr/lib/python3.6/distutils/cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command
        cmd_obj.run()
      File "/tmp/pip-req-build-8zsfe839/setup.py", line 103, in run
        self.run_command('build_frontend')
      File "/usr/lib/python3.6/distutils/cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command
        cmd_obj.run()
      File "/tmp/pip-req-build-8zsfe839/setup.py", line 90, in run
        subprocess.check_call(build_frontend_command[platform.system()], shell=True)
      File "/usr/lib/python3.6/subprocess.py", line 311, in check_call
        raise CalledProcessError(retcode, cmd)
    subprocess.CalledProcessError: Command 'frontend/gradlew -p frontend clean assemble' returned non-zero exit status 1.

Solution

Change jdk version in GPU version of the Dockerfile.infer from openjdk-8-jdk-headless to openjdk-11-jdk, which resolve the problem.

YanjieGao commented 3 years ago

Thanks BC-Li!

YanjieGao commented 3 years ago

@BC-Li Hi, your branch has been deleted by yourself which let this PR cannot be merged. Could you create branch or a new PR?

bc-li commented 3 years ago

> @BC-Li Hi, your branch has been deleted by yourself which let this PR cannot be merged. Could you create branch or a new PR?

Hi @YanjieGao, I've created a new PR in https://github.com/microsoft/AI-System/pull/29. I thought after I handed in that PR I could delete my branch... Sorry for the inconvenience TAT

------------------ 原始邮件 ------------------ 发件人: "Yanjie @.>; 发送时间: 2021年6月2日(星期三) 中午11:12 收件人: @.>; 抄送: "Bocheng @.>; @.>; 主题: Re: [microsoft/AI-System] Fix subprocess.CalledProcessError when building TorchServe GPU image in basic lab 5 (#27)

@BC-Li Hi, your branch has been deleted by yourself which let this PR cannot be merged. Could you create branch or a new PR?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.