Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make milvus-lite a optional dependency #2603

Closed
wants to merge 1 commit into from

Conversation

SuperSecureHuman
Copy link

Right now, milvus lite is a required dependency. When trying to use it under docker, milvus-lite alone uses ~150MB.

This space is mostly unwanted if we dont use local DB (using localdb is unlikely in docker deployments)

@sre-ci-robot sre-ci-robot requested a review from czs007 January 29, 2025 17:29
@sre-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: SuperSecureHuman
To complete the pull request process, please assign longjiquan after the PR has been reviewed.
You can assign the PR to them by writing /assign @longjiquan in a comment when ready.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@sre-ci-robot
Copy link

Welcome @SuperSecureHuman! It looks like this is your first PR to milvus-io/pymilvus 🎉

@XuanYang-cn
Copy link
Contributor

@SuperSecureHuman Usually a system can run Milvus cluster or Milvus standalone is able to host ~200MB of PyMilvus, cuz 200MB is nothing comparing to Milvus. Also, if resources are limited, Milvus-lite is the best choice.

So why are you using Milvus but concerning PyMilvus disk usage? Also mounting volumes might be a solution to use milvus-lite inside a docker.

@XuanYang-cn XuanYang-cn added the wontfix This will not be worked on label Feb 5, 2025
@SuperSecureHuman
Copy link
Author

SuperSecureHuman commented Feb 5, 2025

It's when using pymilvus connect to an existing cluster..

The node does not run milvus, rather connects to milvus.

Edit: This will help to speedup image builds, and reduce image sizes, helping with deployment times (especially when the application is on autoscaling)

@XuanYang-cn
Copy link
Contributor

@SuperSecureHuman Hi, THX for the reply. We want milvus-lite to be part of PyMilvus by default so I labelled this PR wontfix. In this case I suggest you to clone pymilvus repo and use your own build of it if you insist, it's quiet easy for python:

  1. fork and remove the milvus-lite requirement
  2. git clone your pymilvus repo in docker
  3. just run pip install -e . or make install at the project root

OR, a even simpler choice:

  1. fork and remove the milvus-lite requirement in your own repo
  2. install from remote resource with this command: pip install git+ssh://github.com/{YOUR-REPO}/pymilvus.git@master

@XuanYang-cn
Copy link
Contributor

BTW you could try this in your Dockerfile: pip install git+ssh://github.com/SuperSecureHuman/pymilvus.git@master

@SuperSecureHuman
Copy link
Author

Hi,

So the current workaround that I am doing is, installing pymilvus without deps, and installing the needed deps manually.. In our case, this alone gives us the required result (and ~20% reduction in image size)

You may close the issue if needed, this can be a suggested way if someone wants to setup their minimal docker images.

@XuanYang-cn
Copy link
Contributor

Thanks for the contribution anyway!

@XuanYang-cn XuanYang-cn closed this Feb 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dco-passed size/S wontfix This will not be worked on
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants