0

Could you please help me with running python script in azureml environment? I created the workspace and azure container registry and pushed docker image to the container. This is the example of dockerfile:

FROM python:3.7

RUN pip install --upgrade pip

RUN pip install virtualenv

ENV VIRTUAL_ENV=/venv

RUN virtualenv venv -p python3

ENV PATH="VIRTUAL_ENV/bin:$PATH"

WORKDIR /app

ADD . /app

ENV PYTHON_PACKAGES="\
numpy \
pandas \
seaborn \
matplotlib \
sklearn \
scipy \
imbalanced-learn \
xgboost \
joblib \
" 

RUN pip install --no-cache-dir $PYTHON_PACKAGES

ENTRYPOINT ["python3","train.py"]

I created environment like this: myenv = Environment.from_pip_requirements(name = ws.get_details()['name'],file_path = "requirements.txt")

When I run the experiment I get this error:

"Message": "AzureMLCompute job failed.\nJobContainerConfigFailed: Container configuration failed unexpectedly\n\tJobContainerConfigFailed: Container configuration failed unexpectedly\n\terr: container setup task failed: exit status 1\n\tReason: container setup task failed: exit status 1\n\tInfo: Failed to prepare an environment for the job execution: Job environment preparation failed on 10.0.0.5 with err exit status 1."

I do not understand what this error mean.

I configure and submit training job with following:

    src = ScriptRunConfig(source_directory='.',
                        script='train.py',
                        compute_target=cpu_cluster,
                        environment=myenv)
    
    #Submit training job
    run = Experiment(ws,'test-classification').submit(src)
    run.wait_for_completion(show_output=True)

Thank you!

4

0 回答 0