This message was deleted.
# ask-for-help
s
This message was deleted.
s
are u using virtual environments? Looks like u just need to install the dependency sklearn by hitting
pip install sklearn
s
yes I'm on an anaconda virtual env, but sklearn is already installed in the env before containerize the model into image, it can ran bentoml serve service:svc
Requirement already satisfied: sklearn in c:\users\husad\.conda\envs\ml-zoomcamp\lib\site-packages (0.0)
Requirement already satisfied: scikit-learn in c:\users\husad\.conda\envs\ml-zoomcamp\lib\site-packages (from sklearn) (1.1.2)
Requirement already satisfied: joblib>=1.0.0 in c:\users\husad\.conda\envs\ml-zoomcamp\lib\site-packages (from scikit-learn->sklearn) (1.2.0)
Requirement already satisfied: numpy>=1.17.3 in c:\users\husad\.conda\envs\ml-zoomcamp\lib\site-packages (from scikit-learn->sklearn) (1.21.5)
Requirement already satisfied: scipy>=1.3.2 in c:\users\husad\.conda\envs\ml-zoomcamp\lib\site-packages (from scikit-learn->sklearn) (1.9.1)
Requirement already satisfied: threadpoolctl>=2.0.0 in c:\users\husad\.conda\envs\ml-zoomcamp\lib\site-packages (from scikit-learn->sklearn) (3.1.0)
So I tried to redo the process in another sub environment with pipenv. But it's still failing:
Copy code
Successfully built Bento(tag="garment_productivity_model:fpq4fu26yskhtxcb").

(ml-zoomcamp) C:\Users\husad\Python_Notebook\ML_ZOOMCAMP\MidtermProject_Garment>pipenv run bentoml containerize garment_productivity_model:fpq4fu26yskhtxcb
Usage of buildx:
      --builder string
Building docker image for garment_productivity_model:fpq4fu26yskhtxcb
Successfully built docker image for "garment_productivity_model:fpq4fu26yskhtxcb" with tags "garment_productivity_model:fpq4fu26yskhtxcb"
To run your newly built Bento container, pass "garment_productivity_model:fpq4fu26yskhtxcb" to "docker run". For example: "docker run -it --rm -p 3000:3000 garment_productivity_model:fpq4fu26yskhtxcb serve --production".

(ml-zoomcamp) C:\Users\husad\Python_Notebook\ML_ZOOMCAMP\MidtermProject_Garment>pipenv run docker run -it --rm -p 3000:3000 garment_productivity_model:fpq4fu26yskhtxcb serve --production
Error: [bentoml-cli] `serve` failed: scikit-learn is required in order to use the module 'bentoml.sklearn', install sklearn with 'pip install sklearn'. For more information, refer to <https://scikit-learn.org/stable/install.html>

(ml-zoomcamp) C:\Users\husad\Python_Notebook\ML_ZOOMCAMP\MidtermProject_Garment>pipenv run pip install sklearn
Requirement already satisfied: sklearn in c:\users\husad\.virtualenvs\midtermproject_garment-akbjvtmz\lib\site-packages (0.0.post1)

(ml-zoomcamp) C:\Users\husad\Python_Notebook\ML_ZOOMCAMP\MidtermProject_Garment>
a
Hi there, when you built the image, can you send your bentofile.yaml here?