jina-ai / serve

☁️ Build multimodal AI applications with cloud-native stack
https://jina.ai/serve
Apache License 2.0
21.13k stars 2.22k forks source link

freeze the requirement versions before `jina hub build` #1378

Closed hanxiao closed 3 years ago

hanxiao commented 3 years ago

Describe the feature

originally from @florian-hoenicke : https://jinaai.slack.com/archives/C018QC78L84/p1606762818107400

For the sake of deterministic builds it would make sense to me if we always have fixed versions. What do you think? Example

TransformerTorchEncoder
transformers>=3.0.0
torch>=1.6.0
jina

->

transformers==3.5.1
torch==1.7.0
jina==0.8.2

Your proposal

add the freeze logic to here https://github.com/jina-ai/jina/blob/master/jina/docker/hubio.py#L303

should be a quick work, the logic is:

  1. determining the freezed requirement at jina hub build xxx
  2. update requirements.txt to that freezer version, old named requirements.old
  3. proceed the build with new requirments.txt
  4. all things done, restore requirements.old to .txt to users.

@cristianmtr may also related


Environment

Screenshots

StutiV commented 3 years ago

Hello @hanxiao . Can you please elaborate this issue? I'd like to contribute. Thank you!

florian-hoenicke commented 3 years ago

@StutiV Good to hear you would like to contribute! 🥳🥳🥳 As a first step, you could update the hub components and fix the version numbers to the latest working version. Implementing this automation in our build pipeline might be a bit too difficult when you are new to Jina.

jina-bot commented 3 years ago

This issue is stale because it has been open 20 days with no activity. Remove stale label or comment or this will be closed in 4 days

nan-wang commented 3 years ago

resolved by #1587

JoanFM commented 3 years ago

Not solved until hub_builer uses proper image. Right now when opening a PR to hub, the version not yet published is used and thus no jina pip package found

nan-wang commented 3 years ago

The new version is now published. https://github.com/jina-ai/action-hub-builder/releases/tag/v0.8