{"id":1862,"date":"2025-11-07T15:15:34","date_gmt":"2025-11-07T06:15:34","guid":{"rendered":"http:\/\/www.ecobioinfo.com\/?p=1862"},"modified":"2025-11-07T21:39:40","modified_gmt":"2025-11-07T12:39:40","slug":"%e6%b7%b1%e5%b1%a4%e5%ad%a6%e7%bf%92%e3%80%80ubuntu-24-04-%e3%81%ab-tensorflow-gpu-%e3%82%92%e3%82%a4%e3%83%b3%e3%82%b9%e3%83%88%e3%83%bc%e3%83%ab","status":"publish","type":"post","link":"https:\/\/www.ecobioinfo.com\/?p=1862","title":{"rendered":"\u6df1\u5c64\u5b66\u7fd2\u3000Ubuntu 24.04 \u306b Tensorflow GPU \u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb"},"content":{"rendered":"<p>\u300c<a href=\"https:\/\/www.ecobioinfo.com\/?p=1411\">\u6df1\u5c64\u5b66\u7fd2\u3000Ubuntu 20.04 \u306b TensorFlow GPU \u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/a>\u300d\u304b\u30894\u5e74\u4ee5\u4e0a\u7d4c\u904e\u3057\u3066\u3044\u308b\u306e\u3067\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u74b0\u5883\u3092\u65b0\u3057\u304f\u3057\u3088\u3046\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p>\u540c\u3058\u30cf\u30fc\u30c9\u30a6\u30a8\u30a2\u74b0\u5883\u306bUbuntu24.04\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066TensorFlow 2.20.0 \u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3057\u305f\u3002<br \/>\n\u4ee5\u524d\u306f Anaconda \u3092\u4f7f\u7528\u3057\u307e\u3057\u305f\u304c\u3001\u4eca\u56de\u306fAI\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af PyTorch \u3092\u4f7f\u3046\u3053\u3068\u306b\u3057\u307e\u3057\u305f\u3002<br \/>\n\u4ee5\u524d\u306f CUDA, cuCNN \u306a\u3069\u306e\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u500b\u5225\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u3044\u307e\u3057\u305f\u304c\u3001\u4eca\u56de\u306f\u81ea\u52d5\u3067\u9069\u5207\u306a\u30d0\u30fc\u30b8\u30e7\u30f3\u304c\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u307e\u3059\u3002<\/p>\n<p>\uff1c\uff1c\uff1c\u3000\u30cf\u30fc\u30c9\u30a6\u30a7\u30a2\u3000\uff1e\uff1e\uff1e<br \/>\n\u30cf\u30fc\u30c9\uff1a\u30de\u30a6\u30b9\u30b3\u30f3\u30d4\u30e5\u30fc\u30bf\u30fc LM-iH700B2N<br \/>\nCPU\uff1a Intel\u00ae Core\u2122 i3-8100 CPU @ 3.60GHz \u00d7 4<br \/>\n\u30e1\u30e2\u30ea\uff1a 12 GByte<br \/>\n\u672c\u4f53\u96fb\u6e90\uff1a 500W<br \/>\n\u30b0\u30e9\u30d5\u30a3\u30c3\u30af\u30dc\u30fc\u30c9\uff1aNVIDIA GEFORCE GTX1070 \u30e1\u30e2\u30ea 8GB<br \/>\n\u30b9\u30c8\u30ec\u30fc\u30b8\uff1aSSD 256GB<\/p>\n<p>(1) Ubuntu 24.04 \u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/p>\n<p>Ubuntu \u306e\u30b5\u30a4\u30c8\u304b\u3089 Ubuntu Desktop 24.04.3 LTS \u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3001BD\u306b\u713c\u3044\u3066\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\uff08\u30d5\u30a1\u30a4\u30eb\u30b5\u30a4\u30ba\u304c\u5927\u304d\u3044\u306e\u3067\u7247\u9762DVD\u306b\u306f\u713c\u3051\u307e\u305b\u3093\u306e\u3067BD\u306b\u3057\u307e\u3057\u305f\uff09<\/p>\n<p>\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u30b5\u30a4\u30c8<br \/>\n<a href=\"https:\/\/jp.ubuntu.com\/download\">https:\/\/jp.ubuntu.com\/download<\/a><\/p>\n<p>\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u305f\u30d5\u30a1\u30a4\u30eb<br \/>\nubuntu-24.04.3-desktop-amd64.iso <\/p>\n<p>\u4ee5\u524d\u306f\u3001\u65e5\u672c\u8a9e\u30b5\u30a4\u30c8<a href=\"https:\/\/www.ubuntulinux.jp\/download\/ja-remix\">Ubuntu Desktop \u65e5\u672c\u8a9e Remix<\/a>\u304b\u3089\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u3066\u3044\u307e\u3057\u305f\u304c\u300124.04 \u306f\u5bfe\u5fdc\u3057\u3066\u3044\u306a\u304b\u3063\u305f\u306e\u3067\u65e5\u672c\u8a9e\u5bfe\u5fdc\u306f\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u5f8c\u306b\u8a2d\u5b9a\u3059\u308b\u3053\u3068\u306b\u3057\u307e\u3057\u305f\u3002<\/p>\n<p>(2) Ubuntu \u65e5\u672c\u8a9e\u5bfe\u5fdc<\/p>\n<p>\u8a00\u8a9e\u30b5\u30dd\u30fc\u30c8\u306e\u8a2d\u5b9a<\/p>\n<p>\u8a2d\u5b9a\u753b\u9762 settings > System > Region &#038; Language > System > Manage Installed Languages<br \/>\n[\u8a00\u8a9e\u30b5\u30dd\u30fc\u30c8]\u753b\u9762\u306e[\u8a00\u8a9e]\u3001[\u5730\u57df\u30d5\u30a9\u30fc\u30de\u30c3\u30c8]\u3067\u65e5\u672c\u8a9e\u3092\u9078\u629e<\/p>\n<p><a href=\"http:\/\/www.ecobioinfo.com\/?attachment_id=1871\" rel=\"attachment wp-att-1871\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.ecobioinfo.com\/wordpress\/wp-content\/uploads\/2025\/11\/Screenshot-from-2025-10-26-14-03-11-300x161.png\" alt=\"Screenshot from 2025-10-26 14-03-11\" width=\"300\" height=\"161\" class=\"alignnone size-medium wp-image-1871\" srcset=\"https:\/\/www.ecobioinfo.com\/wordpress\/wp-content\/uploads\/2025\/11\/Screenshot-from-2025-10-26-14-03-11-300x161.png 300w, https:\/\/www.ecobioinfo.com\/wordpress\/wp-content\/uploads\/2025\/11\/Screenshot-from-2025-10-26-14-03-11-768x412.png 768w, https:\/\/www.ecobioinfo.com\/wordpress\/wp-content\/uploads\/2025\/11\/Screenshot-from-2025-10-26-14-03-11-1024x549.png 1024w, https:\/\/www.ecobioinfo.com\/wordpress\/wp-content\/uploads\/2025\/11\/Screenshot-from-2025-10-26-14-03-11.png 1119w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>\u65e5\u672c\u8a9e\u5165\u529b\u306f\u3001\u672c\u8a9e\u5909\u63db\u30a8\u30f3\u30b8\u30f3 Mozc \u3068 \u30a4\u30f3\u30d7\u30c3\u30c8\u30e1\u30bd\u30c3\u30c9\uff08IM\uff09Fcitx5 \u306b\u5909\u66f4\u3057\u307e\u3057\u305f\u3002<br \/>\n\uff08\u203bIM \u3092 Fcitx5 \u306b\u5909\u66f4\u3057\u306a\u3044\u5834\u5408 TextEdit\u3067\u65e5\u672c\u8a9e\u304c\u4e8c\u91cd\u306b\u5165\u529b\u3055\u308c\u308b\u30d0\u30b0\u304c\u3042\u308a\u307e\u3057\u305f\u3002\uff09<\/p>\n<p>[\u7aef\u672b\u3067\u958b\u304f]\u3067\u4e0b\u8a18\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c<br \/>\n<code><br \/>\n$ sudo apt update<br \/>\n$ sudo apt -y install language-selector-common<br \/>\n$ sudo apt -y install $(check-language-support)<br \/>\n$ sudo apt update<br \/>\n$ sudo apt -y install fcitx5 fcitx5-mozc fcitx5-configtool<br \/>\n<\/code><\/p>\n<p>\u518d\u8d77\u52d5<\/p>\n<p>Fcitx5, Mozc \u306e\u8a2d\u5b9a\u3068\u78ba\u8a8d\u3001\u8a2d\u5b9a\u5909\u66f4<br \/>\n [\u8a2d\u5b9a]>[\u30b7\u30b9\u30c6\u30e0]>[\u5730\u57df\u3068\u8a00\u8a9e]>[Manage Installed Languages]>[\u30ad\u30fc\u30dc\u30fc\u30c9\u5165\u529b\u306b\u4f7f\u3046IME\u30b7\u30b9\u30c6\u30e0] Fticx5<br \/>\n [\u8a2d\u5b9a]>[\u30ad\u30fc\u30dc\u30fc\u30c9]>[\u5165\u529b\u30bd\u30fc\u30b9] \u65e5\u672c\u8a9e(Mozc)<br \/>\n [\u8a00\u8a9e\u30b5\u30dd\u30fc\u30c8]>[\u8a00\u8a9e]>[\u30ad\u30fc\u30dc\u30fc\u30c9\u5165\u529b\u306b\u4f7f\u3046IME\u30b7\u30b9\u30c6\u30e0] Fcitx5<br \/>\n\u53f3\u4e0a\u306eIME\u306e\u30a2\u30a4\u30b3\u30f3\u3092\u53f3\u30af\u30ea\u30c3\u30af\u3057\u3066[\u8a2d\u5b9a][Mozc\u306e\u8a2d\u5b9a]\u3092\u78ba\u8a8d\u3001\u8a2d\u5b9a\u3092\u5909\u66f4<\/p>\n<p>\uff08\u8a2d\u5b9a\u4f8b\uff09<br \/>\n<a href=\"http:\/\/www.ecobioinfo.com\/?attachment_id=1869\" rel=\"attachment wp-att-1869\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.ecobioinfo.com\/wordpress\/wp-content\/uploads\/2025\/11\/Screenshot-from-2025-10-26-14-50-53-258x300.png\" alt=\"Screenshot from 2025-10-26 14-50-53\" width=\"258\" height=\"300\" class=\"alignnone size-medium wp-image-1869\" srcset=\"https:\/\/www.ecobioinfo.com\/wordpress\/wp-content\/uploads\/2025\/11\/Screenshot-from-2025-10-26-14-50-53-258x300.png 258w, https:\/\/www.ecobioinfo.com\/wordpress\/wp-content\/uploads\/2025\/11\/Screenshot-from-2025-10-26-14-50-53.png 466w\" sizes=\"auto, (max-width: 258px) 100vw, 258px\" \/><\/a><\/p>\n<p><a href=\"http:\/\/www.ecobioinfo.com\/?attachment_id=1876\" rel=\"attachment wp-att-1876\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.ecobioinfo.com\/wordpress\/wp-content\/uploads\/2025\/11\/Screenshot-from-2025-10-26-14-14-47-300x199.png\" alt=\"Screenshot from 2025-10-26 14-14-47\" width=\"300\" height=\"199\" class=\"alignnone size-medium wp-image-1876\" srcset=\"https:\/\/www.ecobioinfo.com\/wordpress\/wp-content\/uploads\/2025\/11\/Screenshot-from-2025-10-26-14-14-47-300x199.png 300w, https:\/\/www.ecobioinfo.com\/wordpress\/wp-content\/uploads\/2025\/11\/Screenshot-from-2025-10-26-14-14-47-768x510.png 768w, https:\/\/www.ecobioinfo.com\/wordpress\/wp-content\/uploads\/2025\/11\/Screenshot-from-2025-10-26-14-14-47.png 975w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p><a href=\"http:\/\/www.ecobioinfo.com\/?attachment_id=1878\" rel=\"attachment wp-att-1878\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.ecobioinfo.com\/wordpress\/wp-content\/uploads\/2025\/11\/Screenshot-from-2025-11-06-18-03-47-300x240.png\" alt=\"Screenshot from 2025-11-06 18-03-47\" width=\"300\" height=\"240\" class=\"alignnone size-medium wp-image-1878\" srcset=\"https:\/\/www.ecobioinfo.com\/wordpress\/wp-content\/uploads\/2025\/11\/Screenshot-from-2025-11-06-18-03-47-300x240.png 300w, https:\/\/www.ecobioinfo.com\/wordpress\/wp-content\/uploads\/2025\/11\/Screenshot-from-2025-11-06-18-03-47-768x615.png 768w, https:\/\/www.ecobioinfo.com\/wordpress\/wp-content\/uploads\/2025\/11\/Screenshot-from-2025-11-06-18-03-47.png 800w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>(3) NVIDIA\u30c9\u30e9\u30a4\u30d0\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/p>\n<p>UEFI\u3067\u30bb\u30ad\u30e5\u30a2\u30d6\u30fc\u30c8\u3092\u5916\u3059\u3002\u4e8b\u524d\u306bOS\u306e\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u306e\u66f4\u65b0\u3092\u5b9f\u884c\u3057\u3066\u304a\u304f\u3002<br \/>\n[\u8a2d\u5b9a]>[\u30b7\u30b9\u30c6\u30e0]>[\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u306e\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8]<\/p>\n<p>ubuntu-drivers tool \u3067\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3057\u305f\u3002<br \/>\n<a href=\"https:\/\/documentation.ubuntu.com\/server\/how-to\/graphics\/install-nvidia-drivers\/\">https:\/\/documentation.ubuntu.com\/server\/how-to\/graphics\/install-nvidia-drivers\/<\/a><\/p>\n<p>ubuntu-drivers-commons \u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<br \/>\n<code><br \/>\n$ sudo apt update<br \/>\n$ sudo apt install ubuntu-drivers-common<br \/>\n<\/code><\/p>\n<p>\u30ea\u30b9\u30c8\u3092\u8868\u793a<br \/>\n<code><br \/>\n$ sudo ubuntu-drivers --gpgpu list<br \/>\n<\/code><\/p>\n<p><code><br \/>\n\u5b9f\u884c\u7d50\u679c------------------<br \/>\n$ sudo ubuntu-drivers --gpgpu list<br \/>\nThis is gpgpu mode<br \/>\n(\u4e2d\u7565)<br \/>\nnvidia-driver-535, (kernel modules provided by linux-modules-nvidia-535-generic-hwe-24.04)<br \/>\nnvidia-driver-580, (kernel modules provided by linux-modules-nvidia-580-generic-hwe-24.04)<br \/>\nnvidia-driver-570, (kernel modules provided by linux-modules-nvidia-570-generic-hwe-24.04)<br \/>\nnvidia-driver-535-server, (kernel modules provided by linux-modules-nvidia-535-server-generic-hwe-24.04)<br \/>\nnvidia-driver-580-server, (kernel modules provided by linux-modules-nvidia-580-server-generic-hwe-24.04)<br \/>\nnvidia-driver-570-server, (kernel modules provided by linux-modules-nvidia-570-server-generic-hwe-24.04)<br \/>\n--------------------------<br \/>\n<\/code><\/p>\n<p>\u30c7\u30d5\u30a9\u30eb\u30c8\u306e\u30c9\u30e9\u30a4\u30d0\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<br \/>\n<code><br \/>\n$ sudo ubuntu-drivers --gpgpu install<br \/>\n<\/code><\/p>\n<p><code><br \/>\n\u5b9f\u884c\u7d50\u679c------------------<br \/>\n$ sudo ubuntu-drivers --gpgpu install<br \/>\nThis is gpgpu mode<br \/>\nudevadm hwdb is deprecated. Use systemd-hwdb instead.<br \/>\nudevadm hwdb is deprecated. Use systemd-hwdb instead.<br \/>\n(\u4e2d\u7565)<br \/>\nFound Windows Boot Manager on \/dev\/sda1@\/efi\/Microsoft\/Boot\/bootmgfw.efi<br \/>\nFound Ubuntu 20.04.6 LTS (20.04) on \/dev\/sdc2<br \/>\nFound Ubuntu 20.04.4 LTS (20.04) on \/dev\/sde2<br \/>\nAdding boot menu entry for UEFI Firmware Settings ...<br \/>\ndone<br \/>\n--------------------------<br \/>\n<\/code><\/p>\n<p>\u518d\u8d77\u52d5<\/p>\n<p>nvidia-smi\u3067\u78ba\u8a8d\u3002<\/p>\n<p><code><br \/>\n\u5b9f\u884c\u7d50\u679c------------------<br \/>\n$ ~\/Desktop$ nvidia-smi<br \/>\nSun Oct 26 16:07:09 2025<br \/>\n+-----------------------------------------------------------------------------------------+<br \/>\n| NVIDIA-SMI 580.95.05              Driver Version: 580.95.05      CUDA Version: 13.0     |<br \/>\n+-----------------------------------------+------------------------+----------------------+<br \/>\n| GPU  Name                 Persistence-M | Bus-Id          Disp.A | Volatile Uncorr. ECC |<br \/>\n| Fan  Temp   Perf          Pwr:Usage\/Cap |           Memory-Usage | GPU-Util  Compute M. |<br \/>\n|                                         |                        |               MIG M. |<br \/>\n|=========================================+========================+======================|<br \/>\n|   0  NVIDIA GeForce GTX 1070        Off |   00000000:01:00.0  On |                  N\/A |<br \/>\n| 27%   30C    P8              9W \/  151W |     173MiB \/   8192MiB |      0%      Default |<br \/>\n|                                         |                        |                  N\/A |<br \/>\n+-----------------------------------------+------------------------+----------------------+<\/p>\n<p>+-----------------------------------------------------------------------------------------+<br \/>\n| Processes:                                                                              |<br \/>\n|  GPU   GI   CI              PID   Type   Process name                        GPU Memory |<br \/>\n|        ID   ID                                                               Usage      |<br \/>\n|=========================================================================================|<br \/>\n|    0   N\/A  N\/A            2270      G   \/usr\/lib\/xorg\/Xorg                       63MiB |<br \/>\n|    0   N\/A  N\/A            2467      G   \/usr\/bin\/gnome-shell                     75MiB |<br \/>\n|    0   N\/A  N\/A            3013      G   \/usr\/bin\/nautilus                        11MiB |<br \/>\n|    0   N\/A  N\/A            3219      G   \/usr\/bin\/gnome-text-editor               12MiB |<br \/>\n+-----------------------------------------------------------------------------------------+<br \/>\n--------------------------<br \/>\n<\/code><\/p>\n<p>Driver Version: 580.95.05 \u304c\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>(4) Python, PyTorch\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/p>\n<p>Python\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<br \/>\n<code><br \/>\n$ sudo apt update<br \/>\n$ sudo apt -y install python3-dev python3-pip python3-setuptools python3-venv<br \/>\n<\/code><\/p>\n<p>\u4eee\u60f3\u74b0\u5883\u3092\u4f5c\u6210\u3057\u3066\u3001PyTorch\u306f\u4eee\u60f3\u74b0\u5883\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3057\u305f\u3002<\/p>\n<p>\u4eee\u60f3\u74b0\u5883\u3092\u4f5c\u6210<br \/>\n<code><br \/>\n$ mkdir ~\/pytorch\/<br \/>\n$ mkdir ~\/pytorch\/tf<br \/>\n$ cd ~\/pytorch\/tf<br \/>\n~\/pytorch\/tf$ python3 -m venv .venv<br \/>\n<\/code><\/p>\n<p>\u4eee\u60f3\u74b0\u5883\u3092\u30a2\u30af\u30c6\u30a3\u30d6\u306b\u3059\u308b<br \/>\n<code><br \/>\n~\/pytorch\/tf$ source .venv\/bin\/activate<br \/>\n(.venv) ~\/pytorch\/tf$<br \/>\n<\/code><\/p>\n<p>pip\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<br \/>\n<code><br \/>\n(.venv) ~\/pytorch\/tf$ pip install --upgrade pip<br \/>\n<\/code><\/p>\n<p>PyTorch\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u30b3\u30de\u30f3\u30c9\u306f\u4ee5\u4e0b\u306e\u30b5\u30a4\u30c8\u3092\u5229\u7528\u3057\u307e\u3057\u305f\u3002<br \/>\n<a href=\"https:\/\/pytorch.org\/get-started\/locally\/\">https:\/\/pytorch.org\/get-started\/locally\/<\/a><\/p>\n<p><a href=\"http:\/\/www.ecobioinfo.com\/?attachment_id=1885\" rel=\"attachment wp-att-1885\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.ecobioinfo.com\/wordpress\/wp-content\/uploads\/2025\/11\/Screenshot-from-2025-10-26-16-19-12-300x201.png\" alt=\"Screenshot from 2025-10-26 16-19-12\" width=\"300\" height=\"201\" class=\"alignnone size-medium wp-image-1885\" srcset=\"https:\/\/www.ecobioinfo.com\/wordpress\/wp-content\/uploads\/2025\/11\/Screenshot-from-2025-10-26-16-19-12-300x201.png 300w, https:\/\/www.ecobioinfo.com\/wordpress\/wp-content\/uploads\/2025\/11\/Screenshot-from-2025-10-26-16-19-12-768x515.png 768w, https:\/\/www.ecobioinfo.com\/wordpress\/wp-content\/uploads\/2025\/11\/Screenshot-from-2025-10-26-16-19-12-1024x686.png 1024w, https:\/\/www.ecobioinfo.com\/wordpress\/wp-content\/uploads\/2025\/11\/Screenshot-from-2025-10-26-16-19-12.png 1137w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>\u74b0\u5883\u306b\u5408\u308f\u305b\u305f\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<br \/>\n<code><br \/>\n(.venv) ~\/pytorch\/tf$ pip3 install torch torchvision --index-url https:\/\/download.pytorch.org\/whl\/cu126<br \/>\n<\/code><\/p>\n<p><code><br \/>\n\u5b9f\u884c\u7d50\u679c------------------<br \/>\n(.venv) on@on-LM-iH700:~\/pytorch\/tf$ pip3 install torch torchvision --index-url https:\/\/download.pytorch.org\/whl\/cu126<br \/>\nLooking in indexes: https:\/\/download.pytorch.org\/whl\/cu126<br \/>\nCollecting torch<br \/>\n\uff08\u4e2d\u7565\uff09<br \/>\nSuccessfully installed filelock-3.19.1 fsspec-2025.9.0 mpmath-1.3.0 networkx-3.5 numpy-2.3.3 nvidia-cublas-cu12-12.6.4.1 nvidia-cuda-cupti-cu12-12.6.80 nvidia-cuda-nvrtc-cu12-12.6.77 nvidia-cuda-runtime-cu12-12.6.77 nvidia-cudnn-cu12-9.10.2.21 nvidia-cufft-cu12-11.3.0.4 nvidia-cufile-cu12-1.11.1.6 nvidia-curand-cu12-10.3.7.77 nvidia-cusolver-cu12-11.7.1.2 nvidia-cusparse-cu12-12.5.4.2 nvidia-cusparselt-cu12-0.7.1 nvidia-nccl-cu12-2.27.5 nvidia-nvjitlink-cu12-12.6.85 nvidia-nvshmem-cu12-3.3.20 nvidia-nvtx-cu12-12.6.77 pillow-11.3.0 sympy-1.14.0 torch-2.9.0+cu126 torchvision-0.24.0+cu126 triton-3.5.0<br \/>\n--------------------------<br \/>\n<\/code><\/p>\n<p>\u78ba\u8a8d<br \/>\n<code><br \/>\nPython\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u78ba\u8a8d<br \/>\n(.venv) ~\/pytorch\/tf$ python3 -V<br \/>\nPython 3.12.3<\/p>\n<p>PyTorch\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u78ba\u8a8d<br \/>\n(.venv) ~\/pytorch\/tf$ python3<br \/>\n>>> import torch<br \/>\n>>> print(torch.__version__)<br \/>\n2.9.0+cu126<br \/>\n<\/code><\/p>\n<p>PyTorch 2.9.0 , CUDA 12.6 \u304c\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u307e\u3057\u305f\u3002<\/p>\n<p>(5)  TensorFlow GPU \u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb <\/p>\n<p>TensorFlow GPU \u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<br \/>\n<a href=\"https:\/\/www.tensorflow.org\/install\/pip?hl=ja#linux\">https:\/\/www.tensorflow.org\/install\/pip?hl=ja#linux<\/a><br \/>\n\u5fc5\u8981\u306a\u30e9\u30a4\u30d6\u30e9\u30ea\u306e\u9069\u5207\u306a\u30d0\u30fc\u30b8\u30e7\u30f3\u304c\u81ea\u52d5\u3067\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u307e\u3059\u3002<\/p>\n<p><code><br \/>\n(.venv) ~\/pytorch\/tf$ pip install tensorflow[and-cuda]<br \/>\n<\/code><\/p>\n<p><code><br \/>\n\u5b9f\u884c\u7d50\u679c------------------<br \/>\n(.venv) ~\/pytorch\/tf$ pip install tensorflow[and-cuda]<br \/>\nCollecting tensorflow[and-cuda]<br \/>\n  Using cached tensorflow-2.20.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (4.5 kB)<br \/>\nCollecting absl-py>=1.0.0 (from tensorflow[and-cuda])<br \/>\n\uff08\u4e2d\u7565\uff09<br \/>\nrich, keras, tensorflow<br \/>\nSuccessfully installed absl-py-2.3.1 astunparse-1.6.3 certifi-2025.10.5 charset_normalizer-3.4.4 flatbuffers-25.9.23 gast-0.6.0 google_pasta-0.2.0 grpcio-1.76.0 h5py-3.15.1 idna-3.11 keras-3.11.3 libclang-18.1.1 markdown-3.9 markdown-it-py-4.0.0 mdurl-0.1.2 ml_dtypes-0.5.3 namex-0.1.0 nvidia-cuda-nvcc-cu12-12.9.86 opt_einsum-3.4.0 optree-0.17.0 packaging-25.0 protobuf-6.33.0 pygments-2.19.2 requests-2.32.5 rich-14.2.0 six-1.17.0 tensorboard-2.20.0 tensorboard-data-server-0.7.2 tensorflow-2.20.0 termcolor-3.1.0 urllib3-2.5.0 werkzeug-3.1.3 wheel-0.45.1 wrapt-2.0.0<br \/>\n--------------------------<br \/>\n<\/code><\/p>\n<p>TenworFlow\u30d0\u30fc\u30b8\u30e7\u30f3\u3068GPU\u306e\u78ba\u8a8d<br \/>\n<code><br \/>\n(.venv) ~\/pytorch\/tf$ python3<br \/>\n>>> import tensorflow as tf<br \/>\n>>> print(tf.__version__)<br \/>\n2.20.0<\/p>\n<p>>>> tf.config.list_physical_devices('GPU')<br \/>\n[PhysicalDevice(name='\/physical_device:GPU:0', device_type='GPU')]<\/p>\n<p>>>> from tensorflow.python.client import device_lib<br \/>\n>>> device_lib.list_local_devices()<br \/>\nWARNING: All log messages before absl::InitializeLog() is called are written to STDERR<br \/>\nI0000 00:00:1761466731.490836    7709 gpu_device.cc:2020] Created device \/device:GPU:0 with 7219 MB memory:  -> device: 0, name: NVIDIA GeForce GTX 1070, pci bus id: 0000:01:00.0, compute capability: 6.1<br \/>\n[name: \"\/device:CPU:0\"<br \/>\ndevice_type: \"CPU\"<br \/>\nmemory_limit: 268435456<br \/>\nlocality {<br \/>\n}<br \/>\nincarnation: 4390102236984811283<br \/>\nxla_global_id: -1<br \/>\n, name: \"\/device:GPU:0\"<br \/>\ndevice_type: \"GPU\"<br \/>\nmemory_limit: 7569801216<br \/>\nlocality {<br \/>\n  bus_id: 1<br \/>\n  links {<br \/>\n  }<br \/>\n}<br \/>\nincarnation: 4235649793141392746<br \/>\nphysical_device_desc: \"device: 0, name: NVIDIA GeForce GTX 1070, pci bus id: 0000:01:00.0, compute capability: 6.1\"<br \/>\nxla_global_id: 416903419<br \/>\n]<br \/>\n>>><br \/>\n<\/code><\/p>\n<p>TernsorFlow\u306e\u30d0\u30fc\u30b8\u30e7\u30f3 2.20.0\u3067\u3001GPU\u3092\u8a8d\u8b58\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>(6) \u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u5b9f\u884c\u3057\u3066\u78ba\u8a8d<\/p>\n<p>\u300c<a href=\"https:\/\/www.ecobioinfo.com\/?p=1411\">\u6df1\u5c64\u5b66\u7fd2\u3000Ubuntu 20.04 \u306b Tensorflow GPU \u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/a>\u300d\u3068\u540c\u3058\u30d7\u30ed\u30b0\u30e9\u30e0 <a href=\"https:\/\/www.ecobioinfo.com\/usr\/ai\/keras_mnist_test.py\">keras_mnist_test.py<\/a> \u3067\u52d5\u4f5c\u78ba\u8a8d\u3057\u307e\u3057\u305f\u3002<\/p>\n<p><code><br \/>\n\u5b9f\u884c\u7d50\u679c------------------<br \/>\n(.venv) ~\/pytorch\/tf$ python3 keras_mnist_test.py<br \/>\n2025-10-25 21:05:02.506047: I tensorflow\/core\/platform\/cpu_feature_guard.cc:210] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations.<br \/>\n\uff08\u4e2d\u7565\uff09<br \/>\n540\/540 \u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501 1s 2ms\/step - accuracy: 0.9271 - loss: 0.2594 - val_accuracy: 0.9562 - val_loss: 0.1661<br \/>\nEpoch 20\/20<br \/>\n540\/540 \u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501 1s 2ms\/step - accuracy: 0.9277 - loss: 0.2565 - val_accuracy: 0.9575 - val_loss: 0.1623<br \/>\n313\/313 \u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501 1s 1ms\/step<br \/>\n[7 2 1 ... 4 5 6]<br \/>\n[7 2 1 ... 4 5 6]<br \/>\n0.9463<br \/>\n--------------------------<br \/>\n<\/code><\/p>\n<p>\u30c6\u30b9\u30c8\u3057\u305f\u7bc4\u56f2\u3067\u306f\u4e92\u63db\u554f\u984c\u3082\u306a\u304f\u4f7f\u3048\u3066\u307e\u3059\u3002<\/p>\n<p>(7) JupyterNotebook \u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/p>\n<p>\u4eee\u60f3\u74b0\u5883\u306bJupyterNotebook\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3057\u305f\u3002<br \/>\n<code><br \/>\n(.venv) ~\/pytorch\/tf$pip3 install Jupyter<br \/>\n(.venv) ~\/pytorch\/tf$pip3 install jupyterlab<br \/>\n<\/code><\/p>\n<p>\u78ba\u8a8d<br \/>\nJupyter notebook \u3092\u8d77\u52d5\u3057\u3066 keras_mnist_test.py \u3092\u5b9f\u884c<\/p>\n<p>\u5b9f\u884c\u7d50\u679c&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br \/>\n<a href=\"http:\/\/www.ecobioinfo.com\/?attachment_id=1892\" rel=\"attachment wp-att-1892\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.ecobioinfo.com\/wordpress\/wp-content\/uploads\/2025\/11\/Screenshot-from-2025-10-26-17-49-17-300x153.png\" alt=\"Screenshot from 2025-10-26 17-49-17\" width=\"300\" height=\"153\" class=\"alignnone size-medium wp-image-1892\" srcset=\"https:\/\/www.ecobioinfo.com\/wordpress\/wp-content\/uploads\/2025\/11\/Screenshot-from-2025-10-26-17-49-17-300x153.png 300w, https:\/\/www.ecobioinfo.com\/wordpress\/wp-content\/uploads\/2025\/11\/Screenshot-from-2025-10-26-17-49-17-768x393.png 768w, https:\/\/www.ecobioinfo.com\/wordpress\/wp-content\/uploads\/2025\/11\/Screenshot-from-2025-10-26-17-49-17-1024x524.png 1024w, https:\/\/www.ecobioinfo.com\/wordpress\/wp-content\/uploads\/2025\/11\/Screenshot-from-2025-10-26-17-49-17.png 1206w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><br \/>\n&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<\/p>\n<p>\u30c6\u30b9\u30c8\u3057\u305f\u7bc4\u56f2\u3067\u306f\u4e92\u63db\u554f\u984c\u3082\u306a\u304f\u4f7f\u3048\u3066\u307e\u3059\u3002<\/p>\n<p>(S.Onda 2025\/11\/07)<\/p>\n<p>\u3010\u53c2\u8003\u3011\uff08\u5916\u90e8\u30b5\u30a4\u30c8\uff09<br \/>\n\u65e5\u672c\u8a9e\u5165\u529b\u8a2d\u5b9a\u306e\u53c2\u8003<br \/>\n\u300c\u91d1\u5b50\u90a6\u5f66\u7814\u7a76\u5ba4 Ubuntu \u3067\u65e5\u672c\u8a9e\u30a4\u30f3\u30d7\u30c3\u30c8\u30fb\u30e1\u30bd\u30c3\u30c9 (Fcitx5 + Mozc) \u3092\u8a2d\u5b9a\u3059\u308b\u300d<br \/>\n<a href=\"https:\/\/www.kkaneko.jp\/tools\/server\/gnome_ja_input_method.html\">https:\/\/www.kkaneko.jp\/tools\/server\/gnome_ja_input_method.html<\/a><\/p>\n<p>PyTorch\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306e\u53c2\u8003<br \/>\n\u300c\u91d1\u5b50\u90a6\u5f66\u7814\u7a76\u5ba4 WSL2 \u4e0a\u306e Ubuntu 24.04 \u3067 NVIDIA CUDA\u3001PyTorch\u3001TensorFlow\uff08\u6700\u65b0\u7248\uff09\u3092\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u3059\u308b\u624b\u9806\u300d<br \/>\n<a href=\"https:\/\/www.kkaneko.jp\/tools\/wsl\/wsl_tensorflow2.html#S2-2\">https:\/\/www.kkaneko.jp\/tools\/wsl\/wsl_tensorflow2.html#S2-2<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\u300c\u6df1\u5c64\u5b66\u7fd2\u3000Ubuntu 20.04 \u306b TensorFlow GPU \u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u300d\u304b\u30894\u5e74\u4ee5\u4e0a\u7d4c\u904e\u3057\u3066\u3044\u308b\u306e\u3067\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u74b0\u5883\u3092\u65b0\u3057\u304f\u3057\u3088\u3046\u3068\u601d\u3044\u307e\u3059\u3002 \u540c\u3058\u30cf\u30fc\u30c9\u30a6\u30a8\u30a2\u74b0\u5883\u306bUbuntu24.04\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057 &#8230;","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[],"class_list":["post-1862","post","type-post","status-publish","format-standard","hentry","category-ai_ecobio"],"_links":{"self":[{"href":"https:\/\/www.ecobioinfo.com\/index.php?rest_route=\/wp\/v2\/posts\/1862","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.ecobioinfo.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.ecobioinfo.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.ecobioinfo.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ecobioinfo.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1862"}],"version-history":[{"count":44,"href":"https:\/\/www.ecobioinfo.com\/index.php?rest_route=\/wp\/v2\/posts\/1862\/revisions"}],"predecessor-version":[{"id":1916,"href":"https:\/\/www.ecobioinfo.com\/index.php?rest_route=\/wp\/v2\/posts\/1862\/revisions\/1916"}],"wp:attachment":[{"href":"https:\/\/www.ecobioinfo.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1862"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ecobioinfo.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1862"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ecobioinfo.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1862"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}