events

Pitagora Meetup 2024-01

概要

問い合わせ

タイムテーブル

途中参加、途中退出は自由です。初めて参加される方はぜひ 過ごし方ガイド をご覧ください。

Time  
13:00-13:15 今日の作業確認
13:15-17:00 開発とディスカッション
17:00-18:00 ラップアップ
18:00- 有識者会議

ミートアップの主旨

まとめ

大田

ログ

$ nvidia-smi
Wed Jan 10 23:29:35 2024
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 525.85.05    Driver Version: 525.85.05    CUDA Version: 12.0     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|===============================+======================+======================|
|   0  NVIDIA RTX 6000...  On   | 00000000:2D:00.0 Off |                  Off |
| 30%   27C    P8     3W / 300W |     82MiB / 49140MiB |      0%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|    0   N/A  N/A      1333      G   /usr/lib/xorg/Xorg                 63MiB |
|    0   N/A  N/A      1480      G   /usr/bin/gnome-shell               16MiB |
+-----------------------------------------------------------------------------+
$ sudo apt update -y && apt install -y curl
$ curl -fsSL https://get.docker.com -o get-docker.sh
$ sudo sh ./get-docker.sh
$ sudo usermod -aG docker $USER
$ docker info
$ curl -fsSL https://nvidia.github.io/libnvidia-container/gpgkey | sudo gpg --dearmor -o /usr/share/keyrings/nvidia-container-toolkit-keyring.gpg \
  && curl -s -L https://nvidia.github.io/libnvidia-container/stable/deb/nvidia-container-toolkit.list | \
    sed 's#deb https://#deb [signed-by=/usr/share/keyrings/nvidia-container-toolkit-keyring.gpg] https://#g' | \
    sudo tee /etc/apt/sources.list.d/nvidia-container-toolkit.list
$ sudo apt-get update -y
$ sudo apt-get install -y nvidia-container-toolkit
$ sudo docker run --rm --gpus all nvidia/cuda:12.0.0-base-ubuntu20.04 nvidia-smi
docker: Error response from daemon: could not select device driver "" with capabilities: [[gpu]].
$ sudo service docker restart
$ docker run --rm --gpus all quay.io/jupyter/pytorch-notebook:2024-01-08 nvidia-smi
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 525.85.05    Driver Version: 525.85.05    CUDA Version: 12.0     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|===============================+======================+======================|
|   0  NVIDIA RTX 6000...  On   | 00000000:2D:00.0 Off |                  Off |
| 30%   27C    P8     2W / 300W |     82MiB / 49140MiB |      0%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
+-----------------------------------------------------------------------------+
$ docker run -d --name nb -p 8888:8888 --rm --gpus all quay.io/jupyter/pytorch-notebook:2024-01-08
$ docker run --rm -it --gpus all quay.io/jupyter/pytorch-notebook:2024-01-08 bash
$ python3
>>> import torch; torch.cuda.is_available()
False
$ cat Dockerfile
FROM nvidia/cuda:12.0.0-base-ubuntu20.04

USER root

COPY ./requirements.txt /tmp
WORKDIR /code

RUN apt update -y && apt upgrade -y && apt install -y curl python3 python3-distutils
RUN curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py && python3 get-pip.py

RUN pip install -r /tmp/requirements.txt
$ cat requirements.txt
jupyter
jupyterlab
numpy
pandas
matplotlib
scikit-learn
scikit-image
scipy
torch
torchvision
transformers
$ docker build . -t  gpu-notebook:20240111
$ docker run --rm -it --gpus all gpu-notebook:20240111 bash
$ python3
>>> import torch; torch.cuda.is_available()
True

todo

露崎

池田

那須野

福井

末竹

丹生

山本