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

Specific usage of CSS compound selectors

Intersection Selector The intersection selector i...

How to implement multiple parameters in el-dropdown in ElementUI

Recently, due to the increase in buttons in the b...

CSS3 animation – steps function explained

When I was looking at some CSS3 animation source ...

Detailed explanation of the use of umask under Linux

I recently started learning Linux. After reading ...

Linux sar command usage and code example analysis

1. CPU utilization sar -p (view all day) sar -u 1...

Use of MySQL DDL statements

Preface The language classification of SQL mainly...

A general method for implementing infinite text carousel with native CSS

Text carousels are very common in our daily life....

Mini Programs use Mini Program Cloud to implement WeChat payment functions

Table of contents 1. Open WeChat Pay 1.1 Affiliat...

Analysis of the Nesting Rules of XHTML Tags

In the XHTML language, we all know that the ul ta...

Usage of Vue filters and timestamp conversion issues

Table of contents 1. Quickly recognize the concep...

Secondary encapsulation of element el-table table (with table height adaptation)

Preface During my internship at the company, I us...

Example analysis of the principle and solution of MySQL sliding order problem

This article uses examples to explain the princip...

Common structural tags in XHTML

structure body, head, html, title text abbr, acro...

A brief discussion on ifnull() function similar to nvl() function in MySQL

IFNULL(expr1,expr2) If expr1 is not NULL, IFNULL(...