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

Cannot open jupyter notebook linked by the docker container #188

Open
gauravmoghe opened this issue Sep 6, 2022 · 1 comment
Open

Cannot open jupyter notebook linked by the docker container #188

gauravmoghe opened this issue Sep 6, 2022 · 1 comment

Comments

@gauravmoghe
Copy link

I downloaded the docker container using
docker run -p 8888:8888 -e PASSWORD="jupyter" quay.io/cellgeni/scrna-seq-course:v5.14

Then I load the image using the following code
$ docker run --user root -e GRANT_SUDO=yes <imageID>

and I get the following status message

Set username to: jovyan
usermod: no changes
Granting jovyan sudo access and appending /opt/conda/bin to sudo PATH
Executing the command: jupyter lab
[I 2022-09-05 17:56:31.142 ServerApp] jupyter_server_proxy | extension was successfully linked.
[I 2022-09-05 17:56:31.167 ServerApp] jupyterlab | extension was successfully linked.
[W 2022-09-05 17:56:31.173 NotebookApp] 'ip' has moved from NotebookApp to ServerApp. This config will be passed to ServerApp. Be sure to update your config before our next release.
[W 2022-09-05 17:56:31.174 NotebookApp] 'port' has moved from NotebookApp to ServerApp. This config will be passed to ServerApp. Be sure to update your config before our next release.
[W 2022-09-05 17:56:31.174 NotebookApp] 'port' has moved from NotebookApp to ServerApp. This config will be passed to ServerApp. Be sure to update your config before our next release.
[I 2022-09-05 17:56:31.202 ServerApp] Writing Jupyter server cookie secret to /home/jovyan/.local/share/jupyter/runtime/jupyter_cookie_secret
[I 2022-09-05 17:56:31.940 ServerApp] nbclassic | extension was successfully linked.
[I 2022-09-05 17:56:32.019 ServerApp] nbclassic | extension was successfully loaded.
[I 2022-09-05 17:56:32.571 ServerApp] jupyter_server_proxy | extension was successfully loaded.
[I 2022-09-05 17:56:32.573 LabApp] JupyterLab extension loaded from /opt/conda/lib/python3.9/site-packages/jupyterlab
[I 2022-09-05 17:56:32.574 LabApp] JupyterLab application directory is /opt/conda/share/jupyter/lab
[I 2022-09-05 17:56:32.580 ServerApp] jupyterlab | extension was successfully loaded.
[I 2022-09-05 17:56:32.581 ServerApp] Serving notebooks from local directory: /home/jovyan
[I 2022-09-05 17:56:32.582 ServerApp] Jupyter Server 1.9.0 is running at:
[I 2022-09-05 17:56:32.582 ServerApp] http://6842748b1bc3:8888/lab?token=f44920cc59face9412a8110dbc15c1776d3ac95ed0f81323
[I 2022-09-05 17:56:32.582 ServerApp]  or http://127.0.0.1:8888/lab?token=f44920cc59face9412a8110dbc15c1776d3ac95ed0f81323
[I 2022-09-05 17:56:32.583 ServerApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 2022-09-05 17:56:32.589 ServerApp] 

    
    To access the server, open this file in a browser:
        file:///home/jovyan/.local/share/jupyter/runtime/jpserver-15-open.html
    Or copy and paste one of these URLs:
        http://6842748b1bc3:8888/lab?token=f44920cc59face9412a8110dbc15c1776d3ac95ed0f81323
     or http://127.0.0.1:8888/lab?token=f44920cc59face9412a8110dbc15c1776d3ac95ed0f81323

However, when I put the link in Chrome, I get ERR_CONNECTION_REFUSED or ERR_FILE_NOT_FOUND

I tried changing 127.0.0.1 to my mac's IP address as suggested in a previous closed GitHub issue (#165) but that did not work. Running the docker run command without the sudo and --user arguments also does not work.

Thanks for any insights!

@prete
Copy link
Collaborator

prete commented Sep 6, 2022

Hi @gauravmoghe, when running the container you need to bind the ports from the container to your host machine:
that's the -p 8888:8888 part of the launch command otherwise you won't be able to reach jupyter inside the container via the URL.

Also, I think the PASSWORD env var has been deprectaed in favor of JUPYTER_TOKEN. Try running it like this:

docker run -p 8888:8888 -e JUPYTER_TOKEN=jupyter quay.io/cellgeni/scrna-seq-course:latest

Let us know how that goes

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

2 participants