MachineLearningNotebooks icon indicating copy to clipboard operation
MachineLearningNotebooks copied to clipboard

Image creation on AlmCompute fails with "unable to execute 'gcc': No such file or directory"

Open ksiomelo opened this issue 7 years ago • 3 comments

I created a new AlmCompute with azureml-sdk ==1.0.39 and the image creation is failing. The same code used to work for 1.0.33. Any advice?

Logs:

...
  creating build/temp.linux-x86_64-3.6/shap
  gcc -pthread -B /opt/miniconda/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/opt/miniconda/include/python3.6m -I/opt/miniconda/lib/python3.6/site-packages/numpy/core/include -c shap/_cext.cc -o build/temp.linux-x86_64-3.6/shap/_cext.o
  unable to execute 'gcc': No such file or directory
  error: command 'gcc' failed with exit status 1
  ----------------------------------------
  ERROR: Failed building wheel for shap

I see a TSG on the page below, however it is not clear what to do when the target is AlmCompute.

https://github.com/Azure/MachineLearningNotebooks/blob/60158bf41a3eac6b0bf2089928f5778ae585b9b8/how-to-use-azureml/automated-machine-learning/README.md

Relevant code below.

Run configuration for AlmCompute:

        # create a new RunConfig object
        self.runConfiguration = RunConfiguration(framework="python")

        # Set compute target to AmlCompute target created in previous step
        self.runConfiguration.target = target_name

        # enable Docker 
        self.runConfiguration.environment.docker.enabled = True

        # specify CondaDependencies obj
        self.runConfiguration.environment.python.conda_dependencies = CondaDependencies(conda_dependencies_file_path="conda_dependencies.yml")

image configuration:

image_config = ContainerImage.image_configuration(execution_script = "lead_time_score.py",
                                                  runtime = "python",
                                                  conda_file = "conda_dependencies.yml",
                                                  description = "Image with lead time model",
                                                  tags = {'area': "lead time", 'type': "regression"}
                                                 )

Conda dependencies file:


name: azure_automl
dependencies:
- python=3.6.2
- nb_conda
- matplotlib==2.1.0
- numpy>=1.11.0,<=1.16.2
- urllib3<1.24
- scipy>=1.0.0,<=1.1.0
- scikit-learn>=0.19.0,<=0.20.3
- pandas>=0.22.0,<0.23.0
- py-xgboost<=0.80

- pip:
  - azureml-sdk[automl,explain]==1.0.39
  - azureml-widgets
  - pandas_ml

ksiomelo avatar May 17 '19 23:05 ksiomelo

It turns out some of the dependencies in the conda_dependencies.yml above require gcc which is not present in the container. I created another conda dependencies specific for scoring which has fewer dependencies that do not require gcc:

conda_dependencies_scoring.yml

name: azure_automl
dependencies:
  - python=3.6.2
  - pip:
    - azureml-defaults
    - scikit-learn
    - numpy
    - inference-schema[numpy-support]

ksiomelo avatar May 21 '19 04:05 ksiomelo

@ksiomelo looks like you've resolved the error. Is it ok to close the issue or do you need other help?

ayuwhu avatar Jul 22 '19 21:07 ayuwhu

Thanks for your report. We shall proceed to close this issue, #please-close. If you feel that your issue has not been resolved please reopen the issue and provide additional context.

j-martens avatar Jul 27 '19 00:07 j-martens