Bentoml: bentoml serve fails with error is built / packaged on Windows and deployed on Linux

Created on 26 Aug 2020  路  2Comments  路  Source: bentoml/BentoML

Describe the bug
bentoml serve fails with error:

Error: bentoml-cli serve failed: Can not locate module_file <some_dir1>\<some_dir2>\<some_file>.py in saved bundle /<some_dir3>
This happens because of the windows style backslash in .py being considered as the escape character on linux.

The " .py" originates from metadata['module_file'] in bentoml.yml

To Reproduce

  1. Build Bento on Windows
  2. Deploy Bento on RHEL Docker Image
  3. Startup Fails

Environment:

  • Python 3.8, BentoML-0.8.4

Additional context
Can't say for sure - but my guess is that this only happens when the Bento is built/packaged on Windows and deployed on Linux.

I was able to fix this by manually replacing the forward slash with backward slash in betoml.yml

bug

All 2 comments

@jiyer2016 Thank you for finding this issue. You are exactly right. BentoML didn't take into account of module_file from Windows.

We need to improve our Windows support. Thank you for discovering all of these issues and help BentoML improve!

This is fixed in #1044, will be available in next release

Was this page helpful?
0 / 5 - 0 ratings