LoginSignup
2
2

More than 1 year has passed since last update.

DockerでTensorFlowがインストール済みのJupyter Lab環境を作る

Posted at

はじめに

Python、AI初心者な自分がAI関連の部署に異動になりました。
勉強のため、まずは環境を作ろうと思ったため、DockerTensorFlowインストール済みのJupyter Labの環境を作ったので備忘録を残します。

Dockerfile

FROM jupyter/datascience-notebook
USER root

RUN pip3 install --upgrade --no-cache-dir \
  tensorflow \
  jupyterlab-lsp \
  'python-language-server[all]' \
  jupyterlab_code_formatter \
  && rm -rf ~/.cache/pip \
  && jupyter labextension install \
  @ryantam626/jupyterlab_code_formatter \
  @krassowski/jupyterlab-lsp \
  && jupyter serverextension enable --py jupyterlab_code_formatter

docker-compose.yml

version: "3"
services:
  jupyter:
    build: .
    container_name: "jupyter"
    ports:
      - 8888:8888
    tty: true
    environment:
      - JUPYTER_ENABLE_LAB=yes
    volumes:
      - C:\work\Python:/home/jovyan/work
    command: start-notebook.sh --NotebookApp.token=''

起動

docker-compose.yml, Dockerfileの同階層に移動し以下を実行。
起動後、localhost:8888にアクセスで使用できる。

docker-compose up -d

参考

オレオレJupyterlab環境をDockerで作った

2
2
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
2