Describe the bug
It looks like you can't use the configuration file to set the bentoml deploy version to be based on a git commit/ branch.
To Reproduce
I was trying to install a version of bentoml based off of a branch. I used bentoml config set core.bentoml_deploy_version=git+https://github.com/bentoml/BentoML.git@master to set the deploy version.
The generated requirements.txt then contains bentoml==git+https://github.com/bentoml/BentoML.git@master which is not how requirements.txt expects packages based on git urls to be formed.
If I removed the bentoml==, I am able to build the docker image. However, when I run the docker image, I get a "BentoService bundle version mismatch"
Expected behavior
I expect to be able to set the deploy version and have the requirements.txt file use that version, and to be able to run the docker image with that version.
Environment:
@kevlar1818 @pdoyle5000
Thanks for reporting the issue @seantur, the bentoml_deploy_version config does have some rough edges, it is currently only being used for bentoml devs to do deployment testing on dev branches. To make it usable for users I think 2 things need to be done:
1) as you suggested, when the bentoml_deploy_version is a link to git-repo, remove the bentoml== https://github.com/bentoml/BentoML/blob/master/bentoml/service_env.py#L101
2) SavedBundle loader should not raise an exception when conf["version"] is a link to git-repo
https://github.com/bentoml/BentoML/blob/master/bentoml/bundler/config.py#L111
I will try to follow up with a fix later this week(sorry it's a bit busy on our side this week), contributions are welcomed too!
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
hi @seantur, were you able to find a workaround for this issue? We are investigating this again and I'd like to hear more about your use case if you don't mind sharing, why a custom version of BentoML is needed for your deployment and/or if there's any way BentoML can make itself more customizable to fit that need. Feel free to ping me in the community slack channel as well if you prefer to discuss there.
@parano My use case was that I needed a fix that was in master, but not available yet as a release. I noticed that the functionality was supposed to be there, but that it didn't seem to work.
In my case, I didn't need this functionality once the fix was released as a version.
@seantur got it - a workaround to that is to install BentoML from source with 'edit mode':
$ git clone [email protected]:bentoml/BentoML.git
$ cd BentoML
$ pip install -e .
This way, all the deployments created and docker images built will be using the version of BentoML that's in the source directory.
I guess the fix you were looking for has already been released now! Hope everything is working for you now, let me know if there's still anything blocking you!
Most helpful comment
Thanks for reporting the issue @seantur, the
bentoml_deploy_versionconfig does have some rough edges, it is currently only being used for bentoml devs to do deployment testing on dev branches. To make it usable for users I think 2 things need to be done:1) as you suggested, when the
bentoml_deploy_versionis a link to git-repo, remove thebentoml==https://github.com/bentoml/BentoML/blob/master/bentoml/service_env.py#L1012) SavedBundle loader should not raise an exception when
conf["version"]is a link to git-repohttps://github.com/bentoml/BentoML/blob/master/bentoml/bundler/config.py#L111
I will try to follow up with a fix later this week(sorry it's a bit busy on our side this week), contributions are welcomed too!