How to install jupyter in docker on centos and open ports

How to install jupyter in docker on centos and open ports

Install jupyter

pip install jupyter

Write a script to run:

#!/bin/bash
# run_jupyter.sh
jupyter notebook --no-browser --ip 0.0.0.0 --port 8888 --allow-root > .log 2>&1 &

You can add this script to run at startup

Docker port mapping

First submit the container with jupyter installed

docker commit -a 'author' -m "add jupyter" container name ubuntu:jupyter

Create a container with a new image

docker run -itd --name jupyter ubuntu:jupyter -p 80:8888 bash

Open the host firewall

firewall-cmd --zone=public --add-port=80/tcp --permanent
firewall-cmd --reload
firewall-cmd --list-port
firewall-cmd --query-port=80/tcp

Access the host machine using a browser

insert image description here

So my development environment is like this hahaha

insert image description here

This is the end of this article on how to install jupyter in docker on centos and open ports. For more information about installing jupyter on docker, 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:
  • How to install jupyter in docker on centos and open ports
  • How to configure Jupyter notebook in Docker container
  • Solution to the problem that Docker container cannot access Jupyter
  • A brief discussion on how to run Tensorboard and Jupyter on Docker

<<:  What are mysql dirty pages?

>>:  Detailed explanation of some commonly used font-size font units and line-height in CSS

Recommend

Beginners learn some HTML tags (2)

Related article: Beginners learn some HTML tags (1...

Using Docker Enterprise Edition to build your own private registry server

Docker is really cool, especially because it'...

HTML table tag tutorial (45): table body tag

The <tbody> tag is used to define the style...

Detailed explanation of Vue's list rendering

Table of contents 1. v-for: traverse array conten...

In-depth discussion on auto-increment primary keys in MySQL

Table of contents Features Preservation strategy ...

vue-pdf realizes online file preview

This article example shares the specific code of ...

js canvas to realize the Gobang game

This article shares the specific code of the canv...

Detailed explanation of dynamically generated tables using javascript

*Create a page: two input boxes and a button *Cod...

Detailed explanation of common usage methods of weixin-js-sdk in vue

Link: https://qydev.weixin.qq.com/wiki/index.php?...

Javascript to achieve drumming effect

This article shares the specific code of Javascri...

Linux loading vmlinux debugging

Loading kernel symbols using gdb arm-eabi-gdb out...

How to use Linux paste command

01. Command Overview The paste command will merge...