Greetings,
When trying to run the following command:
%sh
mlflow sagemaker build-and-push-container
I get the following error:
/databricks/python3/lib/python3.9/site-packages/click/core.py:2309: UserWarning: Virtualenv support is still experimental and may be changed in a future release without warning.
value = self.callback(ctx, self, value)
2023/06/12 16:22:04 INFO mlflow.models.docker_utils: Building docker image with name mlflow-pyfunc
Traceback (most recent call last):
File "/databricks/python3/bin/mlflow", line 8, in <module>
sys.exit(cli())
File "/databricks/python3/lib/python3.9/site-packages/click/core.py", line 1128, in __call__
return self.main(*args, **kwargs)
File "/databricks/python3/lib/python3.9/site-packages/click/core.py", line 1053, in main
rv = self.invoke(ctx)
File "/databricks/python3/lib/python3.9/site-packages/click/core.py", line 1659, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/databricks/python3/lib/python3.9/site-packages/click/core.py", line 1659, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/databricks/python3/lib/python3.9/site-packages/click/core.py", line 1395, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/databricks/python3/lib/python3.9/site-packages/click/core.py", line 754, in invoke
return __callback(*args, **kwargs)
File "/databricks/python3/lib/python3.9/site-packages/mlflow/sagemaker/cli.py", line 605, in build_and_push_container
mlflow.models.docker_utils._build_image(
File "/databricks/python3/lib/python3.9/site-packages/mlflow/models/docker_utils.py", line 224, in _build_image
_build_image_from_context(context_dir=cwd, image_name=image_name)
File "/databricks/python3/lib/python3.9/site-packages/mlflow/models/docker_utils.py", line 228, in _build_image_from_context
import docker
ModuleNotFoundError: No module named 'docker'
I installed docker by running the following command:
%pip install docker
But the error still persists. Please note that I am running the above code in a Databricks notebook.
Using the UI, I have also tried installing docker from Databricks' built-in package manager -- again to no avail.
Could I please get some assistance figuring this out?