Help us understand the problem. What is going on with this article?

Jupyter NotebookをDocker上で立ち上げる時にパスワードはenvironmentで渡せるようにしたやつ

More than 1 year has passed since last update.

Jupyter NotebookをDocker上で立ち上げる時にパスワードはenvironmentで渡せるようにしたやつです(閉じた環境用)。

使い方

gitから一式clone

git clone https://github.com/ko-he-/my-jupyter-notebook

cd my-jupyter-notebook

パスワードを設定させるためにdocker-compose.ymlのJUPYTER_PASSを変更

version: '3'
services:
  jupyter:
    build:
      context: ./jupyter
    volumes:
      - ./ipynb/:/home/jovyan/work
      - ./data/:/home/jovyan/work/data
    ports:
      - 8888:8888
    environment:
      - JUPYTER_PASS=password # ここを変更

ついでにpipで入れたいものがあれば./jupyter/requirements.txtに追記

最後に起動

docker-compose up -d
  • その他
    • hostからコンテナに渡したいデータがある場合は./dataに格納。
    • host側の./ipynb//home/jovyan/workにマウントされている。
    • ./data./ipynbは適切にpermissionをつけてください
    • ./data./ipynbgitignoreに含まれているので注意
    • jupyter/datascience-notebookをベースにしてるので他が必要な場合はDockerfileをいじってください。
    • パスワードはgitにpushしないように注意しましょう(.envとかに設定してgitignoreとか)
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
No comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
ユーザーは見つかりませんでした