Solution to the problem that Docker container cannot access Jupyter

Solution to the problem that Docker container cannot access Jupyter

In this project, the Docker container is used to build the environment. The Dockerfile is as follows:

FROM tensorflow/tensorflow:1.14.0-gpu-py3

RUN pip install scipy==1.3.3
RUN pip install requests
RUN pip install Pillow
RUN pip install matplotlib
RUN pip install pandas
RUN pip install keras==2.2.4
RUN pip install scikit_learn==0.20.0
RUN pip install transformers==3.5.0

Create a docker container:

sudo docker build - < Dockerfile

After successful creation, label it:

docker tag a7a1861d2150 datascience/text2animeface:v0.1

Then enter the container:

sudo docker run --gpus all -it -p 8080:8080 -p 8888:8888 -d -v `pwd`:/mnt datascience/text2animeface:v0.1

Then install jupyter and start jupyter

jupyter-notebook --allow-root

The problem occurs. localhost:8888 cannot be accessed from outside, and telnet is also unavailable. Try repeatedly. There is no need to re-establish the container. Just use the following command to start Jupyter:

jupyter-notebook --allow-root --ip=0.0.0.0 --port=8888

The IP address is bound to 0.0.0.0, which is any IP address, port 8888,

This is the end of this article about the solution to the problem that jupyter cannot be accessed when opening a Docker container. For more related content about Docker jupyter cannot be accessed, please search for previous articles on 123WORDPRESS.COM or continue to browse the following related articles. I hope you will support 123WORDPRESS.COM in the future!

You may also be interested in:
  • Docker container accesses the host's MySQL operation
  • Docker container custom hosts network access operation
  • Docker port mapping and external inaccessibility issues
  • How to enable remote access in Docker
  • 404 error occurs when accessing the homepage of tomcat started in Docker mode
  • Docker image access to local elasticsearch port operation
  • Solution to docker suddenly not being accessible from the external network

<<:  Some properties in CSS are preceded by "*" or "_".

>>:  Detailed explanation of basic interaction of javascript

Recommend

How to change the encoding to utf-8 in mysql version 5.7 under windows

Preface I just started learning MySQL and downloa...

A small question about the execution order of SQL in MySQL

I encountered a sql problem at work today, about ...

Detailed tutorial on installing Tomcat9 windows service

1. Preparation 1.1 Download the tomcat compressed...

How to add conditional expressions to aggregate functions in MySql

MySQL filtering timing of where conditions and ha...

mysql5.5.28 installation tutorial is super detailed!

mysql5.5.28 installation tutorial for your refere...

English: A link tag will automatically complete href in IE

English: A link tag will automatically complete h...

Detailed steps for installing JDK and Tomcat on Linux cloud server (recommended)

Download and install JDK Step 1: First download t...

Detailed explanation of CSS3 to achieve responsive accordion effect

I recently watched a video of a foreign guy using...

MySQL 8.0.20 winx64 installation and configuration method graphic tutorial

This article shares with you the installation and...

Detailed tutorial on running multiple Springboot with Docker

Docker runs multiple Springboot First: Port mappi...

Vue3.0 implements encapsulation of checkbox components

This article example shares the specific code of ...

Detailed explanation of mysql trigger example

Table of contents What is a trigger Create a trig...

A brief discussion on common operations of MySQL in cmd and python

Environment configuration 1: Install MySQL and ad...