Access Jupyter notebook running on Docker container

前端 未结 10 1385
南旧
南旧 2021-01-30 00:21

I created a docker image with python libraries and Jupyter. I start the container with the option -p 8888:8888, to link ports between host and container. When I l

相关标签:
10条回答
  • 2021-01-30 00:23

    You can use the command jupyter notebook --allow-root --ip[of your container] or give access to all ip using option --ip0.0.0.0.

    0 讨论(0)
  • 2021-01-30 00:25

    To get the link to your Jupyter notebook server:

    After your docker run command, a hyperlink should be automatically generated. It looks something like this: http://localhost:8888/?token=f3a8354eb82c92f5a12399fe1835bf8f31275f917928c8d2 :: /home/jovyan/work

    If you want to get the link again later down the line, you can type docker exec -it <docker_container_name> jupyter notebook list.

    0 讨论(0)
  • 2021-01-30 00:26

    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"

    i had to add --allow-root to the command and now its running

    0 讨论(0)
  • 2021-01-30 00:29

    Check out the Torus project that Manifold open sourced recently. We wanted an easy way for our ML engineers to hit the ground running on new projects with a consistent development environment across the entire team. This Python cookiecutter will scaffold out a new project structure for you that includes a Dockerfile that uses a pre-baked ML dev image that we put in Docker Hub and a Docker Compose config that takes care of all the port forwarding for you. The config is written to pick an open port on your host machine to forward to the notebook server running on 8888 inside the container. No more hassle running multiple notebook servers on your machine! Check it out hopefully this is helpful!

    Github repo: https://github.com/manifoldai/docker-cookiecutter-data-science

    Why we built it (w/ demo): https://medium.com/manifold-ai/torus-a-toolkit-for-docker-first-data-science-bddcb4c97b52

    0 讨论(0)
  • 2021-01-30 00:30

    As an alternative to building your own Docker image, you can also use the ML Workspace image. The ML Workspace is an open-source web IDE that combines Jupyter, VS Code, a Desktop GUI, and many other tools & libraries into one convenient Docker image. Deploying a single workspace instance is as simple as:

    docker run -p 8080:8080 mltooling/ml-workspace:latest
    

    All tools are accessible from the same port and integrated into the Jupyter UI. You can find further documentation here.

    0 讨论(0)
  • 2021-01-30 00:31

    Host machine: docker run -it -p 8888:8888 image:version

    Inside the Container : jupyter notebook --ip 0.0.0.0 --no-browser --allow-root

    Host machine access this url : localhost:8888/tree‌​

    When you are logging in for the first time there will be a link displayed on the terminal to log on with a token.

    0 讨论(0)
提交回复
热议问题