8000 Use pip freeze to add dependency tracking back to Clipper · Issue #459 · ucbrise/clipper · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Use pip freeze to add dependency tracking back to Clipper #459

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.

< 8000 p class="mt-4 color-fg-muted text-center">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

Open
dcrankshaw opened this issue Apr 4, 2018 · 2 comments
Open

Use pip freeze to add dependency tracking back to Clipper #459

dcrankshaw opened this issue Apr 4, 2018 · 2 comments
Assignees

Comments

@dcrankshaw
Copy link
Contributor

In #435 we removed a feature that automatically tracked down Python package dependencies and installed them in model containers at runtime. The reason to remove the dependency handling was twofold.

  1. The dependency handling relied on Anaconda, and conda was causing a ton of issues in our Docker builds. I decided to remove conda from our Docker containers and just build minimal docker images.
  2. The dependency-crawling part of Clipper admin didn't work very well. It used a semi-private conda interface which was very sensitive to the specific conda version people were running on and therefore kept breaking. Furthermore, when we installed these dependencies at runtime it caused container start times to be really high.

@santi81 suggested that instead of removing the dependency management entirely, we could just use pip freeze instead. This is an excellent idea, and allows us to offer some choice over the behavior to users. Specifically, when users deploy a model, we can let them choose between the following behaviors:

  1. Disabling dependency management and just doing it manually. This is the only supported behavior after Add missing integration tests, clean up dockerfiles, and remove Anaconda dependencies #435 was merged.
  2. Tracking dependencies but only installing them at runtime if there was an import error in the container (and thus keeping image sizes small). This was the default behavior before.
  3. Tracking dependencies and installing them in the container at build time which will increase the image size but should make container start times fast.
@dcrankshaw dcrankshaw added this to the 0.3.0 Release milestone Apr 4, 2018
@dcrankshaw dcrankshaw self-assigned this Apr 4, 2018
@simon-mo
Copy link
Contributor
simon-mo commented Apr 4, 2018

pip freeze outputs whatever user pip install before. It can be a huge list if the user is not in a virtualenv/conda env and involves a lot of unrelated packages. Option 3 needs a clever solution that track the exact packages needed by the user's model.

@dcrankshaw
Copy link
Contributor Author

@simon-mo Yeah that's what the module dependency analyzer attempts to do. But part of the problem with the just-removed existing implementation was that it captured a bunch of spurious packages that weren't needed.

@dcrankshaw dcrankshaw removed this from the 0.3.0 Release milestone Apr 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants
0