caicloud / ciao

Kernel for Kubeflow in Jupyter Notebook
Apache License 2.0
67 stars 18 forks source link

About path {kubeconfig} in docker run {kubeconfig} :{kubeconfig} #76

Closed Eric-Zhang1990 closed 5 years ago

Eric-Zhang1990 commented 5 years ago

@gaocegege Hi, I want to know what path I should set for command "docker run -v {kubeconfig}:{kubeconfig} -p 8889:8889 caicloud/ciao". The image I have built, but when I run it, it shows following logs (in logs.txt file) logs.txt Can you help me see the error? Thank you.

gaocegege commented 5 years ago

@Eric-Zhang1990 Which Docker image are you using? You need to define a kubeconfig in yaml just like https://github.com/caicloud/ciao/blob/master/hack/config.yaml#L1

Then you can run docker run -v {kubeconfig in your host}:/var/run/kubernetes/admin.kubeconfig. The /var/run/kubernetes/admin.kubeconfig is defined in your yaml https://github.com/caicloud/ciao/blob/master/hack/config.yaml#L1

gaocegege commented 5 years ago

Does it solve your problem? In summary, you need copy a config yaml to the image and define the path to kubeconfig, then you could run docker run {kubeconfig in your host}:{kubefig defined in your config yaml}

Eric-Zhang1990 commented 5 years ago

@gaocegege The Docker image I used is caicloud/ciao:latest that I run command "docker build -t caicloud/ciao ." to build. I set /var/run/kubernetes/admin.kubeconfig in config.yaml and change the namespaces to "kubeflow", when I run " docker run -v /etc/kubernetes/admin.conf:/var/run/kubernetes/admin.kubeconfig -p 8889:8889 caicloud/ciao", but I don't know wheather path "/etc/kubernetes/admin.conf" is right or not (beacuse I can find kubernetes in /etc).

What do your {kubeconfig in your host} like? Thank you.

Eric-Zhang1990 commented 5 years ago

@gaocegege Just now I change the Dockerfile: change "COPY ./hack/k8s.config.yaml /etc/ciao/config.yaml" into "COPY ./hack/config.yaml /etc/ciao/config.yaml", my "./hack/config.yaml" is like this: kubeconfig: /var/run/kubernetes/admin.kubeconfig namespace: kubeflow s2i: provider: configmap Now the logs is different from what I ask at first time. Now it looks like this: logs_2.txt

Can you help me see the error? Thank you.

gaocegege commented 5 years ago

zmq4 was installed with ZeroMQ version 4.3.1, but the application links with version 4.2.5

Your zmq4 does not match.

Eric-Zhang1990 commented 5 years ago

@gaocegege Is ZeroMQ version 4.3.1 installed in Docker image? And "the application links with version 4.2.5" is installed in my Pc? How can I install ZeroMQ version 4.2.5 in the Docker image? Thank you.

gaocegege commented 5 years ago

I haven't tried it. I used 4.2.5 in my test env. Maybe I can take a look next week.

Eric-Zhang1990 commented 5 years ago

@gaocegege You mean you have zmq 4.2.5 in your Docker image, right? Can you give me your Docker image to me, let me try it. Because I just reinstall libamq3-dev and it is the newest version 4.2.5. 深度截图_选择区域_20190718154353

gaocegege commented 5 years ago

Sorry I misunderstand it. I am using 4.3.1 locally, not 4.2.5 in Docker image.

gaocegege commented 5 years ago

But I can reproduce your problem. Now we use apt-get install zmq, it will be 4.2.5. I will take a look next week.

gaocegege commented 5 years ago

/type bug

Eric-Zhang1990 commented 5 years ago

@gaocegege Ok, thank you.

gaocegege commented 5 years ago

@Eric-Zhang1990 If you want to have a try, you can run it locally. Then you will not meet the problem.

Eric-Zhang1990 commented 5 years ago

@gaocegege I can not run it locally, I have tried it. After I follow the steps, when I run jupyter notebook, it just run jupyter notebook, I mean it does not relate to kubeflow and k8s.

gaocegege commented 5 years ago

@Eric-Zhang1990 Did you run

Run the script hack/install.sh, then the specification of the kernel will be installed to ${HOME}/.local/share/jupyter/kernels/kubeflow, then Jupyter will know the information about Ciao.

gaocegege commented 5 years ago

You need to install the kernel spec locally, then run jupyter notebook. Thus the notebook can find the new kernel.

Eric-Zhang1990 commented 5 years ago

@gaocegege Yeap, I deploy it following all steps you provide. I can try it again.

gaocegege commented 5 years ago

Yeah, if you cannot find the kernel in jupyter notebook, please let me know.

BTW, are you using virtualenv or conda?

Eric-Zhang1990 commented 5 years ago

I use the system python env

Eric-Zhang1990 commented 5 years ago

I should use conda?

gaocegege commented 5 years ago

No, system python is better.

Eric-Zhang1990 commented 5 years ago

Ok, I will try it later. Thanks.

gaocegege commented 5 years ago

@Eric-Zhang1990 OK, if you have any problem, feel free to ask me here. I am glad to help you

Eric-Zhang1990 commented 5 years ago

@gaocegege Hi, do you know how to install customed zmq version we want to install in Docker image and our own local Pc, thank you.

gaocegege commented 5 years ago

https://github.com/zeromq/libzmq/releases

Eric-Zhang1990 commented 5 years ago

@gaocegege I have autoremove libzmq3-dev and libzmq5, but the error "zmq4 was installed with ZeroMQ version 4.3.1, but the application links with version 4.2.5" still appears, how can I solve it? thank you.

gaocegege commented 5 years ago

@Eric-Zhang1990 Can you run kernel gateway without the zmq?

I think it should return an error when you run it. I will take a look.

Are you doing the feasibility research on ciao?

Eric-Zhang1990 commented 5 years ago

@gaocegege We want to use ciao for our distributed training on k8s.

Eric-Zhang1990 commented 5 years ago

@gaocegege I run it using Dockerized Kernel, you mean I run it using Native?

Eric-Zhang1990 commented 5 years ago

@gaocegege You say "Can you run kernel gateway without the zmq?", how can I run kernel gateway without the zmq? which is related to "Jupyter Notebook Extension to Kernel Gateway (nb2kg) is used to communicate with the kernel in the docker image"?

gaocegege commented 5 years ago

@Eric-Zhang1990 I sent my wechat ID to your gmail. You can add me in wechat then we can contact closely.

Eric-Zhang1990 commented 5 years ago

@gaocegege I check my gmail, I do not recive your eamil, my gmail is "shifengzhang1990@gmail.com"

gaocegege commented 5 years ago

@Eric-Zhang1990 Sent again, please double-check.

Eric-Zhang1990 commented 5 years ago

@gaocegege Sorry, I do not receive your eamil, I check it many times, can you give me your eamil, I send my wechat ID to you.

Eric-Zhang1990 commented 5 years ago

Ok.