@YuyaHori

Are you sure you want to delete the question?

Leaving a resolved question undeleted may help others!

cuda12.2に対応したpytorch環境を構築したい

dockerを用いてpytorchの機械学習用のdevelのimageを作成したいのですが、cuda12.2の環境にあったpytorch/pytorchのタグがなくて困っています。cudaのバージョンを変えることはできないのですが、どのようにしたら良いでしょうか?
初学者なので検討外れな質問をしているかもしれませんが、そうでしたらそこも含めて教えてくださると幸いです。

参考:pytorch/pytorchのdockerhub
https://hub.docker.com/r/pytorch/pytorch/tags?page=&page_size=&ordering=&name=

0 likes

25Answer

Comments

  1. @FNAF それは良い考えですね。試してみます。

  2. This comment has been deleted for violation of our Terms of Service.
  3. @FNAF Freddy Game 攻撃を予測し、資源を慎重に管理することを学ぶ。このゲームが要求するスキルのおかげで、私はより優れたゲーマーになれた。

  4. Players in slope game must avoid red obstacles and stay balanced on narrow tracks while racing through a futuristic 3D environment.

  5. 全然変な質問じゃないですよ!pytorch/pytorch のタグにこだわらず、CUDA 12.2のベースイメージから自分でPyTorch入れる形にすれば問題なく動きます。無事に環境作れたら、モデルの学習待ちとか暇な時に Traffic Jam 3D やってみてください、良い暇つぶしになります!

Python 3.10 Pytorch 2.1.0 でいいならですが、NVIDIA NGC の pytorch はいかがでしょうか?
nvidia-container-toolkit が必要です。

下記の pytorch が使用できます。

nvcr.io/nvidia/pytorch:23.10-py3 がCUDA 12.2.2
nvcr.io/nvidia/pytorch:23.09-py3 がCUDA 12.2.1です。

1Like

Comments

  1. @YuyaHori

    Questioner

    回答ありがとうございます。
    重ねての質問になってしまって申し訳ないのですが、その環境を構築したいとき、Dockerfileにどのように記述すれば良いのか良ければ教えていただきたいです。

  2. NVIDIAがイメージを配布しているので、基本的には下記のように実行する感じですね。

    $ docker run --gpus all -it --rm nvcr.io/nvidia/pytorch:23.10-py3
    

    上記のOverviewを確認していただければ、大体の使い方はわかると思います。

パフォーマンスだけでなく、環境構築の手間を減らせる点も魅力的ですね。こうした開発環境の効率化は、AIを活用したプロジェクトや The Freak Circus
のようなストーリー性の高い作品の制作でも役立ちそうです。

0Like

CUDA 12.2専用のPyTorch Dockerイメージがなくても、必ずしもCUDA 12.2対応版を使う必要はないと思います。実際 heardle game、PyTorch 2.4.0/2.4.1などはCUDA 12.1や12.4向けの公式パッケージが提供されています。

ホスト側のCUDA 12.2を変更できないという意味なら、まずNVIDIAドライバのバージョンと、コンテナ内で必要なCUDAランタイムの組み合わせを確認するのがよさそうです。特定のPyTorchバージョンが必要なら、そのバージョンとGPU/ドライバの情報も書いてもらえると、もう少し絞り込めそうです。

0Like

こんにちは、あなた。 I faced a similar Docker and CUDA compatibility issue last month. Since you can't change CUDA versions, try using PyTorch's official base images with compatible CUDA libraries or build a custom image with specific PyTorch wheels. The PyTorch documentation has excellent guides for this. Your question isn't off-base at all—many developers encounter this. I'd also recommend exploring @Geometry Dash community forums where people share Docker configurations for different CUDA versions. Thanks to the admin for maintaining such helpful resources!

0Like

This answer has been deleted for violation of our Terms of Service.

CUDA 12.2自体は問題ないと思いますが、Geometry Dash Lite pytorch/pytorch のDockerイメージはCUDAのバージョンごとにすべて用意されているわけではないので、12.2対応タグが見つからないことがあります。
もしDockerを使うのが目的なら、nvidia/cuda:12.2 をベースイメージにして、その上でPyTorchをpipやcondaからインストールする方法も選択肢です。PyTorchはCUDAランタイムとの互換性がある程度あるので、その構成で動くケースもあります。

0Like

環境構築はお疲れ様です!

公式の pytorch/pytorch に適切なタグがない場合は、NVIDIA公式の nvidia/cuda:12.2.0-devel-ubuntu22.04 などをベースイメージ(FROM)にして、その中で pip を使って CUDA 12.1 用(12.2でも動作します)か CUDA 12.4 用の PyTorch をインストールするのが一番確実ですよ。

もしくは、回答にあるように NVIDIA NGC の nvcr.io/nvidia/pytorch:23.10-py3 を使うのも手です。

最初は Dockerfile の書き方やエラーで頭が痛くなることも多いですが、焦らず進めてくださいね。私も環境構築で詰まったときは、Drift Hunters みたいな車のドリフトゲームを少し遊んで脳をリフレッシュしてから再挑戦しています(笑)。

応援しています!

0Like

GPU パフォーマンスを最適化するために CUDA 12.2 をサポートする PyTorch 環境をセットアップしています。
Sprunki Modsについて少し紹介します。Sprunki Modsは、ゲーム体験を拡張するためのカスタム改造で、ユーザーが新しい機能やビジュアル、ゲームプレイの変更を楽しめる点が特徴です。特にコミュニティ主導で開発されることが多く、多様なスタイルやアイデアが反映されているのが魅力です。

0Like

最初は少しややこしいですが、環境構築は慣れなので焦らなくて大丈夫です。自分も詰まったときは少し離れて、Slope Rider みたいなシンプルなゲームでリフレッシュしてから戻ることがあります

0Like

Friday Night Funkin’は、ダイナミックな音楽、高度なリズムゲームプレイ、象徴的なキャラクター、そして熱狂的なファンベースによって際立っています。シンプルなゲームシステムを持つインディーゲームであっても、fnf 革新性、独自性、そして楽しさを提供することで、世界的な評価を獲得することができます。

0Like

This answer has been deleted for violation of our Terms of Service.

This answer has been deleted for violation of our Terms of Service.

This answer has been deleted for violation of our Terms of Service.

This answer has been deleted for violation of our Terms of Service.

Comments

  1. ここでは、Fnaf のような世界で最も興味深く魅力的なゲームを共有し、理解していきます... 応援していただければ幸いです。

This answer has been deleted for violation of our Terms of Service.

This answer has been deleted for violation of our Terms of Service.

他に使える代替アプリはあるのでしょうか? Docker を使用して Pytorch 機械学習を開発することは、@Scratch Games 実際には人気のあるアプローチです。一緒に新しいスキルを学んで楽しみましょう

0Like

This answer has been deleted for violation of our Terms of Service.

@slope game 特定の CUDA バージョン用の公式 pytorch/pytorch タグがない場合、CUDA 12.2 で PyTorch 用のカスタム Docker イメージを作成するには、どのような手順を踏めばよいでしょうか?

0Like

Comments

  1. My name is Prahlad Prajapati. I run SEO for web hosting brands — one of the most competitive niches on the internet, where every competitor has a bigger budget, a bigger team, and a head start of several years.

    Six years in that niche taught me what actually moves rankings, because I had no other option. That is the background. Here is why it matters to you.

This answer has been deleted for violation of our Terms of Service.

This answer has been deleted for violation of our Terms of Service.

Your answer might help someone💌