1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Hugging Face ZeroGPU

AIコニュニティサービスHuggingFaceにZeroGPUというサービスが登場しました。
これは月額9ドル(約1300円)でNvidia A100GPUが使えるというものです。

え、お安い…

と思いますが、ただがっつり使えるわけではなく、あくまで画像生成などデモ用にちょっと(最大120秒)だけ利用できるというサービスです。
詳しくはこちらの方々の記事が親切に書かれています。

環境を確認する

こちらが公式ページなのですが細かい環境についての記載がなかったので、今回pythonからコマンドを実行して確認してみました。(subprocess.runでの出力)

OS情報

cat /etc/os-release

PRETTY_NAME="Debian GNU/Linux 12 (bookworm)"
NAME="Debian GNU/Linux"
VERSION_ID="12"
VERSION="12 (bookworm)"
VERSION_CODENAME=bookworm
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"

Pythonバージョン

python -V

Python 3.10.13

Pythonパッケージ(PIP)

pip list

長いので折りたたみました
Package                   Version
------------------------- -----------
aiofiles                  23.2.1
aiohttp                   3.9.3
aiosignal                 1.3.1
altair                    5.3.0
annotated-types           0.7.0
anyio                     4.4.0
async-timeout             4.0.3
attrs                     23.2.0
Authlib                   1.3.1
certifi                   2024.2.2
cffi                      1.16.0
charset-normalizer        3.3.2
click                     8.0.4
contourpy                 1.2.1
cryptography              42.0.8
cycler                    0.12.1
datasets                  2.18.0
dill                      0.3.8
dnspython                 2.6.1
email_validator           2.1.1
exceptiongroup            1.2.1
fastapi                   0.111.0
fastapi-cli               0.0.4
ffmpy                     0.3.2
filelock                  3.13.3
fonttools                 4.53.0
frozenlist                1.4.1
fsspec                    2024.2.0
gradio                    4.36.0
gradio_client             1.0.1
h11                       0.14.0
hf_********               0.1.6
httpcore                  1.0.5
httptools                 0.6.1
httpx                     0.27.0
huggingface-hub           0.22.2
idna                      3.6
importlib_resources       6.4.0
itsdangerous              2.2.0
Jinja2                    3.1.3
jsonschema                4.22.0
jsonschema-specifications 2023.12.1
kiwisolver                1.4.5
markdown-it-py            3.0.0
MarkupSafe                2.1.5
matplotlib                3.9.0
mdurl                     0.1.2
mpmath                    1.3.0
multidict                 6.0.5
multiprocess              0.70.16
networkx                  3.2.1
numpy                     1.26.4
nvidia-cublas-cu12        12.1.3.1
nvidia-cuda-cupti-cu12    12.1.105
nvidia-cuda-nvrtc-cu12    12.1.105
nvidia-cuda-runtime-cu12  12.1.105
nvidia-cudnn-cu12         8.9.2.26
nvidia-cufft-cu12         11.0.2.54
nvidia-curand-cu12        10.3.2.106
nvidia-cusolver-cu12      11.4.5.107
nvidia-cusparse-cu12      12.1.0.106
nvidia-nccl-cu12          2.19.3
nvidia-nvjitlink-cu12     12.4.127
nvidia-nvtx-cu12          12.1.105
orjson                    3.10.3
packaging                 24.0
pandas                    2.2.1
pillow                    10.3.0
pip                       22.3.1
protobuf                  3.20.3
psutil                    5.9.8
pyarrow                   15.0.2
pyarrow-hotfix            0.6
pycparser                 2.22
pydantic                  2.7.3
pydantic_core             2.18.4
pydub                     0.25.1
Pygments                  2.18.0
pyparsing                 3.1.2
python-dateutil           2.9.0.post0
python-dotenv             1.0.1
python-multipart          0.0.9
pytz                      2024.1
PyYAML                    6.0.1
referencing               0.35.1
requests                  2.31.0
rich                      13.7.1
rpds-py                   0.18.1
ruff                      0.4.8
semantic-version          2.10.0
setuptools                65.5.1
shellingham               1.5.4
six                       1.16.0
sniffio                   1.3.1
spaces                    0.28.3
starlette                 0.37.2
sympy                     1.12
tomlkit                   0.12.0
toolz                     0.12.1
torch                     2.2.0
tqdm                      4.66.2
triton                    2.2.0
typer                     0.12.3
typing_extensions         4.10.0
tzdata                    2024.1
ujson                     5.10.0
urllib3                   2.2.1
uvicorn                   0.30.1
uvloop                    0.19.0
watchfiles                0.22.0
websockets                11.0.3
wheel                     0.43.0
xxhash                    3.4.1
yarl                      1.9.4

CUDAバージョン

nvcc -V

FileNotFoundError: [Errno 2] No such file or directory: 'nvcc'

エラーとなりました。(私のやり方が悪いのかもしれません。)
ただpip listの結果からしてcuda12系のようです。

まとめ

OSはDebian12でした。PIPは思ったより色々入ってました、numpyぐらいはあるようです。
Pythonは3.10.13とPyTorch(torch)は2.2.0と公式通りです。

※今更ですがZeroGPUはベータ版ですので、今後この結果は変わると思われます。ご参考までに。

使ったみた感想(おまけ)

  • 導入に関して
    torchが入っているのですが、torchvisionやtorchaudioが入ってません。
    大体のオープンソースAIツールはこれらが使われている気がするので、これらの整合性を合わせるため結局torchを再インストールすることになりました。

  • 実際に動かしてみて
    120秒制限が厳しいです…
    V-Expressのデモを勝手に作ってみたのですが、ほんの数秒の音声でしか120秒以内に動画ができませんでした。動画生成は結構厳しそうです。


こちらが作ってみたものですので試してみて下さい!

1
0
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
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?