Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support setting password for jupyter notebook #787

Closed
HelloJeremy opened this issue Nov 1, 2022 · 12 comments
Closed

support setting password for jupyter notebook #787

HelloJeremy opened this issue Nov 1, 2022 · 12 comments
Assignees
Labels
kind/requirement New feature requirement.
Milestone

Comments

@HelloJeremy
Copy link

HelloJeremy commented Nov 1, 2022

通过docker-compose部署kubeFATE,怎么设置浏览器访问 jupyter notebook(http://ip:20000)的登录密码
如果jupyter notebook没有访问密码,jupyter notebook会有安全漏洞

@n063h
Copy link
Collaborator

n063h commented Nov 2, 2022

通过docker-compose部署kubeFATE,怎么设置浏览器访问 jupyter notebook(http://ip:20000)的登录密码 如果jupyter notebook没有访问密码,jupyter notebook会有安全漏洞

@HelloJeremy We have no such proposal at present, you can manage it manually by

  1. enter the client container.
  2. generate a hashed passwd {P} by from notebook.auth import passwd;passwd()" with python.
  3. ps -aux | grep jupyter to find the args to start the jupyter notebook server.
  4. kill the process and rerun the command with replaced --NotebookApp.password={P}

We will appreciate it if you're interested in it and propose a pr to the issue.

@HelloJeremy
Copy link
Author

@n063h Jupyter notebook port is 20000,Killing jupyter process triggers client container restart .So this doesn't solve my problem

@HelloJeremy
Copy link
Author

@n063h Can NotebookApp.password be designed to be configurable? For example, NotebookApp.password can be specified in parties.conf

@n063h
Copy link
Collaborator

n063h commented Nov 2, 2022

@n063h Jupyter notebook port is 20000,Killing jupyter process triggers client container restart .So this doesn't solve my problem

@HelloJeremy Yes. I'm aware of this problem. It's probably related to the entrypoint in dockerfile. I will submit a patch to fix it soon.

@HelloJeremy
Copy link
Author

@HelloJeremy Yes. I'm aware of this problem. It's probably related to the entrypoint in dockerfile. I will submit a patch to fix it soon.

@n063h It's fixed, please let me know, thanks

@JingChen23 JingChen23 changed the title 通过docker-compose部署kubeFATE,怎么设置 jupyter notebook的访问密码 support setting password for jupyter notebook Nov 3, 2022
@JingChen23 JingChen23 added this to the v1.10.0 milestone Nov 3, 2022
@n063h
Copy link
Collaborator

n063h commented Nov 3, 2022

@HelloJeremy Hi, I fixed this issue in PR #790 .If you're using 1.9.0, you may refer to my changes to solve your problem.

@HelloJeremy
Copy link
Author

@HelloJeremy Hi, I fixed this issue in PR #790 .If you're using 1.9.0, you may refer to my changes to solve your problem.

@n063h Hi, Does the client docker image need to be updated?

@n063h
Copy link
Collaborator

n063h commented Nov 3, 2022

@HelloJeremy Hi, I fixed this issue in PR #790 .If you're using 1.9.0, you may refer to my changes to solve your problem.

@n063h Hi, Does the client docker image need to be updated?

To avoid such different behavior between images of different versions, I choose to write extra entrypoint command rather than modify it. Now the entrypoint in dockerfile has been overwritten in docker-compose.yaml or statefulset.yaml, so you don't need to update the image.

@HelloJeremy
Copy link
Author

image

@n063h Do you need to use $$?

@n063h
Copy link
Collaborator

n063h commented Nov 3, 2022

image

@n063h Do you need to use $$?

I have test it, and it works. I don't think it's necessary. Is there any hidden issue with ${val} ?

@HelloJeremy
Copy link
Author

HelloJeremy commented Nov 3, 2022

0098646d1c1aae3739d8e52ea760c3e

@n063h Hi, I also overridden the entrypoint in docker-compose.yaml, I run /bin/sh -c flow init --ip ${FATE_FLOW_IP}......
But flow init failed,Because I can't get the value of FATE_FLOW_IP, FATE_FLOW_PORT. I'm afraid you have the same problem so suggest you use $$.
You have no problem, Is it because I use /bin/sh you use bash?

@n063h
Copy link
Collaborator

n063h commented Nov 3, 2022

0098646d1c1aae3739d8e52ea760c3e

@n063h Hi, I also overridden the entrypoint in docker-compose.yaml, I run /bin/sh -c flow init --ip ${FATE_FLOW_IP}...... But flow init failed,Because I can't get the value of FATE_FLOW_IP, FATE_FLOW_PORT. I'm afraid you have the same problem so suggest you use $$. You have no problem, Is it because I use /bin/sh you use bash?

@HelloJeremy Thx for your comment!
I realize it's different behavior between docker-compose and helm-chart. Under testing in k8s mode $ works well, but it doesn't in docker mode.
$ $ is correct one. I will submit a patch to fix that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/requirement New feature requirement.
Projects
No open projects
Status: Done
Development

No branches or pull requests

3 participants