cortexlabs / cortex

Production infrastructure for machine learning at scale
https://cortexlabs.com/
Apache License 2.0
8.01k stars 606 forks source link

If predictor had dependencies, how to add those dependency #1838

Closed la0216 closed 3 years ago

la0216 commented 3 years ago

This tool is really nice tool. I'm new of this tool, one basic question is that when I deploy one real-time API, how can add those dependencies if my predictor will need other source code? For example, I want to deploy Wav2lip model (https://github.com/Rudrabha/Wav2Lip) for large scale inference. It will depends on other codes? Can I package one new docker images and use that images which includes dependency? Then I develop one new predictor and parse the input which needed for inference.

python inference.py --checkpoint_path --face --audio

https://github.com/dorkforces/Wav2lip

Thanks Ron

RobertLucian commented 3 years ago

@dorkforcesron you have a few ways of customizing your API.

  1. For installing Python dependencies with pip or conda, check out this page.
  2. For installing generic system packages, check out this.
  3. For creating your own image using ours as a base, check out this. For this, we recommend using the slim images.
la0216 commented 3 years ago

@RobertLucian Appreciate your quick response, I will try it on my side.