{"id":5884,"date":"2020-06-02T07:00:50","date_gmt":"2020-06-01T22:00:50","guid":{"rendered":"https:\/\/www.ecomottblog.com\/?p=5884"},"modified":"2020-06-16T11:45:23","modified_gmt":"2020-06-16T02:45:23","slug":"singularity%e3%81%a7jupyter-notebook%e3%82%92%e3%82%b3%e3%83%9e%e3%83%b3%e3%83%89%e5%ae%9f%e8%a1%8c%e3%81%97%e3%81%a6%e5%b8%b0%e3%82%8a%e3%81%9f%e3%81%84","status":"publish","type":"post","link":"https:\/\/test.ecomottblog.com\/?p=5884","title":{"rendered":"\u3044\u3063\u305d\u6761\u4ef6\u3054\u3068\u306bSingularity\u30b3\u30f3\u30c6\u30ca\u7acb\u3061\u4e0a\u3052\u3066Jupyter Notebook\u3092\u30b3\u30de\u30f3\u30c9\u5b9f\u884c\u3057\u3061\u3083\u3044\u307e\u3057\u3087\u3046"},"content":{"rendered":"<h1>\u306f\u3058\u3081\u306b<\/h1>\n<p>\u3053\u3093\u306b\u3061\u306f\u3002<br \/>\n\u5ca9\u6d25\u3067\u3059\u3002<\/p>\n<p>\u5f0a\u793e\u3067\u306f\u798f\u5229\u539a\u751f\u306e\u4e00\u74b0\u2026\u3068\u3044\u3046\u308f\u3051\u3067\u306f\u306a\u3044\u3068\u601d\u3044\u307e\u3059\u304c\u3001Nvidia\u306eGPU\u30ef\u30fc\u30af\u30b9\u30c6\u30fc\u30b7\u30e7\u30f3\u3092\u793e\u5185\u304b\u3089\u6280\u8853\u90e8\u9580\u306e\u307f\u306a\u3089\u305a\u8ab0\u3067\u3082\u5229\u7528\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\uff08\u7533\u8acb\u3055\u3048\u3059\u308c\u3070\uff09\u3002<\/p>\n<p>\u3069\u3046\u3044\u3046\u3082\u306e\u304b\u3068\u3044\u3046\u3068\u3001\u3053\u3046\u3044\u3046\u3082\u306e\u3067\u3059\u3002\u2193<\/p>\n<p>\u904e\u53bb\u30d6\u30ed\u30b0\u53c2\u7167\uff1a<a href=\"https:\/\/www.ecomottblog.com\/?p=3724\">DGX-STATION\u3092\u5c0e\u5165\u3057\u307e\u3057\u305f\uff01<\/a><\/p>\n<p>\u74b0\u5883\u304c\u7528\u610f\u3055\u308c\u3066\u3044\u308b\u3068\u3044\u3046\u306e\u306f\u975e\u5e38\u306b\u5927\u4e8b\u306a\u3068\u3053\u308d\u3067\u306f\u3042\u308b\u3082\u306e\u306e&#8221;\u8ab0\u3067\u3082\u89e6\u308c\u308b&#8221;\u3068\u3044\u3063\u3066\u3082\u73fe\u5b9f\u7684\u306b\u306f\u30cf\u30fc\u30c9\u30eb\u304c\u9ad8\u3044\u3068\u3053\u308d\u3082\u3042\u3063\u305f\u308a\u3059\u308b\u306e\u3067\u3001\u5e83\u304f\u4e00\u822c\u3068\u3044\u3046\u306e\u306f\u306a\u304b\u306a\u304b\u96e3\u3057\u3044\u3068\u3053\u308d\u3067\u3059\u306d\u3002<\/p>\n<p>\u305d\u3093\u306a\u72b6\u6cc1\u3092\u6539\u5584\u3059\u3079\u304f\u4eca\u56de\u306f<a href=\"https:\/\/www.ecomottblog.com\/?p=4787\">\u524d\u56de<\/a>\u306e\u7d9a\u304d\u3067\u300eGPU\u30ef\u30fc\u30af\u30b9\u30c6\u30fc\u30b7\u30e7\u30f3\u3092\u3082\u3063\u3068\u6d3b\u7528\u3059\u308b\u300f\u3053\u3068\u306b\u3064\u3044\u3066\u66f8\u304d\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p><!--more--><\/p>\n<hr \/>\n<h2>\u4eca\u56de\u306e\u524d\u63d0<\/h2>\n<ol>\n<li><a href=\"https:\/\/sylabs.io\/\">Singularity<\/a>\u306e\u5c0e\u5165\u304c\u3067\u304d\u3066\u3044\u308b<\/li>\n<li>Jupyter Notebook\u304c\u5b9f\u884c\u53ef\u80fd\u306aSingularity\u30b3\u30f3\u30c6\u30ca\u30a4\u30e1\u30fc\u30b8\u304c\u3042\u308b<\/li>\n<li>Docker\u74b0\u5883\u306f\u3042\u308b\u304c\u5229\u7528\u30e6\u30fc\u30b6\u30fc\u306b\u30b9\u30fc\u30d1\u30fc\u30e6\u30fc\u30b6\u30fc\u6a29\u9650\u306f\u6e21\u3057\u305f\u304f\u306a\u3044<\/li>\n<li>Docker\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u304c18.09(\u4e8b\u60c5\u306b\u3088\u308a19\u7cfb\u306b\u4e0a\u3052\u3089\u308c\u306a\u3044)<\/li>\n<\/ol>\n<h2>\u5bfe\u8c61\u3068\u3059\u308b\u8aad\u8005<\/h2>\n<ul>\n<li>GPU\u30ef\u30fc\u30af\u30b9\u30c6\u30fc\u30b7\u30e7\u30f3\u3092\u4f7f\u3063\u3066\u306a\u306b\u304b\u3084\u308a\u305f\u3044\u5f0a\u793e\u793e\u54e1<\/li>\n<li>Jupyter Notebook\u3092\u4f7f\u3063\u3066\u3044\u308b\u304c\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30af\u306b\u5b9f\u884c\u3057\u3066\u5e30\u308a\u305f\u3044\u4eba<\/li>\n<li>\u5171\u7528\u306eNotebook\u74b0\u5883\u306b\u9650\u754c\u3092\u611f\u3058\u3066\u3044\u308b\u4eba<\/li>\n<\/ul>\n<h2>\u6d41\u308c<\/h2>\n<ul>\n<li>\u5f0a\u793eJupyter Notebook\u306e\u63a8\u5968\u74b0\u5883\u306b\u3064\u3044\u3066<\/li>\n<li>Singularity\u3092\u5229\u7528\u3057\u305fJupyter Notebook\u306e\u8d77\u52d5<\/li>\n<li>Notebook\u3092\u30b3\u30f3\u30c6\u30ca\u3054\u3068\u30b3\u30de\u30f3\u30c9\u3067\u5b9f\u884c\u3059\u308b<\/li>\n<\/ul>\n<hr \/>\n<p>\u304b\u306a\u308a\u8aad\u8005\u30bf\u30fc\u30b2\u30c3\u30c8\u304c\u7d5e\u3089\u308c\u74b0\u5883\u4f9d\u5b58\u304c\u5f37\u3044\u3067\u3059\u306d\u3002<\/p>\n<p>Singularity\u3092\u5229\u7528\u3055\u308c\u308b\u3053\u3068\u3092\u691c\u8a0e\u3055\u308c\u3066\u3044\u308b\u65b9\u306b\u306f\u5c11\u3057\u3067\u3082\u53c2\u8003\u306b\u306a\u308b\u90e8\u5206\u304c\u3042\u308c\u3070\u3044\u3044\u306a\u3068\u601d\u3063\u3066\u304a\u308a\u307e\u3059\u3002\u4e00\u3064\u3054\u5bb9\u8d66\u304f\u3060\u3055\u3044\u3002<\/p>\n<h1>\u5f0a\u793eJupyter Notebook\u63a8\u5968\u74b0\u5883\u306b\u3064\u3044\u3066<\/h1>\n<p>\u307e\u305a\u306f\u5f0a\u793e\u793e\u5185\u3067\u5229\u7528\u958b\u653e\u3057\u3066\u3044\u308bJupyter Notebook\u306e\u74b0\u5883\u306b\u3064\u3044\u3066\u8aac\u660e\u3057\u307e\u3059\u3002<br \/>\n\u793e\u5185\u306e\u4e00\u822c\u7684\u306a\u5229\u7528\u8005\u306b\u306f\u307e\u305a\u3053\u308c\u3092\u5229\u7528\u3057\u3066\u3082\u3089\u3046\u63a8\u5968\u74b0\u5883\u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u30ef\u30fc\u30af\u30b9\u30c6\u30fc\u30b7\u30e7\u30f3\u3067\u306fJupyterHub\u3092\u5229\u7528\u3057\u3001\u5229\u7528\u8005\u306b\u306f\u5404\u500b\u4eba\u7528\u30b3\u30f3\u30c6\u30ca\u4e0a\u306eNotebook\u306b\u30d6\u30e9\u30a6\u30b6\u3067\u30a2\u30af\u30bb\u30b9\u3057\u3066\u3082\u3089\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<pre><code>http:\/\/(\u30ef\u30fc\u30af\u30b9\u30c6\u30fc\u30b7\u30e7\u30f3\u306eIP\u30a2\u30c9\u30ec\u30b9)\/\n<\/code><\/pre>\n<p>\u306b\u30a2\u30af\u30bb\u30b9\u5f8c\u3001\u81ea\u5206\u306eID\u3068\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u5165\u529b\u3059\u308b\u3068\u81ea\u5206\u306e\u7528\u306eJupyter Notebook\u304c\u5229\u7528\u3067\u304d\u307e\u3059\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.ecomottblog.com\/cmswp\/wp-content\/uploads\/2020\/05\/2020-05-29-16-18-12.png\" alt=\"\u30ed\u30b0\u30a4\u30f3\u5f8c\" \/><\/p>\n<p>\u30ef\u30fc\u30af\u30b9\u30c6\u30fc\u30b7\u30e7\u30f3\u4e0a\u306e\u81ea\u5206\u306e\u30db\u30fc\u30e0\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u304c\u30de\u30a6\u30f3\u30c8\u3055\u308c\u305f\u72b6\u614b\u3067\u3059\u306e\u3067\u3001\u5fc5\u8981\u306a\u30c7\u30fc\u30bf\u3084\u30d7\u30ed\u30b0\u30e9\u30e0\u306f\u81ea\u5206\u306e\u30c7\u30a3\u30b9\u30af\u9818\u57df\u306b\u4fdd\u5b58\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<ul>\n<li>JupyterHub \uff0b Docker Engine<\/li>\n<\/ul>\n<p>\u3092\u5229\u7528\u3057\u3066\u3044\u308b\u306e\u3067\u69cb\u6210\u3068\u3057\u3066\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.ecomottblog.com\/cmswp\/wp-content\/uploads\/2020\/05\/2020-05-29-15-50-27.png\" alt=\"\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\" \/><\/p>\n<p>\u3053\u306e\u69cb\u6210\u306e\u5229\u70b9\u306f<\/p>\n<ul>\n<li>\u5404\u30e6\u30fc\u30b6\u30fc\u306e\u30c7\u30fc\u30bf\u3084\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u5171\u7528\u30c7\u30a3\u30b9\u30af\u306b\u7f6e\u304b\u306a\u304f\u3066\u826f\u3044\u306e\u3067\u3001\u30d7\u30e9\u30a4\u30d0\u30b7\u30fc\u304c\u5b88\u3089\u308c\u308b<\/li>\n<li>\u4eba\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u58ca\u3057\u3066\u3057\u307e\u3046\u6050\u308c\u304c\u306a\u3044<\/li>\n<li>Jupyter Notebook\u74b0\u5883\u304c\u4e0d\u8abf\u306b\u306a\u3063\u3066\u3082\u30e6\u30fc\u30b6\u30fc\u5358\u4f4d\u3067\u30b3\u30f3\u30c6\u30ca\u306e\u518d\u8d77\u52d5\u304c\u3067\u304d\u308b<\/li>\n<li>\u5171\u901a\u306e\u30b3\u30f3\u30c6\u30ca\u30a4\u30e1\u30fc\u30b8\u3092\u5229\u7528\u3059\u308c\u3070\u30e1\u30f3\u30c6\u30b3\u30b9\u30c8\u304c\u4f4e\u6e1b\u3067\u304d\u308b<\/li>\n<li>JupyterHub\u304c\u30e6\u30fc\u30b6\u30fc\u304c\u30ed\u30b0\u30a4\u30f3\u3057\u305f\u3068\u304d\u306b\u30b3\u30f3\u30c6\u30ca\u3092\u7acb\u3061\u4e0a\u3052\u3066\u304f\u308c\u308b<\/li>\n<\/ul>\n<p>\u306a\u3069\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>\u5bfe\u3057\u3066\u4e0d\u6e80\u3068\u3057\u3066\u306f<\/p>\n<ul>\n<li>\u30b3\u30f3\u30c6\u30ca\u30a4\u30e1\u30fc\u30b8\u306f\u5171\u6709\u306e\u3082\u306e\u3092\u5229\u7528\u3057\u3066\u3044\u308b\u305f\u3081\u3001\u65b0\u3057\u3044\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u542b\u3093\u3060\u30a4\u30e1\u30fc\u30b8\u3092\u4f5c\u6210\u3057\u305f\u5834\u5408\u3001JupyterHub\u306e\u518d\u8d77\u52d5\u3092\u5fc5\u8981\u3068\u3059\u308b\u904b\u7528\u3068\u306a\u3063\u3066\u3044\u308b<\/li>\n<li>JupyterHub\u306e\u518d\u8d77\u52d5\u3092\u884c\u3046\u5834\u5408\u3001\u5168\u30b3\u30f3\u30c6\u30ca\u3092\u524a\u9664\u3059\u308b\u904b\u7528\u3068\u306a\u3063\u3066\u3044\u308b<\/li>\n<\/ul>\n<p>\u3068\u3044\u3046\u3082\u306e\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>\u56de\u907f\u7b56\u306f\u3044\u304f\u3064\u304b\u3042\u308b\u3068\u601d\u3046\u306e\u3067\u3059\u304c\u30b3\u30f3\u30c6\u30ca\u30a4\u30e1\u30fc\u30b8\u306e\u7ba1\u7406\u3092\u7169\u96d1\u306b\u3057\u305f\u304f\u306a\u3044\u306e\u3082\u3042\u308a\u4eca\u306f\u65b0\u3057\u3044\u30a4\u30e1\u30fc\u30b8\u304c\u3067\u304d\u308b\u305f\u3073\u306bJupyterHub\u3001Jupyter Notebook\u306e\u74b0\u5883\u3092\u518d\u8d77\u52d5\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u5f53\u7136\u5229\u7528\u8005\u304b\u3089\u306f <strong>\u300c\u30c7\u30fc\u30bf\u51e6\u7406\u4e2d\u306a\u306e\u3067\u518d\u8d77\u52d5\u52d8\u5f01\u3057\u3066\u300d<\/strong> \u306a\u3069\u306e\u58f0\u304c\u51fa\u3066\u304f\u308b\u306e\u3067\u518d\u8d77\u52d5\u3059\u308b\u306e\u306f\u30bf\u30a4\u30df\u30f3\u30b0\u3092\u898b\u8a08\u3089\u3063\u3066\u3068\u306a\u3063\u3066\u3057\u307e\u3044\u307e\u3059\u3002<\/p>\n<p>\u3061\u3087\u3063\u3068\u5acc\u3067\u3059\u306d\u3002<\/p>\n<h1>Singularity\u3092\u5229\u7528\u3057\u305fJupyter Notebook\u306e\u8d77\u52d5<\/h1>\n<p>\u305d\u3093\u306a\u5229\u7528\u8005\u306b\u306f<a href=\"https:\/\/www.ecomottblog.com\/?p=4787\">\u524d\u56de<\/a>\u306e\u3084\u308a\u65b9\u3067\u3001\u30ed\u30fc\u30ab\u30ebPC\u3067\u306f\u306a\u304f\u4eca\u5ea6\u306fGPU\u30ef\u30fc\u30af\u30b9\u30c6\u30fc\u30b7\u30e7\u30f3\u4e0a\u3067Singularity\u3092\u5229\u7528\u3057\u3066Jupyter Notebook\u3092\u8d77\u52d5\u3057\u3066\u3082\u3089\u3046\u3088\u3046\u306b\u3057\u307e\u3057\u305f\u3002<\/p>\n<p>\u69cb\u6210\u306f\u4ee5\u4e0b\u3068\u306a\u308a\u307e\u3057\u305f\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.ecomottblog.com\/cmswp\/wp-content\/uploads\/2020\/05\/2020-05-29-16-57-34.png\" alt=\"Singularity\" \/><\/p>\n<p>Docker\u30a4\u30e1\u30fc\u30b8\u304b\u3089Singularity\u7528\u306e\u30b3\u30f3\u30c6\u30ca\u30a4\u30e1\u30fc\u30b8\u306b\u5909\u63db\u3057\u305f\u3082\u306e\u3092\u7528\u610f\u3057\u3001Singularity\u306e\u8d77\u52d5\u306f\u5404\u30e6\u30fc\u30b6\u30fc\u306b\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u30b3\u30de\u30f3\u30c9\u304b\u3089\u8d77\u52d5\u3057\u3066\u3082\u3089\u3044\u307e\u3059\u3002<\/p>\n<pre><code>singularity exec --nv [\u30b3\u30f3\u30c6\u30ca\u30a4\u30e1\u30fc\u30b8] --port [\u30dd\u30fc\u30c8\u756a\u53f7]\n<\/code><\/pre>\n<p><img decoding=\"async\" src=\"https:\/\/www.ecomottblog.com\/cmswp\/wp-content\/uploads\/2020\/05\/2020-05-29-17-03-54.png\" alt=\"\u8d77\u52d5\u30b3\u30de\u30f3\u30c9\" \/><br \/>\n\u203b\u30b3\u30f3\u30c6\u30ca\u30a4\u30e1\u30fc\u30b8\u306f\u5404\u81ea\u5fc5\u8981\u306a\u30e9\u30a4\u30d6\u30e9\u30ea\u304c\u5165\u3063\u305f\u3082\u306e\u3092\u5229\u7528<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.ecomottblog.com\/cmswp\/wp-content\/uploads\/2020\/05\/2020-05-29-17-08-25.png\" alt=\"Notebook\u8d77\u52d5\" \/><\/p>\n<p>\u5c11\u306a\u304f\u3068\u3082\u3053\u308c\u3067\u4ed6\u306e\u4eba\u306eJupyter\u74b0\u5883\u304b\u3089\u5207\u308a\u96e2\u3057\u3066\u5b9f\u884c\u3067\u304d\u307e\u3057\u305f\u3002<br \/>\n\u3053\u308c\u3067C\u3055\u3093\u306e\u30bf\u30b9\u30af\u72b6\u6cc1\u306b\u3088\u3089\u305aJupyter\u74b0\u5883\u306e\u66f4\u65b0\u304c\u3067\u304d\u307e\u3059\u3002\uff08\u9006\u3082\u307e\u305f\u7136\u308a\uff09<\/p>\n<h1>Notebook\u3092\u30b3\u30f3\u30c6\u30ca\u3054\u3068\u30b3\u30de\u30f3\u30c9\u3067\u5b9f\u884c\u3059\u308b<\/h1>\n<p>Jupyter Notebook\u3092\u72ec\u7acb\u3057\u305f\u74b0\u5883\u3067\u7a3c\u50cd\u3055\u305b\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u3068\u3001\u305d\u3053\u3067\u69d8\u3005\u306a\u8a66\u884c\u932f\u8aa4\u304c\u3084\u308a\u3059\u304f\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u3067\u3059\u304c\u3001\u30c7\u30fc\u30bf\u306b\u5bfe\u3057\u3066\u3069\u306e\u3088\u3046\u306a\u51e6\u7406\u3092\u3059\u308b\u3079\u304d\u304b\u3001\u5229\u7528\u3059\u308b\u30e2\u30c7\u30eb\u306f\u3069\u3046\u3059\u308b\u304b\u306a\u3069\u3072\u3068\u3057\u304d\u308a\u30c8\u30e9\u30a4\u3057\u3066\u65b9\u91dd\u304c\u3042\u308b\u7a0b\u5ea6\u304d\u307e\u3063\u305f\u3068\u3057\u3066\u3082\u3001\u7570\u306a\u308b\u30c7\u30fc\u30bf\u3092\u6271\u3063\u305f\u3068\u304d\u306b\u671f\u5f85\u3059\u308b\u7d50\u679c\u304c\u5f97\u3089\u308c\u308b\u304b\u306f\u307e\u305f\u5225\u306e\u8a71\u3060\u3063\u305f\u308a\u3057\u307e\u3059\u3002<\/p>\n<p>\u3068\u306a\u308b\u3068\u6b21\u306b\u6b32\u3057\u304f\u306a\u3063\u3066\u304f\u308b\u306e\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u8981\u6c42\u3067\u3059\u3002<\/p>\n<ul>\n<li>\u30c7\u30fc\u30bf\u306e\u6761\u4ef6\uff08\u5bfe\u8c61\u30fb\u7bc4\u56f2\u306a\u3069\uff09\u3092\u624b\u8efd\u306b\u5909\u3048\u3066\u4f55\u5ea6\u3067\u3082\u5b9f\u884c\u3067\u304d\u308b\u3088\u3046\u306b\u3057\u305f\u3044<\/li>\n<li>\u6761\u4ef6\u3092\u5909\u3048\u305f\u51e6\u7406\u3092\u8907\u6570\u4e26\u884c\u3067\u5b9f\u65bd\u3057\u305f\u3044<\/li>\n<li>\u3067\u304d\u308c\u3070\u74b0\u5883\u3068\u3057\u3066\u306f\u305d\u308c\u305e\u308c\u72ec\u7acb\u3055\u305b\u3066\u304a\u304d\u305f\u3044<\/li>\n<\/ul>\n<p>\u4eca\u56de\u306f\u4e0a\u8a18\u3092\u6e80\u305f\u3059\u305f\u3081\u300e\u30b3\u30de\u30f3\u30c9\u304b\u3089Singularity\u3092\u8d77\u52d5\u3059\u308b\u969b\u306e\u30d1\u30e9\u30e1\u30fc\u30bf\u306b\u51e6\u7406\u5bfe\u8c61\u306e\u30d5\u30a1\u30a4\u30eb(ipynb\u30d5\u30a1\u30a4\u30eb\uff09\u3092\u6307\u5b9a\u3057\u3001\u30b3\u30f3\u30c6\u30ca\u4e2d\u306eNotebook\u3067\u30b3\u30de\u30f3\u30c9\u51e6\u7406\u3055\u305b\u308b\u300f\u3068\u3044\u3046\u624b\u6cd5\u3092\u3068\u308a\u307e\u3057\u305f\u3002<\/p>\n<p><strong>\u79c1\uff09\u300c\u3044\u3063\u305d\u6761\u4ef6\u3054\u3068\u306bSingularity\u30b3\u30f3\u30c6\u30ca\u7acb\u3061\u4e0a\u3052\u3066Jupyter Notebook\u3092\u30b3\u30de\u30f3\u30c9\u5b9f\u884c\u3057\u3061\u3083\u3044\u307e\u3057\u3087\u3046\u300d<\/strong><\/p>\n<p>\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u6d41\u308c\u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n<h2>\u7c21\u5358\u306aNotebook\u3092\u4f5c\u6210<\/h2>\n<p><img decoding=\"async\" src=\"https:\/\/www.ecomottblog.com\/cmswp\/wp-content\/uploads\/2020\/05\/2020-05-29-17-26-20.png\" alt=\"\" \/><br \/>\n\u203bHelloWorld.ipynb\u3068\u3057\u3066\u4fdd\u5b58<\/p>\n<h2>Singularity\u8d77\u52d5\u6642\u306b&#8221;jupyter nbconvert&#8221;\u3092\u5b9f\u884c<\/h2>\n<p>Notebook\u306e\u30b3\u30de\u30f3\u30c9\u5b9f\u884c\u306b\u306fnbconvert\u3092\u5229\u7528\u3057\u3001Singularity\u306b\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u6e21\u3057\u307e\u3057\u305f\u3002<br \/>\n\u5b9f\u884c\u3059\u308bHelloWorld.ipynb\u306fSingularity\u304c\u30de\u30a6\u30f3\u30c8\u3059\u308b\u81ea\u5206\u306e\u30db\u30fc\u30e0\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u914d\u4e0b\u306b\u7f6e\u3044\u3066\u3044\u307e\u3059\u3002<\/p>\n<pre><code>$ singularity exec --nv [\u30b3\u30f3\u30c6\u30ca\u30a4\u30e1\u30fc\u30b8] jupyter nbconvert --to asciidoc --ExecutePreprocessor.timeout=-1 --stdout --execute \/home\/iwatsu\/sandbox\/HelloWorld.ipynb\n[NbConvertApp] Converting notebook \/home\/iwatsu\/sandbox\/HelloWorld.ipynb to asciidoc\n[NbConvertApp] Executing notebook with kernel: python\n+*In[1]:*+\n[source, ipython3]\n----\nprint(\"Hello World!\")\n----\n\n\n+*Out[1]:*+\n----\nHello World!\n----\n<\/code><\/pre>\n<p>&#8220;Hello World!&#8221;\u304c\u51fa\u529b\u3055\u308c\u3066\u3044\u308b\u306e\u3092\u78ba\u8a8d\u3002<\/p>\n<h1>\u753b\u50cf\u3092\u51fa\u529b\u3057\u3066\u307f\u308b<\/h1>\n<p>\u6b21\u306b\u5b9f\u884c\u7d50\u679c\u3068\u3057\u3066\u753b\u50cf\u306a\u3069\u3092\u751f\u6210\u3059\u308b\u30b1\u30fc\u30b9\u3092\u3084\u3063\u3066\u307f\u307e\u3059\u3002<br \/>\n\u5f0a\u793e\u306e\u5229\u7528\u3057\u3066\u3044\u308b\u30a4\u30e1\u30fc\u30b8\u306b\u306fmatplotlib basemap\u304c\u4e88\u3081\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3066\u3044\u308b\u306e\u3067\u3001\u5730\u56f3\u753b\u50cf\u3092\u8868\u793a\u3057\u3066\u307f\u307e\u3057\u305f\u3002<\/p>\n<h2>\u53c2\u8003\u5143<\/h2>\n<p>https:\/\/matplotlib.org\/basemap\/users\/geography.html<\/p>\n<h2>\u5b9f\u969b\u306e\u30b3\u30fc\u30c9<\/h2>\n<p><img decoding=\"async\" src=\"https:\/\/www.ecomottblog.com\/cmswp\/wp-content\/uploads\/2020\/05\/2020-05-29-17-39-32.png\" alt=\"\u5b9f\u884c\u5bfe\u8c61\" \/><\/p>\n<h2>\u5b9f\u884c\u7d50\u679c<\/h2>\n<pre><code>iwatsu@ecmt-dgx:~$ singularity exec --nv \/home\/dgx_sharing\/images\/jupyterhub_singleuser_ecmt_2_1.sif jupyter nbconvert --to asciidoc --ExecutePreprocessor.timeout=-1 --stdout --execute \/home\/iwatsu\/sandbox\/basemap.ipynb\n[NbConvertApp] Converting notebook \/home\/iwatsu\/sandbox\/basemap.ipynb to asciidoc\n[NbConvertApp] Executing notebook with kernel: python3\n+*In[1]:*+\n[source, ipython3]\n----\nimport os\nimport conda\nconda_file_dir = conda.__file__\nconda_dir = conda_file_dir.split('lib')[0]\nproj_lib = os.path.join(os.path.join(conda_dir, 'share'), 'proj')\nos.environ[\"PROJ_LIB\"] = proj_lib\n\nfrom mpl_toolkits.basemap import Basemap\nimport matplotlib.pyplot as plt\n# setup Lambert Conformal basemap.\n# set resolution=None to skip processing of boundary datasets.\nm = Basemap(width=12000000,height=9000000,projection='lcc',\n            resolution=None,lat_1=45.,lat_2=55,lat_0=50,lon_0=144.)\nm.bluemarble()\nplt.savefig(\"bluemarble.jpg\")\nplt.show()\n----\n\n\n+*Out[1]:*+\n----\nClipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).\n\n![png](basemap_files\/basemap_0_1.png)\n----\n\n\n+*In[2]:*+\n[source, ipython3]\n----\nfrom mpl_toolkits.basemap import Basemap\nimport matplotlib.pyplot as plt\n# setup Lambert Conformal basemap.\n# set resolution=None to skip processing of boundary datasets.\nm = Basemap(width=12000000,height=9000000,projection='lcc',\n            resolution=None,lat_1=45.,lat_2=55,lat_0=50,lon_0=144.)\nm.shadedrelief()\nplt.savefig(\"shaded_relief.jpg\")\nplt.show()\n----\n\n\n+*Out[2]:*+\n----\n![png](basemap_files\/basemap_1_0.png)\n----\n\n\n+*In[3]:*+\n[source, ipython3]\n----\nfrom mpl_toolkits.basemap import Basemap\nimport matplotlib.pyplot as plt\n# setup Lambert Conformal basemap.\n# set resolution=None to skip processing of boundary datasets.\nm = Basemap(width=12000000,height=9000000,projection='lcc',\n            resolution=None,lat_1=45.,lat_2=55,lat_0=50,lon_0=144.)\nm.etopo()\nplt.savefig(\"etopo_relief.jpg\")\nplt.show()\n----\n\n\n+*Out[3]:*+\n----\nClipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).\n\n![png](basemap_files\/basemap_2_1.png)\n----\n\n\n+*In[ ]:*+\n[source, ipython3]\n----\n\n----\niwatsu@ecmt-dgx:~$ \n\n<\/code><\/pre>\n<h2>\u751f\u6210\u3055\u308c\u305f\u753b\u50cf<\/h2>\n<p><img decoding=\"async\" src=\"https:\/\/www.ecomottblog.com\/cmswp\/wp-content\/uploads\/2020\/05\/etopo_relief.jpg\" alt=\"etopo_relief.jpg\" \/><br \/>\n<img decoding=\"async\" src=\"https:\/\/www.ecomottblog.com\/cmswp\/wp-content\/uploads\/2020\/05\/bluemarble.jpg\" alt=\"bluemarble.jpg\" \/><br \/>\n<img decoding=\"async\" src=\"https:\/\/www.ecomottblog.com\/cmswp\/wp-content\/uploads\/2020\/05\/shaded_relief.jpg\" alt=\"shaded_relief.jpg\" \/><\/p>\n<p>\u751f\u6210\u3055\u308c\u305f\u753b\u50cf\u304c\u78ba\u8a8d\u3067\u304d\u307e\u3057\u305f\u3002<\/p>\n<h1>\u307e\u3068\u3081<\/h1>\n<ul>\n<li>Jupyter Notebook\u3092Docker\u3067\u904b\u7528\u3057\u3066\u3044\u308b\u306a\u3089\u3001Singularity\u3067\u3082\u79fb\u884c\u3067\u304d\u308b<\/li>\n<li>Singularity\u3092\u5229\u7528\u3057\u3066Notebook\u3092\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30af\u306b\u5b9f\u884c\u3067\u304d\u305f<\/li>\n<li>\u30b3\u30de\u30f3\u30c9\u5b9f\u884c\u3067\u304d\u308b\u306e\u3067\u6761\u4ef6\u306e\u7570\u306a\u308b\u51e6\u7406\u3092\u624b\u8efd\u306b\u5b9f\u884c\u3067\u304d\u308b<\/li>\n<li>\u3010\u793e\u5185\u9023\u7d61\u3011\u63a8\u5968\u74b0\u5883\u3067\u6163\u308c\u305f\u3089Singularity\u4f7f\u3063\u3066\u72ec\u81ea\u30b3\u30f3\u30c6\u30ca\u30a4\u30e1\u30fc\u30b8\u306e\u5229\u7528\u3067\u304d\u307e\u3059\u3002\u3069\u3093\u3069\u3093\u4f7f\u3063\u3066\u304f\u3060\u3055\u3044\u3002<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>\u3044\u3063\u305d\u6761\u4ef6\u3054\u3068\u306bSingularity\u30b3\u30f3\u30c6\u30ca\u7acb\u3061\u4e0a\u3052\u3066Jupyter Notebook\u3092\u30b3\u30de\u30f3\u30c9\u5b9f\u884c\u3059\u308b\u53d6\u308a\u7d44\u307f<\/p>\n","protected":false},"author":3,"featured_media":5890,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[27],"tags":[59,53,81,56,55,82],"_links":{"self":[{"href":"https:\/\/test.ecomottblog.com\/index.php?rest_route=\/wp\/v2\/posts\/5884"}],"collection":[{"href":"https:\/\/test.ecomottblog.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/test.ecomottblog.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/test.ecomottblog.com\/index.php?rest_route=\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/test.ecomottblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5884"}],"version-history":[{"count":15,"href":"https:\/\/test.ecomottblog.com\/index.php?rest_route=\/wp\/v2\/posts\/5884\/revisions"}],"predecessor-version":[{"id":5906,"href":"https:\/\/test.ecomottblog.com\/index.php?rest_route=\/wp\/v2\/posts\/5884\/revisions\/5906"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/test.ecomottblog.com\/index.php?rest_route=\/wp\/v2\/media\/5890"}],"wp:attachment":[{"href":"https:\/\/test.ecomottblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5884"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/test.ecomottblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5884"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/test.ecomottblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5884"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}