pai icon indicating copy to clipboard operation
pai copied to clipboard

kubernetes cannot be installed

Open Michellechen78 opened this issue 8 years ago • 44 comments

Environment: gpu:tesla v100 cpu::Intel(R) Xeon(R) CPU E5-2690 v4 @ 2.60GHz Ubuntu 16.04.5

Followed this (https://github.com/Microsoft/pai) procedure,docker image still old version. Then we get other url https://www.cnblogs.com/ms-uap/p/openpai_or_pai.html but the kubernetes cannot be innstalled. when we run "python paictl.py cluster k8s-bootup -p $CONFIG_PATH" the procedure quite and windows closed. We are trapped here. Pls help us fix this issue.

Michellechen78 avatar Oct 18 '18 02:10 Michellechen78

the screenshots as follows: 1

2

3

4

5

6

Michellechen78 avatar Oct 18 '18 02:10 Michellechen78

@Michellechen78 Did you deploy pai on a single-box mode? And the Dev-box is in the same host machine where you wanna deploy pai?

ydye avatar Oct 18 '18 02:10 ydye

@Michellechen78 Did you deploy pai on a single-box mode? And the Dev-box is in the same host machine where you wanna deploy pai?

yes

NothingLZ avatar Oct 18 '18 02:10 NothingLZ

@ydye yes single mode and the same host

Michellechen78 avatar Oct 18 '18 02:10 Michellechen78

Sorry for the inconvenient, that's a known issue for dev-box. Because when deploying kubernetes, paictl will try to enable log-rotation feature for docker-daemon to avoid the large usage of contianer's log. So we will re-start the docker-daemon on the target node to enable the configuration. So when dev-box is in the environment, it will be stopped due to the restart of docker-d.

Here is the solution to walk around this issue when deploy single-box. And here is another issue with the same problem.

Solution

Clone pai's repo on the local host (Don't use dev-box). And install the dependency package. Then use paictl on the host environment.

apt-get -y update && \
apt-get -y install \
      nano \
      vim \
      joe \
      wget \
      curl \
      jq \
      gawk \
      psmisc \
      python \
      python-yaml \
      python-jinja2 \
      python-paramiko \
      python-urllib3 \
      python-tz \
      python-nose \
      python-prettytable \
      python-netifaces \
      python-dev \
      python-pip \
      python-mysqldb \
      openssh-server \
      openssh-client \
      git \
      bash-completion \
      inotify-tools \
      rsync \
      realpath \
      net-tools && \
    mkdir -p /cluster-configuration &&\
    pip install python-etcd docker kubernetes GitPython

ydye avatar Oct 18 '18 02:10 ydye

And by the way, now, we have a public registry to provide the latest released serivce's image, and user do not need building image by themselves. https://github.com/Microsoft/pai/blob/master/docs/pai-management/doc/how-to-write-pai-configuration.md#services_configuration

ydye avatar Oct 18 '18 02:10 ydye

Yes, Cpu node shoud be master, and the Gpu node shoud be work. And one thing important is that don't run the dev-box in your OpenPai cluster, or you will occurs the issue this time again due to the restart of docker-daemon.

ydye avatar Oct 18 '18 03:10 ydye

Yes, Cpu node shoud be master, and the Gpu node shoud be work. And one thing important is that don't run the dev-box in your OpenPai cluster, or you will occurs the issue this time again due to the restart of docker-daemon.

Pull a ubuntu:16.04 docker image and create a ubuntu:16.04 container,then clone pai in the / directory. Upgrade the following software before this. apt-get -y update && apt-get -y install nano vim joe wget curl jq gawk psmisc python python-yaml python-jinja2 python-paramiko python-urllib3 python-tz python-nose python-prettytable python-netifaces python-dev python-pip python-mysqldb openssh-server openssh-client git bash-completion inotify-tools rsync realpath net-tools && mkdir -p /cluster-configuration && pip install python-etcd docker kubernetes GitPython

NothingLZ avatar Oct 18 '18 03:10 NothingLZ

If you wanna deploy OpenPai in a host which belongs to the OpenPai cluster. Please don't do any operate in a docker container, because it will be stopped when restarting docker-d. And your deployment will be failed. You should install the dependency package on the local environment of that host, and then follow the steps to install OpenPai.

ydye avatar Oct 18 '18 03:10 ydye

Yes, Cpu node shoud be master, and the Gpu node shoud be work. And one thing important is that don't run the dev-box in your OpenPai cluster, or you will occurs the issue this time again due to the restart of docker-daemon.

