{"id":9538,"date":"2020-10-14T06:43:26","date_gmt":"2020-10-14T06:43:26","guid":{"rendered":"http:\/\/zairyo.susi.oita-u.ac.jp\/wordpress\/?p=9538"},"modified":"2020-10-19T06:17:45","modified_gmt":"2020-10-19T06:17:45","slug":"%e4%bd%9c%e6%a5%ad%e3%83%a1%e3%83%a2-20201014-%e7%a8%ae%e3%80%85%e3%81%ae%e7%92%b0%e5%a2%83%e3%82%92-docker-%e3%81%a7%e4%b8%80%e5%8f%b0%e3%81%ae%e3%83%91%e3%82%bd%e3%82%b3%e3%83%b3%e3%81%ab%e9%9b%86","status":"publish","type":"post","link":"http:\/\/zairyo.susi.oita-u.ac.jp\/wordpress\/?p=9538","title":{"rendered":"(20201014 \u4f5c\u696d\u30e1\u30e2) \u7a2e\u3005\u306e\u74b0\u5883\u3092 docker \u3067\u4e00\u53f0\u306e\u30d1\u30bd\u30b3\u30f3\u306b\u96c6\u7d04\u3059\u308b"},"content":{"rendered":"<p>\u6a5f\u68b0\u5b66\u7fd2\u3092\u5b66\u3073\u59cb\u3081\u305f\u9803\u3001CUPY \u3092\u4f7f\u3063\u3066\u8a08\u7b97\u3057\u3066\u3044\u305f\u306e\u3067\u3059\u304c\u3001\u3053\u306e\u74b0\u5883\u3092 docker \u3067\u518d\u73fe\u3057\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002\u8907\u6570\u306e\u30d1\u30bd\u30b3\u30f3\u306b\u6563\u3089\u3070\u3063\u305f\u30b3\u30fc\u30c9\u3092\u5b9f\u884c\u74b0\u5883\u3082\u308d\u3068\u3082\u4e00\u53f0\u306b\u96c6\u7d04\u3057\u305f\u3044\u3002docker \u306b\u8a73\u3057\u3044\u308f\u3051\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002\u3068\u308a\u3042\u3048\u305a\u3001\u8a66\u884c\u932f\u8aa4\u3092\u8a18\u9332\u3057\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n<p>\u30b3\u30fc\u30c9\u3092\u66f8\u304f\u306e\u306f jupyter \u3067\u3001\u5b9f\u884c\u306f\u7aef\u672b\u304b\u3089\u3059\u308b\u611f\u3058\u3067\u3069\u3046\u304b\u3068\u601d\u3044\u307e\u3059\uff0820201019 \u4eca\u306e\u3068\u3053\u308d\u5b9f\u884c\u3082 jupyter \u3067\u3059\uff09\u3002CUPY \u304c\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u6e08\u307f\u3067\u3001jupyter \u304c\u5229\u7528\u3067\u304d\u308b\u3088\u3046\u306a\u74b0\u5883\u3082\u3001\u3059\u3067\u306b\u8ab0\u304b\u304c\u4f5c\u3063\u3066\u3044\u308b\u306e\u304b\u3082\u3002<\/p>\n<p>\u307e\u305a\u306f\u3001<a href=\"https:\/\/www.tensorflow.org\/install\/docker\">\u3053\u306e\u30b5\u30a4\u30c8<\/a>\u3092\u898b\u306a\u304c\u3089\u3001\u30b3\u30f3\u30c6\u30ca\u3092\u8d77\u52d5\u3057\u3066\u307f\u307e\u3059\u3002<\/p>\n<pre><code style=\"color:midnightblue; font-size:12px;white-space:pre-wrap\">docker run --gpus all -it tensorflow\/tensorflow:latest-gpu bash<\/code><\/pre>\n<p>bash \u304c\u8d77\u52d5\u3057\u3066\u6765\u308b\u308f\u3051\u3067\u3059\u304c\u3001\u3053\u3093\u306a\u753b\u9762\u3067\u3059\u3002<\/p>\n<p><a href=\"http:\/\/zairyo.susi.oita-u.ac.jp\/wordpress\/wp-content\/uploads\/2020\/10\/Screenshot-from-2020-10-14-16-11-33.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/zairyo.susi.oita-u.ac.jp\/wordpress\/wp-content\/uploads\/2020\/10\/Screenshot-from-2020-10-14-16-11-33-300x202.png\" alt=\"\" width=\"300\" height=\"202\" class=\"aligncenter size-medium wp-image-9548\" srcset=\"http:\/\/zairyo.susi.oita-u.ac.jp\/wordpress\/wp-content\/uploads\/2020\/10\/Screenshot-from-2020-10-14-16-11-33-300x202.png 300w, http:\/\/zairyo.susi.oita-u.ac.jp\/wordpress\/wp-content\/uploads\/2020\/10\/Screenshot-from-2020-10-14-16-11-33-600x404.png 600w, http:\/\/zairyo.susi.oita-u.ac.jp\/wordpress\/wp-content\/uploads\/2020\/10\/Screenshot-from-2020-10-14-16-11-33.png 734w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>pip \u304c\u5165\u3063\u3066\u3044\u305f\u306e\u3067\u3001pip list \u3068\u6253\u3063\u3066\u307f\u307e\u3057\u305f\u3002<\/p>\n<pre><code style=\"color:midnightblue; font-size:12px;white-space:pre-wrap\">root@1b66aad56ea9:\/# pip list\r\nPackage                Version\r\n---------------------- ---------------\r\nabsl-py                0.10.0\r\naiohttp                3.6.2\r\nasn1crypto             0.24.0\r\nastunparse             1.6.3\r\nasync-timeout          3.0.1\r\nattrs                  20.2.0\r\ncachetools             4.1.1\r\ncertifi                2020.6.20\r\nchardet                3.0.4\r\ncryptography           2.1.4\r\ngast                   0.3.3\r\ngoogle-auth            1.22.0\r\ngoogle-auth-oauthlib   0.4.1\r\ngoogle-pasta           0.2.0\r\ngrpcio                 1.32.0\r\nh5py                   2.10.0\r\nidna                   2.6\r\nidna-ssl               1.1.0\r\nimportlib-metadata     2.0.0\r\nKeras-Preprocessing    1.1.2\r\nkeyring                10.6.0\r\nkeyrings.alt           3.0\r\nMarkdown               3.2.2\r\nmultidict              4.7.6\r\nnumpy                  1.18.5\r\noauthlib               3.1.0\r\nopt-einsum             3.3.0\r\npip                    20.2.3\r\nprotobuf               3.13.0\r\npyasn1                 0.4.8\r\npyasn1-modules         0.2.8\r\npycrypto               2.6.1\r\npygobject              3.26.1\r\npython-apt             1.6.5+ubuntu0.3\r\npyxdg                  0.25\r\nrequests               2.24.0\r\nrequests-oauthlib      1.3.0\r\nrsa                    4.6\r\nSecretStorage          2.3.1\r\nsetuptools             50.3.0\r\nsix                    1.15.0\r\ntensorboard            2.3.0\r\ntensorboard-plugin-wit 1.7.0\r\ntensorflow-estimator   2.3.0\r\ntensorflow-gpu         2.3.1\r\ntermcolor              1.1.0\r\ntyping-extensions      3.7.4.3\r\nurllib3                1.25.10\r\nWerkzeug               1.0.1\r\nwheel                  0.30.0\r\nwrapt                  1.12.1\r\nyarl                   1.6.0\r\nzipp                   3.2.0\r\nroot@1b66aad56ea9:\/# <\/code><\/pre>\n<p>CUPY \u3084 matplotlib \u3068\u304b\u6b32\u3057\u3044\u3002\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u307f\u307e\u3057\u305f\u3002<\/p>\n<pre><code style=\"color:midnightblue; font-size:12px;white-space:pre-wrap\">pip install matplotlib\r\nCollecting matplotlib\r\n  Downloading matplotlib-3.3.2-cp36-cp36m-manylinux1_x86_64.whl (11.6 MB)\r\n     |\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 11.6 MB 12.2 MB\/s \r\nRequirement already satisfied: certifi>=2020.06.20 in \/usr\/local\/lib\/python3.6\/dist-packages (from matplotlib) (2020.6.20)\r\nRequirement already satisfied: numpy>=1.15 in \/usr\/local\/lib\/python3.6\/dist-packages (from matplotlib) (1.18.5)\r\nCollecting pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.3\r\n  Downloading pyparsing-2.4.7-py2.py3-none-any.whl (67 kB)\r\n     |\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 67 kB 8.3 MB\/s \r\nCollecting python-dateutil>=2.1\r\n  Downloading python_dateutil-2.8.1-py2.py3-none-any.whl (227 kB)\r\n     |\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 227 kB 11.1 MB\/s \r\nCollecting pillow>=6.2.0\r\n  Downloading Pillow-8.0.0-cp36-cp36m-manylinux1_x86_64.whl (2.2 MB)\r\n     |\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 2.2 MB 13.2 MB\/s \r\nCollecting kiwisolver>=1.0.1\r\n  Downloading kiwisolver-1.2.0-cp36-cp36m-manylinux1_x86_64.whl (88 kB)\r\n     |\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 88 kB 9.5 MB\/s \r\nCollecting cycler>=0.10\r\n  Downloading cycler-0.10.0-py2.py3-none-any.whl (6.5 kB)\r\nRequirement already satisfied: six>=1.5 in \/usr\/local\/lib\/python3.6\/dist-packages (from python-dateutil>=2.1->matplotlib) (1.15.0)\r\nInstalling collected packages: pyparsing, python-dateutil, pillow, kiwisolver, cycler, matplotlib\r\nSuccessfully installed cycler-0.10.0 kiwisolver-1.2.0 matplotlib-3.3.2 pillow-8.0.0 pyparsing-2.4.7 python-dateutil-2.8.1<\/code><\/pre>\n<p>\u666e\u901a\u306b\u5165\u308a\u307e\u3059\u3002pip list \u306e\u51fa\u529b\u3067\u3059\u3002\u5197\u9577\u3067\u3059\u304c\u305d\u306e\u307e\u307e\u3002<\/p>\n<pre><code style=\"color:midnightblue; font-size:12px;white-space:pre-wrap\">pip list\r\nPackage                Version\r\n---------------------- ---------------\r\nabsl-py                0.10.0\r\naiohttp                3.6.2\r\nasn1crypto             0.24.0\r\nastunparse             1.6.3\r\nasync-timeout          3.0.1\r\nattrs                  20.2.0\r\ncachetools             4.1.1\r\ncertifi                2020.6.20\r\nchardet                3.0.4\r\ncryptography           2.1.4\r\ncycler                 0.10.0\r\ngast                   0.3.3\r\ngoogle-auth            1.22.0\r\ngoogle-auth-oauthlib   0.4.1\r\ngoogle-pasta           0.2.0\r\ngrpcio                 1.32.0\r\nh5py                   2.10.0\r\nidna                   2.6\r\nidna-ssl               1.1.0\r\nimportlib-metadata     2.0.0\r\nKeras-Preprocessing    1.1.2\r\nkeyring                10.6.0\r\nkeyrings.alt           3.0\r\nkiwisolver             1.2.0\r\nMarkdown               3.2.2\r\nmatplotlib             3.3.2\r\nmultidict              4.7.6\r\nnumpy                  1.18.5\r\noauthlib               3.1.0\r\nopt-einsum             3.3.0\r\nPillow                 8.0.0\r\npip                    20.2.3\r\nprotobuf               3.13.0\r\npyasn1                 0.4.8\r\npyasn1-modules         0.2.8\r\npycrypto               2.6.1\r\npygobject              3.26.1\r\npyparsing              2.4.7\r\npython-apt             1.6.5+ubuntu0.3\r\npython-dateutil        2.8.1\r\npyxdg                  0.25\r\nrequests               2.24.0\r\nrequests-oauthlib      1.3.0\r\nrsa                    4.6\r\nSecretStorage          2.3.1\r\nsetuptools             50.3.0\r\nsix                    1.15.0\r\ntensorboard            2.3.0\r\ntensorboard-plugin-wit 1.7.0\r\ntensorflow-estimator   2.3.0\r\ntensorflow-gpu         2.3.1\r\ntermcolor              1.1.0\r\ntyping-extensions      3.7.4.3\r\nurllib3                1.25.10\r\nWerkzeug               1.0.1\r\nwheel                  0.30.0\r\nwrapt                  1.12.1\r\nyarl                   1.6.0\r\nzipp                   3.2.0\r\n<\/code><\/pre>\n<p>\u3044\u3063\u305f\u3093 exit \u3067\u7d42\u4e86\u3059\u308b\u3002\u30b3\u30f3\u30c6\u30ca\u306e bash \u304b\u3089\u3001\u30db\u30b9\u30c8\u306e bash \u306b\u79fb\u308b\u3002<\/p>\n<pre><code style=\"color:midnightblue; font-size:12px;white-space:pre-wrap\">root@1b66aad56ea9:\/home# exit\r\nexit\r\nfriend@z390:~$ <\/code><\/pre>\n<p>\u30b3\u30f3\u30c6\u30ca\u306e\u78ba\u8a8d\u3092\u3057\u3066\u307f\u308b\u3068\u3001\u5148\u307b\u3069\u306e\u30b3\u30f3\u30c6\u30ca\uff081b66aad56ea9\uff09\u304c\u505c\u6b62\u3057\u3066\u3044\u308b\u3002<\/p>\n<pre><code style=\"color:midnightblue; font-size:12px;white-space:pre-wrap\">$ docker ps -a\r\nCONTAINER ID        IMAGE                                          COMMAND                  CREATED             STATUS                      PORTS                    NAMES\r\n1b66aad56ea9        tensorflow\/tensorflow:latest-gpu               \"bash\"                   23 hours ago        Exited (0) 15 seconds ago                            objective_galois\r\n41258b29d47d        tensorflow\/tensorflow:1.14.0-gpu-py3-jupyter   \"bash -c 'source \/et\u2026\"   12 days ago         Created                     0.0.0.0:8888->8888\/tcp   angry_dhawan\r\n9cc4e5d8b261        tensorflow\/tensorflow:1.14.0-gpu-py3-jupyter   \"bash -c 'source \/et\u2026\"   3 weeks ago         Exited (0) 2 weeks ago                               frosty_johnson<\/code><\/pre>\n<p>commit \u3068\u3044\u3046\u30b3\u30de\u30f3\u30c9\u304c\u3042\u3063\u3066\u3001\u30b3\u30f3\u30c6\u30ca\u8d77\u52d5\u6642\u306e\u6539\u5909\u3092\u53cd\u6620\u3055\u305b\u308b\u3089\u3057\u3044\u3002\u9069\u5f53\u306a\u540d\u524d\u3092\u4ed8\u3051\u3066\u3001\u6539\u5909\u3092\u53cd\u6620\u3055\u305b\u305f\u30a4\u30e1\u30fc\u30b8\u3092\u4f5c\u3063\u3066\u307f\u308b\u3002<\/p>\n<pre><code style=\"color:midnightblue; font-size:12px;white-space:pre-wrap\">$ docker commit 1b66aad56ea9 tensorflow\/tensorflow:latest-gpu-a\r\nsha256:86a7a8a48459a281417804cf539434d90ed348cb5c2838b79ce2ab471c02e1d2<\/code><\/pre>\n<p>docker \u30a4\u30e1\u30fc\u30b8\u306e\u30ea\u30b9\u30c8\u3092\u307f\u3066\u307f\u308b\u3002<\/p>\n<pre><code style=\"color:midnightblue; font-size:12px;white-space:pre-wrap\">$ docker images\r\nREPOSITORY                  TAG                      IMAGE ID            CREATED             SIZE\r\ntensorflow\/tensorflow       latest-gpu-a             86a7a8a48459        15 seconds ago      3.11GB\r\ntensorflow\/tensorflow       latest-gpu               8a8486aa1902        2 weeks ago         3.05GB\r\ntensorflow\/tensorflow       latest-gpu-jupyter       f0b0261fec71        2 months ago        3.3GB\r\ntensorflow\/tensorflow       1.14.0-gpu-py3-jupyter   60c989453335        16 months ago       3.65GB\r\nnvcr.io\/nvidia\/tensorflow   19.02-py3                a69e20c13cca        20 months ago       6.05GB\r\nnvcr.io\/nvidia\/tensorflow   18.09-py3                cdb03344e1b3        2 years ago         3.75GB\r\nnvcr.io\/nvidia\/tensorflow   18.01-py2                377b46c75bfc        2 years ago         2.88GB<\/code><\/pre>\n<p>\u65b0\u3057\u304f\u3001tensorflow\/tensorflow:latest-gpu-a \u304c\u52a0\u308f\u3063\u3066\u3044\u305f\u3002\u65b0\u3057\u3044\u30a4\u30e1\u30fc\u30b8\u3067\u8d77\u52d5\u3059\u308b\u3002<\/p>\n<pre><code style=\"color:midnightblue; font-size:12px;white-space:pre-wrap\">$ docker run --gpus all -it tensorflow\/tensorflow:latest-gpu-a bash \r\n\r\n________                               _______________                \r\n___  __\/__________________________________  ____\/__  \/________      __\r\n__  \/  _  _ \\_  __ \\_  ___\/  __ \\_  ___\/_  \/_   __  \/_  __ \\_ | \/| \/ \/\r\n_  \/   \/  __\/  \/ \/ \/(__  )\/ \/_\/ \/  \/   _  __\/   _  \/ \/ \/_\/ \/_ |\/ |\/ \/ \r\n\/_\/    \\___\/\/_\/ \/_\/\/____\/ \\____\/\/_\/    \/_\/      \/_\/  \\____\/____\/|__\/\r\n\r\n\r\nWARNING: You are running this container as root, which can cause new files in\r\nmounted volumes to be created as the root user on your host machine.\r\n\r\nTo avoid this, run the container by specifying your user's userid:\r\n\r\n$ docker run -u $(id -u):$(id -g) args...\r\n\r\n<\/code><\/pre>\n<p>pip list \u3067 matplotlib \u304c\u3042\u308b\u304b\u3069\u3046\u304b\u78ba\u8a8d\u3059\u308b\u3002<\/p>\n<pre><code style=\"color:midnightblue; font-size:12px;white-space:pre-wrap\">root@f2f457c86eb7:\/# pip list\r\nPackage                Version\r\n---------------------- ---------------\r\nabsl-py                0.10.0\r\naiohttp                3.6.2\r\nasn1crypto             0.24.0\r\nastunparse             1.6.3\r\nasync-timeout          3.0.1\r\nattrs                  20.2.0\r\ncachetools             4.1.1\r\ncertifi                2020.6.20\r\nchardet                3.0.4\r\ncryptography           2.1.4\r\ncycler                 0.10.0\r\ngast                   0.3.3\r\ngoogle-auth            1.22.0\r\ngoogle-auth-oauthlib   0.4.1\r\ngoogle-pasta           0.2.0\r\ngrpcio                 1.32.0\r\nh5py                   2.10.0\r\nidna                   2.6\r\nidna-ssl               1.1.0\r\nimportlib-metadata     2.0.0\r\nKeras-Preprocessing    1.1.2\r\nkeyring                10.6.0\r\nkeyrings.alt           3.0\r\nkiwisolver             1.2.0\r\nMarkdown               3.2.2\r\nmatplotlib             3.3.2\r\nmultidict              4.7.6\r\nnumpy                  1.18.5\r\noauthlib               3.1.0\r\nopt-einsum             3.3.0\r\nPillow                 8.0.0\r\npip                    20.2.3\r\nprotobuf               3.13.0\r\npyasn1                 0.4.8\r\npyasn1-modules         0.2.8\r\npycrypto               2.6.1\r\npygobject              3.26.1\r\npyparsing              2.4.7\r\npython-apt             1.6.5+ubuntu0.3\r\npython-dateutil        2.8.1\r\npyxdg                  0.25\r\nrequests               2.24.0\r\nrequests-oauthlib      1.3.0\r\nrsa                    4.6\r\nSecretStorage          2.3.1\r\nsetuptools             50.3.0\r\nsix                    1.15.0\r\ntensorboard            2.3.0\r\ntensorboard-plugin-wit 1.7.0\r\ntensorflow-estimator   2.3.0\r\ntensorflow-gpu         2.3.1\r\ntermcolor              1.1.0\r\ntyping-extensions      3.7.4.3\r\nurllib3                1.25.10\r\nWerkzeug               1.0.1\r\nwheel                  0.30.0\r\nwrapt                  1.12.1\r\nyarl                   1.6.0\r\nzipp                   3.2.0<\/code><\/pre>\n<p>\u78ba\u304b\u306b\u53cd\u6620\u3055\u308c\u3066\u3044\u305f\u3002\u4ed6\u306b\u3001pandas, scikit-learn, seaborn, jupyter \u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u305f\u3002<\/p>\n<p>\u6b21\u306b\u3001jupyter \u3092\u5229\u7528\u3059\u308b\u3053\u3068\u3092\u8003\u3048\u308b\u3002\u65b0\u3057\u3044\u30a4\u30e1\u30fc\u30b8\u3067\u8d77\u52d5\u3059\u308b\u3002\u4ee5\u524d\u306b jupyter \u7528\u306e\u30a4\u30e1\u30fc\u30b8\u3092\u8d77\u52d5\u3059\u308b\u3068\u304d\u306b port \u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u4ed8\u3051\u305f\u306e\u3067\u3001\u305d\u308c\u3092\u53c2\u8003\u306b\u3057\u305f\u3002<\/p>\n<pre><code style=\"color:midnightblue; font-size:12px;white-space:pre-wrap\">$ docker run --gpus all -it -p 8888:8888 tensorflow\/tensorflow:latest-gpu-a bash\r\n<\/code><\/pre>\n<p>\u30b3\u30f3\u30c6\u30ca\u5185\u3067\u3001\u666e\u901a\u306b\u30b3\u30de\u30f3\u30c9 jupyter notebook \u3092\u6253\u3063\u3066\u3082\u30a8\u30e9\u30fc\u3092\u751f\u3058\u3066\u8d77\u52d5\u305b\u305a\u3002\u901a\u5e38\u30d6\u30e9\u30a6\u30b6\u304c\u81ea\u52d5\u7684\u306b\u8d77\u52d5\u3057\u3066\u304f\u308b\u306e\u3067\u3001\u305d\u308c\u306f\u305d\u3046\u3060\u308d\u3046\u3068\u601d\u3046\u3002\u3088\u304f\u308f\u304b\u3089\u306a\u3044\u3051\u3069\u3001\u4e0b\u8a18\u306e\u3088\u3046\u306b\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u4ed8\u3051\u3066\u307f\u305f\u3002\u304d\u3063\u3068\u3042\u3068\u3067\u5909\u66f4\u304c\u3042\u308b\u3068\u601d\u3046\u304c\u3001\u8d77\u52d5\u3059\u308b\u3053\u3068\u306f\u8d77\u52d5\u3057\u305f\u3002<\/p>\n<pre><code style=\"color:midnightblue; font-size:12px;white-space:pre-wrap\">root@b5baf4cc44c4:\/# jupyter notebook --ip 0.0.0.0 --port 8888 --no-browser --allow-root<\/code><\/pre>\n<p>\u7aef\u672b\u306b\u8868\u793a\u3055\u308c\u305f\u30ea\u30f3\u30af\u3092\u30d6\u30e9\u30a6\u30b6\u3067\u958b\u304f\u3068\u3001jupyter \u304c\u8d77\u52d5\u3057\u3066\u3044\u308b\u3002<\/p>\n<p><a href=\"http:\/\/zairyo.susi.oita-u.ac.jp\/wordpress\/wp-content\/uploads\/2020\/10\/Screenshot-from-2020-10-15-16-50-28.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/zairyo.susi.oita-u.ac.jp\/wordpress\/wp-content\/uploads\/2020\/10\/Screenshot-from-2020-10-15-16-50-28-300x246.png\" alt=\"\" width=\"300\" height=\"246\" class=\"aligncenter size-medium wp-image-9566\" srcset=\"http:\/\/zairyo.susi.oita-u.ac.jp\/wordpress\/wp-content\/uploads\/2020\/10\/Screenshot-from-2020-10-15-16-50-28-300x246.png 300w, http:\/\/zairyo.susi.oita-u.ac.jp\/wordpress\/wp-content\/uploads\/2020\/10\/Screenshot-from-2020-10-15-16-50-28-768x630.png 768w, http:\/\/zairyo.susi.oita-u.ac.jp\/wordpress\/wp-content\/uploads\/2020\/10\/Screenshot-from-2020-10-15-16-50-28-1024x840.png 1024w, http:\/\/zairyo.susi.oita-u.ac.jp\/wordpress\/wp-content\/uploads\/2020\/10\/Screenshot-from-2020-10-15-16-50-28-600x492.png 600w, http:\/\/zairyo.susi.oita-u.ac.jp\/wordpress\/wp-content\/uploads\/2020\/10\/Screenshot-from-2020-10-15-16-50-28.png 1264w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>cupy \u3092\u307e\u3060\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u3044\u306a\u304b\u3063\u305f\u3002<\/p>\n<pre><code style=\"color:midnightblue; font-size:12px;white-space:pre-wrap\">root@b5baf4cc44c4:\/# pip install cupy-cuda110\r\nCollecting cupy-cuda110\r\n  Downloading cupy_cuda110-8.0.0-cp36-cp36m-manylinux1_x86_64.whl (148.5 MB)\r\n     |\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 148.5 MB 18 kB\/s \r\nRequirement already satisfied: numpy>=1.15 in \/usr\/local\/lib\/python3.6\/dist-packages (from cupy-cuda110) (1.18.5)\r\nCollecting fastrlock>=0.3\r\n  Downloading fastrlock-0.5-cp36-cp36m-manylinux1_x86_64.whl (31 kB)\r\nInstalling collected packages: fastrlock, cupy-cuda110\r\nSuccessfully installed cupy-cuda110-8.0.0 fastrlock-0.5<\/code><\/pre>\n<p>\u30db\u30b9\u30c8\u306e\u30d5\u30a9\u30eb\u30c0\u30fc\u3068\u30b3\u30f3\u30c6\u30ca\u306e\u30d5\u30a9\u30eb\u30c0\u30fc\u3092\u7e4b\u3044\u3067\u307f\u308b\u3002\u4e21\u65b9\u3068\u3082\u4e8b\u524d\u306b\u30d5\u30a9\u30eb\u30c0\u30fc\u3092\u7528\u610f\u3057\u3066\u304a\u3044\u305f\u3002<\/p>\n<pre><code style=\"color:midnightblue; font-size:12px;white-space:pre-wrap\">$ docker run --gpus all -it -p 8888:8888 -v $HOME\/rtx2070:\/home\/rtx2070 tensorflow\/tensorflow:latest-gpu-a bash<\/code><\/pre>\n<p>\u3053\u308c\u3067\u3001\u30db\u30b9\u30c8\u306b\u3042\u308b\u30b3\u30fc\u30c9\u304c\u5229\u7528\u3067\u304d\u308b\u3002<\/p>\n<p>\u3057\u304b\u3057\u3001\u5b9f\u884c\u3059\u308b\u3068 cupy \u3092\u5229\u7528\u3059\u308b\u30b3\u30fc\u30c9\u304c\u4e0a\u624b\u304f\u52d5\u304b\u306a\u3044\u3002\u660e\u65e5\u307e\u305f\u8abf\u6574\u304c\u5fc5\u8981\u3060\u3002<\/p>\n<p><strong>(20201016)<\/strong><\/p>\n<p>CUPY \u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u304c CUDA \u3068\u5408\u3063\u3066\u3044\u306a\u304b\u3063\u305f\u3088\u3046\u3060\u3002\u30b3\u30f3\u30c6\u30ca\u5185\u3067 CUDA \u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u78ba\u304b\u3081\u308b\u3002<\/p>\n<pre><code style=\"color:midnightblue; font-size:12px;white-space:pre-wrap\">root@9994809eda68:\/home\/rtx2070# nvcc -V\r\nnvcc: NVIDIA (R) Cuda compiler driver\r\nCopyright (c) 2005-2019 NVIDIA Corporation\r\nBuilt on Sun_Jul_28_19:07:16_PDT_2019\r\nCuda compilation tools, release 10.1, V10.1.243<\/code><\/pre>\n<p>CUDA 10.1 \u3068\u5408\u3046 CUPY \u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u306f\u3001<a href=\"https:\/\/hub.docker.com\/r\/cupy\/cupy\/\">\u3053\u3053\u306e\u8a18\u4e8b<\/a>\u306b\u3088\u308b\u3068\u3001cuda-cupy110 \u3067\u306f\u306a\u3044\u3088\u3046\u3067\u3042\u308b\u3002\u3068\u308a\u3042\u3048\u305a CUPY \u3092\u30a2\u30f3\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\uff08\u3053\u306e\u30b5\u30a4\u30c8\u306e\u30a4\u30e1\u30fc\u30b8\u3092\u4f7f\u3048\u3070\u4f55\u3067\u3082\u306a\u3044\u306e\u3067\u306f\u306a\u3044\u304b\u306a\uff1f\uff09\u3002<\/p>\n<pre><code style=\"color:midnightblue; font-size:12px;white-space:pre-wrap\">root@9994809eda68:\/home\/rtx2070# pip uninstall cupy-cuda110\r\nFound existing installation: cupy-cuda110 8.0.0\r\nUninstalling cupy-cuda110-8.0.0:\r\n  Would remove:\r\n    \/usr\/local\/lib\/python3.6\/dist-packages\/cupy\/*\r\n    \/usr\/local\/lib\/python3.6\/dist-packages\/cupy_backends\/*\r\n    \/usr\/local\/lib\/python3.6\/dist-packages\/cupy_cuda110-8.0.0.dist-info\/*\r\n    \/usr\/local\/lib\/python3.6\/dist-packages\/cupyx\/*\r\nProceed (y\/n)? y\r\n  Successfully uninstalled cupy-cuda110-8.0.0<\/code><\/pre>\n<p>\u5f15\u304d\u7d9a\u3044\u3066\u3001 \u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3002<\/p>\n<pre><code style=\"color:midnightblue; font-size:12px;white-space:pre-wrap\">root@9994809eda68:\/home\/rtx2070# pip install cupy-cuda101\r\nCollecting cupy-cuda101\r\n  Downloading cupy_cuda101-8.0.0-cp36-cp36m-manylinux1_x86_64.whl (115.3 MB)\r\n     |\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 115.3 MB 188 kB\/s \r\nRequirement already satisfied: numpy>=1.15 in \/usr\/local\/lib\/python3.6\/dist-packages (from cupy-cuda101) (1.18.5)\r\nRequirement already satisfied: fastrlock>=0.3 in \/usr\/local\/lib\/python3.6\/dist-packages (from cupy-cuda101) (0.5)\r\nInstalling collected packages: cupy-cuda101\r\nSuccessfully installed cupy-cuda101-8.0.0<\/code><\/pre>\n<p>\u518d\u63b2\u3067\u3059\u304c\u3001 jupyter \u306e\u8d77\u52d5\u3002<\/p>\n<pre><code style=\"color:midnightblue; font-size:12px;white-space:pre-wrap\">root@9994809eda68:\/home\/rtx2070# jupyter notebook --ip 0.0.0.0 --port 8888 --no-browser --allow-root<\/code><\/pre>\n<p>\u3053\u308c\u3067\u3001\u52d5\u3044\u305f\u3002<\/p>\n<p><a href=\"http:\/\/zairyo.susi.oita-u.ac.jp\/wordpress\/wp-content\/uploads\/2020\/10\/Screenshot-from-2020-10-16-11-03-26.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/zairyo.susi.oita-u.ac.jp\/wordpress\/wp-content\/uploads\/2020\/10\/Screenshot-from-2020-10-16-11-03-26-300x246.png\" alt=\"\" width=\"300\" height=\"246\" class=\"aligncenter size-medium wp-image-9575\" srcset=\"http:\/\/zairyo.susi.oita-u.ac.jp\/wordpress\/wp-content\/uploads\/2020\/10\/Screenshot-from-2020-10-16-11-03-26-300x246.png 300w, http:\/\/zairyo.susi.oita-u.ac.jp\/wordpress\/wp-content\/uploads\/2020\/10\/Screenshot-from-2020-10-16-11-03-26-768x630.png 768w, http:\/\/zairyo.susi.oita-u.ac.jp\/wordpress\/wp-content\/uploads\/2020\/10\/Screenshot-from-2020-10-16-11-03-26-1024x840.png 1024w, http:\/\/zairyo.susi.oita-u.ac.jp\/wordpress\/wp-content\/uploads\/2020\/10\/Screenshot-from-2020-10-16-11-03-26-600x492.png 600w, http:\/\/zairyo.susi.oita-u.ac.jp\/wordpress\/wp-content\/uploads\/2020\/10\/Screenshot-from-2020-10-16-11-03-26.png 1264w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>\u30b3\u30f3\u30c6\u30ca\u3092\u7d42\u4e86\u3059\u308b\u3002\u73fe\u5728\u306e\u30b3\u30f3\u30c6\u30ca\u3092\u78ba\u8a8d\u3059\u308b\u3002<\/p>\n<pre><code style=\"color:midnightblue; font-size:12px;white-space:pre-wrap\">friend@z390:~$ docker ps -a\r\nCONTAINER ID        IMAGE                                          COMMAND                  CREATED             STATUS                       PORTS                    NAMES\r\n9994809eda68        tensorflow\/tensorflow:latest-gpu-a             \"bash\"                   18 hours ago        Exited (130) 6 seconds ago                            exciting_goodall\r\ndb89b75f006b        tensorflow\/tensorflow:latest-gpu               \"bash\"                   20 hours ago        Exited (0) 20 hours ago                               heuristic_banach\r\n41258b29d47d        tensorflow\/tensorflow:1.14.0-gpu-py3-jupyter   \"bash -c 'source \/et\u2026\"   13 days ago         Created                      0.0.0.0:8888->8888\/tcp   angry_dhawan\r\n9cc4e5d8b261        tensorflow\/tensorflow:1.14.0-gpu-py3-jupyter   \"bash -c 'source \/et\u2026\"   4 weeks ago         Exited (0) 2 weeks ago                                frosty_johnson<\/code><\/pre>\n<p>CUPY \u3092\u5165\u308c\u66ff\u3048\u305f\u306e\u3067\u3001commit \u304c\u5fc5\u8981\u3060\u304c\u3001commit \u306f\u4e0a\u66f8\u304d\u304c\u3067\u304d\u308b\u3088\u3046\u3060\u3002<\/p>\n<pre><code style=\"color:midnightblue; font-size:12px;white-space:pre-wrap\">friend@z390:~$ docker commit 9994809eda68 tensorflow\/tensorflow:latest-gpu-a\r\nsha256:50f329f8ced7c6c99dc1afeb3a764a399167f49de282b59dee363121f31cbe71<\/code><\/pre>\n<p>\u3053\u308c\u3067\u3001\u8a08\u7b97\u306e\u74b0\u5883\u3092\u4e00\u53f0\u306b\u96c6\u7d04\u3067\u304d\u305d\u3046\u3002<\/p>\n<p>\u30b3\u30de\u30f3\u30c9\u304c\u9577\u3044\u306e\u3067\u3001\u30b7\u30a7\u30eb\u30b9\u30af\u30ea\u30d7\u30c8\uff08\u30d5\u30a1\u30a4\u30eb\u540d:docker_cupy.sh\uff09\u306b\u3057\u305f\u3002<code>bash .\/docker_cupy.sh<\/code> \u3067\u8d77\u52d5\u3059\u308b\u3002\u30d5\u30a1\u30a4\u30eb\u306e\u8a18\u8f09\u5185\u5bb9\u306f\u4e0b\u8a18\u3002<\/p>\n<pre><code style=\"color:midnightblue; font-size:12px;white-space:pre-wrap\">#!\/bin\/bash\r\n\r\ndocker run --gpus all -it -p 8888:8888 -v $HOME\/projects:\/home\/projects tensorflow\/tensorflow:latest-gpu-a bash\r\n\r\nexit 0<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u6a5f\u68b0\u5b66\u7fd2\u3092\u5b66\u3073\u59cb\u3081\u305f\u9803\u3001CUPY \u3092\u4f7f\u3063\u3066\u8a08\u7b97\u3057\u3066\u3044\u305f\u306e\u3067\u3059\u304c\u3001\u3053\u306e\u74b0\u5883\u3092 do &#8230; <a class=\"more-link\" href=\"http:\/\/zairyo.susi.oita-u.ac.jp\/wordpress\/?p=9538\">Read More &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-9538","post","type-post","status-publish","format-standard","hentry","category-column"],"_links":{"self":[{"href":"http:\/\/zairyo.susi.oita-u.ac.jp\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/9538","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/zairyo.susi.oita-u.ac.jp\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/zairyo.susi.oita-u.ac.jp\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/zairyo.susi.oita-u.ac.jp\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/zairyo.susi.oita-u.ac.jp\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=9538"}],"version-history":[{"count":42,"href":"http:\/\/zairyo.susi.oita-u.ac.jp\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/9538\/revisions"}],"predecessor-version":[{"id":9584,"href":"http:\/\/zairyo.susi.oita-u.ac.jp\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/9538\/revisions\/9584"}],"wp:attachment":[{"href":"http:\/\/zairyo.susi.oita-u.ac.jp\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=9538"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/zairyo.susi.oita-u.ac.jp\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=9538"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/zairyo.susi.oita-u.ac.jp\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=9538"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}