MLOpsPython
MLOpsPython copied to clipboard
The property "environment.docker.base_dockerfile" is not passed through correctly in pipeline jobs
There seem to be a bug on the AML Pipeline side if a custom dockerfile is used. The runconfig
property environment.docker.base_dockerfile
is not being passed through correctly in pipeline jobs (for PythonScriptStep
).
Is there any workaround, excluding building the docker image and specifying it with environment.docker.base_image
?
This is the code snippet:
myenv.docker.enabled = True
with open("./ml_service/pipelines/build_env/DockerFile", "r") as f:
dockerfile_contents_of_base_image=f.read()
myenv.docker.base_dockerfile=dockerfile_contents_of_base_image
run_config = RunConfiguration()
run_config.environment = myenv
train_step = PythonScriptStep(
name="Test",
script_name=e.train_script_path,
compute_target=aml_compute,
source_directory=e.sources_directory_train,
runconfig=run_config,
inputs=[model_path],
arguments=[…],
allow_reuse=False
)
I tried adding myenv.docker.base_image = None
, but it didn't help.
@LianaN based on the above-shared code snippet it looks perfect. However, I don't see the content of your docker file, if you can please share the docker file and error logs for further troubleshooting? Also, how do you verify that the submitted image is been used ? do you see a new image create in the ACR instance attached to your Azure Machine Learning workspace?