pai icon indicating copy to clipboard operation
pai copied to clipboard

Environment check error

Open mtzfei opened this issue 6 years ago • 13 comments

Organization Name:

Short summary about the issue/question: run “/bin/bash requirement.sh -m /home/ouc/master.csv -w /home/ouc/worker.csv -c /home/ouc/config” 1 /etc/docker/daemon.json 2 Successfully run “docker run nvidia/cuda:10.0-base nvidia-smi”

Brief what process you are following:

How to reproduce it:

OpenPAI Environment:

  • OpenPAI version:v1.0.0
  • Cloud provider or hardware configuration:
  • OS (e.g. from /etc/os-release):
  • Kernel (e.g. uname -a):
  • Hardware (e.g. core number, memory size, storage size, GPU type etc.):
  • Others:

Anything else we need to know:

mtzfei avatar May 25 '20 13:05 mtzfei

pls try this command https://github.com/microsoft/pai/blob/master/contrib/kubespray/roles/requirement/worker/tasks/ubuntu-nvidia.yml#L37

ydye avatar May 26 '20 02:05 ydye

请尝试使用此命令 https://github.com/microsoft/pai/blob/master/contrib/kubespray/roles/requirement/worker/tasks/ubuntu-nvidia.yml#L37

image ouc@gu2:~$ command -v nvidia-container-runtime /usr/bin/nvidia-container-runtime

mtzfei avatar May 26 '20 02:05 mtzfei

And then try this https://github.com/microsoft/pai/blob/master/contrib/kubespray/roles/requirement/worker/tasks/ubuntu-docker.yml#L20

ydye avatar May 26 '20 02:05 ydye

And then try this https://github.com/microsoft/pai/blob/master/contrib/kubespray/roles/requirement/worker/tasks/ubuntu-docker.yml#L20

ouc@gu2:~$ sudo docker info -f '{{json .DefaultRuntime}}' [sudo] password for ouc: "nvidia" ouc@gu2:~$ image

mtzfei avatar May 26 '20 02:05 mtzfei

After this line https://github.com/microsoft/pai/blob/master/contrib/kubespray/roles/requirement/worker/tasks/ubuntu-docker.yml#L30

pls add the following source code

 - debug:
      var: default_runtime
 - debug:
      var: default_runtime_processed
 - debug:
      var: worker_default_docker_runtime

And try to execute the environment playbooks to get the output.

ydye avatar May 26 '20 03:05 ydye

output like:

TASK [requirement/worker : debug] **************************************************************************************
ok: [pai-worker3] => {
    "default_runtime": {
        "changed": false,
        "failed": false,
        "failed_when_result": false,
        "rc": 0,
        "stderr": "Shared connection to 192.168.50.128 closed.\r\n",
        "stderr_lines": [
            "Shared connection to 192.168.50.128 closed."
        ],
        "stdout": "\r\n\"nvidia\"\r\n",
        "stdout_lines": [
            "",
            "\"nvidia\""
        ]
    }
}

TASK [requirement/worker : debug] **************************************************************************************
ok: [pai-worker3] => {
    "default_runtime_processed": ""
}

TASK [requirement/worker : debug] **************************************************************************************
ok: [pai-worker3] => {
    "worker_default_docker_runtime": "nvidia"
}

TASK [requirement/worker : Check the default runtime is set correctly] *************************************************
fatal: [pai-worker3]: FAILED! => {"changed": false, "msg": "The default runtime is not set correctly"}
	to retry, use: --limit @/home/kingcyk/pai/contrib/kubespray/environment-check.retry

k1ngcyk avatar May 26 '20 05:05 k1ngcyk

"stdout_lines": [
            "",
            "\"nvidia\""
]


"default_runtime_processed": ""

Thanks for sharing the output. The issue is caused by that default_runtime_processed is assiged with default_runtime.stdout_lines[0]. However this value in your case is empty.

ydye avatar May 26 '20 07:05 ydye

That's the point and I modify .stdout_lines[0] to .stdout_lines[1] manually solve the issue in my case. Don't know why it is different.

k1ngcyk avatar May 26 '20 08:05 k1ngcyk

@mtzfei would you mind share your Org's name? we are clustering issues with org names to better manage issues.

scarlett2018 avatar Jun 01 '20 05:06 scarlett2018

@mtzfei would you mind share your Org's name? we are clustering issues with org names to better manage issues.

qingdaoxinuozhineng,thanks

mtzfei avatar Jun 01 '20 10:06 mtzfei

This also happens to me. Did you successfully install the OpenPAI after changing .stdout_lines[0] to .stdout_lines[1]? Thanks.

qingdo avatar Jul 08 '20 00:07 qingdo

@qingdo

  • wheather your default docker runtime is nvidia or not
  • Debug your env based on this link https://github.com/microsoft/pai/issues/4564#issuecomment-633782813,

ydye avatar Jul 08 '20 02:07 ydye

Hi, I encountered exactly the same problem with @k1ngcyk I changed .stdout_lines[0] to .stdout_lines[1] in the YAML file and successfully set up the entire system. The system is up running now. I am not sure why this happens or if this is a common issue. But anyway, this helped me out.
Thanks for the help.

qingdo avatar Jul 08 '20 06:07 qingdo