LoginSignup
2
1

More than 5 years have passed since last update.

メモ: Jupyter使ってみた

Last updated at Posted at 2017-03-05

jupyter/notebook は deprecated のため、以下を使う。

base

586.2MB
docker run -it --rm -p 8888:8888 jupyter/base-notebook

minimal

2.191GB
docker run -it --rm -p 8888:8888 jupyter/minimal-notebook

datascience

6.829GB
docker run -it --rm -p 8888:8888 jupyter/datascience-notebook

オプション色々

./notebooks/にデータを残す
docker run -d -p 8888:8888 \
 -v `pwd`/notebooks:/home/jovyan/work \
 -e GRANT_SUDO=yes \
 --user root \
 jupyter/datascience-notebook \
 start-notebook.sh
  • 上記でsudo可能になる。
url_token確認
docker logs `ContainerID`

Noteからコマンド実行

%%bash
df -h

再入門

sudo apt install -y jupyter-notebook

jupyter-notebook

グラフを描画してみる

apt install -y \
 python3-matplotlib \
 python3-numpy
import matplotlib.pylab as plt

x = np.linspace(-np.pi, np.pi, 201)
plt.plot(x, np.sin(x))
plt.xlabel('Angle [rad]')
plt.ylabel('sin(x)')
plt.axis('tight')
plt.show()

jupyter.png

2
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
1