1

I'm currently trying to create a TensorFlow estimator to run Ludwig's training model on Azure ML Compute with various pip and conda packages like so:

estimator= TensorFlow(source_directory= project_folder,
compute_target=compute_target, script_params=script_params, 
entry_script='./train.py', pip_packages=dependencies, conda_packages = 
["tensorflow"], use_gpu =True)

One of the pip packages is gmpy, but it will not install and throws an error: fatal error: gmp.h: No such file or directory compilation terminated. error: command 'gcc' failed with exit status 1.

This prevents Ludwig from installing and causes the imagine to fail to build

When I run Ludwig locally in a python virtual environment on Ubuntu, I'm able to work around this issue by running “sudo apt-get install libgmp3-dev” instead of pip install gmpy. When I try adding Gmpy2 as a library to the estimator, it throws the same error, and it seems that libgmp3-dev doesn't have a pip or conda equivalent. I tried adding the gmpy and gmpy2 .whl files directly to the environment but the wheel files were not recognized as compatible.

Is there some way to add RUN sudo apt-get install libgmp3-dev to the dockerfile so that the docker container made by the estimator has this already installed without needing to create a custom dockerfile? I noticed that the TensorFlow estimator class has an "environment_definition" flag that can take a DockerSection but I can't find any examples of how they work.

JoSSte
  • 2,953
  • 6
  • 34
  • 54
dedimi
  • 11
  • 3

1 Answers1

0

Looks like they have gmpy2 on conda-forge channel https://anaconda.org/conda-forge/gmpy2

you can also should be able to reference dependency from @ git

vizhur
  • 467
  • 3
  • 7