The story of launching python2.x jupyter notebook using docker (crushed on Saturday and Sunday)

The beginning of things

The package I wanted to use for analysis was written in python2.x (stop it). I don't want to hurt my local python3 environment. But I don't want to use a VM either!

That's right, let's try Docker and so on. Let's go around for the time being.

Can you easily build an image with Docker pull? Well, in 2018 I stopped handling python2 in jupyter / scipy-notebook (Docker Image Library). Damn, then someone has come up with a solution in the forum, eh, (at the end of the long scroll) it's impossible after all! I'll find it myself when this happens

For readers

People who want to handle .jpnb written in python2 with Docker (very niche). Mac user. I'm a Docker beginner so I can't explain it in detail, but I hope this article helps.

All you have to do You can execute the following in order on the terminal.

1 Move to the directory you want to mount with cd. (Through necessary) 2 Pull miniconda (jupyter / scipy-notebook rejected for the above reason)

$ docker pull continuumio/miniconda

3 docker run: Here, set the name to'mini', port to local: 8001 cotainer: 8000, and specify the mount destination under / home.

$ docker run -it --name mini -p 8001:8000 -v ${PWD}:/home continuumio/miniconda bash

4 Execute without thinking about the following. (I have to put backports.functools_lru_cache by myself.)

conda create -n py27 python=2.7
conda activate py27
conda install notebook ipykernel
pip install backports.functools_lru_cache
ipython kernel install --user

5 If necessary, install the necessary modules with conda install / pip install as appropriate.

6 Local http: // localhost: 8001 Expand notebook to

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

7 Enjoy coding

Conclusion

It's annoying, but at the very least, I can do the title. Please let me know if there is another good way. ..

Recommended Posts

The story of launching python2.x jupyter notebook using docker (crushed on Saturday and Sunday)
Easy installation and launch of Jupyter Notebook using Docker (also supports nbextensions and Scala)
Drawing on Jupyter using the plot function of pandas
Read the csv file with jupyter notebook and write the graph on top of it
The story of Python and the story of NaN
Resolve garbled Japanese characters in matplotlib of Jupyter Notebook on Docker
I tried to extract and illustrate the stage of the story using COTOHA
Display the graph of tensorBoard on jupyter
Clone the github repository on jupyter notebook
GPU check of PC on jupyter notebook
The story of trying deep3d and losing
Launch and use IPython notebook on the network
[Pythonocc] I tried using CAD on jupyter notebook
Fill the browser with the width of Jupyter Notebook
Try Apache Spark on Jupyter Notebook (on local Docker
Remotely open Jupyter notebook launched on the server
Try using Jupyter Notebook of Azure Machine Learning
Scraping the winning data of Numbers using Docker
I want to take a screenshot of the site on Docker using any font
The story when I was using IntelliJ on Linux and could not input Japanese
Simple statistics that can be used to analyze the effect of measures on EC sites and codes that can be used in jupyter notebook
Easily launch jupyter notebook on AWS and access locally
The story of launching a Minecraft server from Discord
The story of Python without increment and decrement operators.
The kernel of jupyter notebook can no longer connect
Monitor the training model with TensorBord on Jupyter Notebook
EC2 provisioning with Vagrant + Jupyter (IPython Notebook) on Docker
[Windows] [Python3] Install python3 and Jupyter Notebook (formerly ipython notebook) on Windows
Installation of Docker on Raspberry Pi and L Chika
The story of using circleci to build manylinux wheels