Skip to content

ModuleNotFoundError: No module named 'ruamel' error from built image #1110

@chengyu-liu-cs

Description

@chengyu-liu-cs

Hi,
I am using Azureml SDK 1.12.0 and here is a piece of codes for building a docker image.
`

    image_config = ContainerImage.image_configuration(
                runtime='python',
                execution_script='score.py',
                conda_file=conda_score.py)
    self.image = Image.create(workspace=ws,
                name='docker_image',
                models = [model],
                image_config = image_config)

conda_score.ymlname: classification
dependencies:

  • python=3.6.5
  • numpy
  • pip:
    • azureml-sdk==1.12.0
    • scikit-learn==0.20.3
    • joblib==0.14.0
    • azureml-monitoring`

I tried to include ruamel in the pip field. But it seems there was one and not able to uninstall it.

docker run -it -p 8080:80 57836ed046834e498a9bea348e5ded4c.azurecr.io/local-docker-aci:7
2020-08-21T07:54:28,526324600+00:00 - rsyslog/run
2020-08-21T07:54:28,526332300+00:00 - iot-server/run
2020-08-21T07:54:28,526573900+00:00 - gunicorn/run
2020-08-21T07:54:28,535029400+00:00 - nginx/run
EdgeHubConnectionString and IOTEDGE_IOTHUBHOSTNAME are not set. Exiting...
2020-08-21T07:54:28,775029400+00:00 - iot-server/finish 1 0
2020-08-21T07:54:28,776631200+00:00 - Exit code 1 is normal. Not restarting iot-server.
Starting gunicorn 19.6.0
Listening at: http://127.0.0.1:31311 (10)
Using worker: sync
worker timeout is set to 300
Booting worker with pid: 47
Exception in worker process
Traceback (most recent call last):
File "/opt/miniconda/lib/python3.6/site-packages/gunicorn/arbiter.py", line 557, in spawn_worker
worker.init_process()
File "/opt/miniconda/lib/python3.6/site-packages/gunicorn/workers/base.py", line 126, in init_process
self.load_wsgi()
File "/opt/miniconda/lib/python3.6/site-packages/gunicorn/workers/base.py", line 136, in load_wsgi
self.wsgi = self.app.wsgi()
File "/opt/miniconda/lib/python3.6/site-packages/gunicorn/app/base.py", line 67, in wsgi
self.callable = self.load()
File "/opt/miniconda/lib/python3.6/site-packages/gunicorn/app/wsgiapp.py", line 65, in load
return self.load_wsgiapp()
File "/opt/miniconda/lib/python3.6/site-packages/gunicorn/app/wsgiapp.py", line 52, in load_wsgiapp
return util.import_app(self.app_uri)
File "/opt/miniconda/lib/python3.6/site-packages/gunicorn/util.py", line 357, in import_app
import(module)
File "/var/azureml-server/wsgi.py", line 1, in
import create_app
File "/var/azureml-server/create_app.py", line 3, in
from app import main
File "/var/azureml-server/app.py", line 31, in
import main as user_main
File "/var/azureml-app/main.py", line 12, in
driver_module_spec.loader.exec_module(driver_module)
File "/var/azureml-app/score.py", line 7, in
from azureml.core.model import Model
File "/opt/miniconda/lib/python3.6/site-packages/azureml/core/init.py", line 13, in
from .workspace import Workspace
File "/opt/miniconda/lib/python3.6/site-packages/azureml/core/workspace.py", line 34, in
from azureml.core.image import Image
File "/opt/miniconda/lib/python3.6/site-packages/azureml/core/image/init.py", line 28, in
from .image import Image
File "/opt/miniconda/lib/python3.6/site-packages/azureml/core/image/image.py", line 19, in
from azureml.core.model import Model
File "/opt/miniconda/lib/python3.6/site-packages/azureml/core/model.py", line 39, in
from azureml.core.environment import Environment
File "/opt/miniconda/lib/python3.6/site-packages/azureml/core/environment.py", line 31, in
from azureml.core.conda_dependencies import CondaDependencies, PYTHON_DEFAULT_VERSION
File "/opt/miniconda/lib/python3.6/site-packages/azureml/core/conda_dependencies.py", line 11, in
import ruamel.yaml
ModuleNotFoundError: No module named 'ruamel'

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions