11
5

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Dockerを使いKaggle環境を構築する方法

11
Last updated at Posted at 2022-04-22

1 この記事は

Dockerを使い、Kaggle環境をローカルPC上に構築する方法を説明します。

2 方法

2-1 Docker for windowsをインストールする。

2-2 Kaggleイメージをインストールする

Windowsのpowershellを立ち上げ、下記のコマンドを入力する。

PowerShell
docker run --rm -it kaggle/python

2-3 Dockerを起動しコンテナを作成する。

PowerShell
  docker run --network aukabu_default -v ${PWD}:/tmp/working -w=/tmp/working -p 8888:8888  --name meigara_ana -it kaggle/python jupyter notebook --no-browser --ip="0.0.0.0" --notebook-dir=/tmp/working --allow-root

xxxx:(コンテナの名前を入れる)

2-4 コンテナをスタートさせ、ブラウザを立ち上げる

Docker for windowsにてSTRATをクリックし、先に作成したコンテナを起動させる

332.jpg

下記図の赤枠で囲ったアイコンをクリックし、ブラウザを立ち上げる。
331.jpg

ブラウザを立ち上げた時に、Paaword or tokenを入力する画面が出た場合、
333.jpg

Docker for desctopにてCLIを立ち上げる。
334.jpg

CLIにて jupyter notebook listと入力するとtokenが表示される。「token=」以降の文字をコピーし、jupyterの画面で表示された
Password or token:のボックスに入力する。
335.jpg

jupyterのスタート画面が表示される。
336.jpg

11
5
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
11
5

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?