Do GPU nodes need to deploy the hadoopAI environment in advance? Is it necessary to install cuda and cudnn?

NothingLZ avatar Oct 18 '18 07:10 NothingLZ

@NothingLZ Little confused about your question. Are there 2 different question? And for the questions

Is it necessary to install cuda and cudnn?

The answer is no. Please don't install any nvidia drivers on the gpu machine. Paictl will start the drivers one shot service to do it.

And for the question

Do GPU nodes need to deploy the hadoopAI environment in advance? 

I think the environment of hadoopAI can be setup by paictl.

ydye avatar Oct 18 '18 09:10 ydye

@NothingLZ Little confused about your question. Are there 2 different question? And for the questions

Is it necessary to install cuda and cudnn?

The answer is no. Please don't install any nvidia drivers on the gpu machine. Paictl will start the drivers one shot service to do it.

And for the question

Do GPU nodes need to deploy the hadoopAI environment in advance? 

I think the environment of hadoopAI can be setup by paictl.

Step 1: Follow https://github.com/Microsoft/pai/blob/master/src/dev-box/build/dev-box.dockerfile Step 2: Follow https://github.com/Microsoft/pai/blob/master/docs/pai-management/doc/cluster-bootup.md#singlebox

NothingLZ avatar Oct 18 '18 10:10 NothingLZ

@NothingLZ Little confused about your question. Are there 2 different question? And for the questions

Is it necessary to install cuda and cudnn?

The answer is no. Please don't install any nvidia drivers on the gpu machine. Paictl will start the drivers one shot service to do it.

And for the question

Do GPU nodes need to deploy the hadoopAI environment in advance? 

I think the environment of hadoopAI can be setup by paictl.

My previous hadoopAI environment was built according to https://github.com/Microsoft/pai/tree/master/src/hadoop-ai/build. I don't know how to build it with paictl?

NothingLZ avatar Oct 18 '18 10:10 NothingLZ

With the latest release, you could build all OpenPai's service with the tool pai-build. Please refer to this link.

ydye avatar Oct 18 '18 12:10 ydye

root@mic:/home/pai/build# ./pai_build.py build -c /path/to/configuration-dir/ 2018-10-19 11:53:24,664 - main - INFO - Pai build starts at 2018-10-19 11:53:24.663910 2018-10-19 11:53:24,689 - core.build_utility - INFO - Begin to execute the command: docker login -u None -p None docker.io Error response from daemon: Get https://registry-1.docker.io/v2/: unauthorized: incorrect username or password 2018-10-19 11:53:31,596 - core.build_utility - INFO - Executing command failed: docker login -u None -p None docker.io

Is it necessary to configure username and password?

NothingLZ avatar Oct 19 '18 03:10 NothingLZ

Yes, you should configure password and username, if the registry has those configuration.

And you can also use the image we published. If you choose this solution, you can skip build progress.

docker-registry-info:
  - docker-namespace: openpai
  - docker-registry-domain: docker.io
  #- docker-username: <n/a>
  #- docker-password: <n/a>
  - docker-tag: latest # or a specific version, i.e. 0.5.0.
  - secret-name: <anything>

ydye avatar Oct 19 '18 06:10 ydye

Sorry, I didn't figure it out. Is your image hosted in hub.docker.com? So what is the image name? Can I pull it directly?

NothingLZ avatar Oct 19 '18 09:10 NothingLZ

In this registry. And if you wanna deploy OpenPai to your host, you can follow this doc

ydye avatar Oct 22 '18 02:10 ydye

You can configure the corresponding properties in your service-configuration.yaml as following.

docker-registry-info:
  - docker-namespace: openpai
  - docker-registry-domain: docker.io
  - docker-tag: latest # or a specific version, i.e. 0.5.0.
  - secret-name: <anything>

And then, beging at this steps.

ydye avatar Oct 22 '18 02:10 ydye

I tried to build the pai locally, but there was an error in the process.

WARNING: No swap limit support Docker ROOT DIR IS /var/lib/docker Unable to find image 'gcr.io/google_containers/hyperkube:v1.9.9' locally gcr.io/google_containers/hyperkube:v1.9.9docker: Error response from daemon: Get https://gcr.io/v1/_ping: dial tcp 74.125.203.82:443: i/o timeout. See 'docker run --help'.

NothingLZ avatar Oct 22 '18 08:10 NothingLZ