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

Java example code to generate random characters

Sample code: import java.util.Random; import java...

Implementation steps for Docker deployment of SpringBoot applications

Table of contents Preface Dockerfile What is a Do...

Installation and use of Apache stress testing tools

1. Download Go to the Apache official website htt...

Detailed Linux installation tutorial

(Win7 system) VMware virtual machine installation...

Detailed explanation of Nginx configuration required for front-end

Nginx (engine x) is a lightweight, high-performan...

Analyze how a SQL query statement is executed in MySQL

Table of contents 1. Overview of MySQL Logical Ar...

Practice of using Tinymce rich text to customize toolbar buttons in Vue

Table of contents Install tinymce, tinymce ts, ti...

Learn SQL query execution order from scratch

The SQL query statement execution order is as fol...

Some common properties of CSS

CSS background: background:#00ffee; //Set the back...

Summary of Linux nc command

NC's full name is Netcat (Network Knife), and...

Install Python virtual environment in Ubuntu 18.04

For reference only for Python developers using Ub...

MySQL sql_mode analysis and setting explanation

When inserting a set of data into the MySQL datab...

MySQL integrity constraints definition and example tutorial

Table of contents Integrity constraints Definitio...