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

Running as root is not recommended. Use --allow-root to bypass. #94

Open
boldt opened this issue Oct 4, 2018 · 9 comments
Open

Running as root is not recommended. Use --allow-root to bypass. #94

boldt opened this issue Oct 4, 2018 · 9 comments

Comments

@boldt
Copy link

boldt commented Oct 4, 2018

If I start the Jupyter Notebook as described in the readme (docker container continuumio/anaconda3 latest c357d1cc27c8)...

docker run -i -t -p 8888:8888 continuumio/anaconda3 /bin/bash -c "/opt/conda/bin/conda install jupyter -y --quiet && mkdir /opt/notebooks && /opt/conda/bin/jupyter notebook --notebook-dir=/opt/notebooks --ip='*' --port=8888 --no-browser"

I get the following error and the container closesv:

Running as root is not recommended. Use --allow-root to bypass.

Thus, I added --allow-root to the default command:

docker run -i -t -p 8888:8888 continuumio/anaconda3 /bin/bash -c "/opt/conda/bin/conda install jupyter -y --quiet && mkdir /opt/notebooks && /opt/conda/bin/jupyter notebook --notebook-dir=/opt/notebooks --ip='*' --port=8888 --no-browser --allow-root"

EDIT:

@ankit-jha
Copy link

ankit-jha commented Dec 21, 2018

@boldt I got mine running the same way.
But how do you restart the same container. I tried with

docker start <CONTAINER_ID> && docker exec -d -t <CONTAINER_ID> /bin/bash -c "/opt/conda/bin/jupyter notebook --notebook-dir=/opt/notebooks --ip='*' --port=8888 --no-browser --allow-root"

But the container just dies after some time

@Shoib007
Copy link

Shoib007 commented Oct 25, 2019

Im using Kali Linux, while I type Jupyter Notebook it showing
[C 12:42:22.238 NotebookApp] Running as root is not recommended. Use --allow-root to bypass.

How can I solve it.

@ankit-jha
Copy link

Im using Kali Linux, while I type Jupyter Notebook it showing
[C 12:42:22.238 NotebookApp] Running as root is not recommended. Use --allow-root to bypass.

How can I solve it.
@Shoib007
Try this out
jupyter notebook --ip='*' --port=8888 --allow-root
Although it's not a recommended solution

@Esrong
Copy link

Esrong commented Dec 30, 2019

RUN THIS CODE jupyter notebook --allow-root

@Mrsudoright
Copy link

When i try to open jupyter by terminal i get this "Running as root is not recommended. Use --allow-root to bypass"
so i came here and read all the useful comments but didn't work exactly same.
SOL -
(A) First of all set a password for the root

1- sudo passwd root

2- (there are two password one for your computer user and the second one for enabling "root")
use here computer user password.

3- Enter new UNIX password (now here use a different password for your root login)
Retype new UNIX password and then ENTER!!
Password update successfully !

(B)
1- su - ENTER !!

2- ENTER YOUR NEW UNIX - THEN ENTER!!

3- Then write this code-> docker run -i -t -p 8888:8888 continuumio/anaconda3 /bin/bash -c "/opt/conda/bin/conda install jupyter -y --quiet && mkdir /opt/notebooks && /opt/conda/bin/jupyter notebook --notebook-dir=/opt/notebooks --ip='*' --port=8888 --no-browser --allow-root"

4- ENTER!!

After loading the whole page (can take few minutes) scroll down and see near at the bottom of the page you will get the link copy it and run it in any browser. Now you can open a NEW NOTEBOOK without any pro.

@Jaerami
Copy link

Jaerami commented Aug 11, 2020

Gracias

@Zakria96
Copy link

Zakria96 commented Mar 3, 2021

#94 (comment)
This will 100% solve your problem

@yousefmasry4
Copy link

jupyter notebook --ip='*' --port=8888 --allow-root

@Timaos123
Copy link

I know I should start jupyter notebook with "--allow-root", but I am using ssh to connect to the server in vscode. Is there any way to solve the problem in this kind of environment?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants