Fernando Camargo
03/08/2024, 6:07 PMservice: "src.api.bert_classifier.api:svc"
labels:
owner: delta
project: event-tagging-svc
include:
- "src/**/*.py"
- "src/**/*.yaml"
- "src/**/*.sh"
python:
packages:
- bentoml
- torch
- pytorch-lightning
- torchmetrics
- transformers
- pydantic<2
- dotmap
- nltk
- numpy
- pandas
- scikit-learn
- beautifulsoup4
- lxml
extra_index_url:
- "<https://download.pytorch.org/whl/cu118>"
docker:
base_image: "<http://gcr.io/klue-1265/cuda-miniconda3:cuda119|gcr.io/klue-1265/cuda-miniconda3:cuda119>"
setup_script: "src/api/bert_classifier/setup.sh"
And I have use pipenv to deal with my dependencies. My environment has transformers = "==4.27.3", for example, but the generated requirements.lock.txt contains transformers==4.38.2. I'm building it with:
pipenv run bentoml build -f src/api/bert_classifier/bentofile.yaml
So, I'm sure it's using the correct environment during the build.Chaoyu
03/08/2024, 6:17 PMFernando Camargo
03/08/2024, 6:26 PMpiptools compile. After further investigation, it seems they're not compatible with pipenv.Fernando Camargo
03/08/2024, 6:39 PMpyproject.toml file to exist, while pipenv uses Pipfile instead.Fernando Camargo
03/08/2024, 6:55 PMbentofile.yaml.dhan
03/08/2024, 9:09 PMbentoml build , the resulting bento is very small (~20KB) and apparently it does not have the dependencies. It seems you were able to build bentos with dependencies included. Could you share how you did it? Was it simply configure a bentofile.yaml with dependencies and run `bentoml build`…? Thanks!
python:
packages:
- bentoml
- open_clip_torch
- opencv-pythonChaoyu
03/08/2024, 9:36 PMChaoyu
03/08/2024, 9:38 PMdhan
03/08/2024, 9:40 PMbentoml.batch.run_in_spark , how do I make sure Spark workers have the required dependencies?Chaoyu
03/08/2024, 9:41 PMChaoyu
03/08/2024, 9:43 PMdhan
03/08/2024, 9:45 PMChaoyu
03/08/2024, 9:47 PMdhan
03/08/2024, 9:54 PM