If Docker is not installed, install it.
Install Docker on Mac (Update: 2019/7/13) --Qiita
Since many Docker commands are long, it is better to be able to complete them on the shell.
Command line completion — Docker-docs-ja 17.06.Beta documentation
Docker for mac tab completion --ytooyama blog
Google teacher will teach you how to do it, so please try it.
After installing Docker, use the pull
command to download the jupyter image.
docker pull jupyter/datascience-notebook
version: '3'
services:
jupyter:
volumes: #Mount the current directory to the myapp directory inside the docker container
- .:/myapp
working_dir: /myapp #Container default working dir to myapp
ports:
- "8888:8888" #Container side: Host machine side
image: "jupyter/datascience-notebook"
container_name: "notebook" #Container name (If set, it will be easier to restart)
You can start jupyter notebook in the place where you put this yaml file by changing the place of volumes
to ↑.
Please rename / myapp
as you like.
Let's create it in the directory you want to mess with, such as when you want to mess with gorigori data with Python.
If you can do it so far, do docker-compose up
as it is.
The URL that started the notebook will be printed on the terminal, so if you go there you should be able to use the jupyter notebook.
Recommended Posts