<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: IKEUCHI Yasuki</title>
    <description>The latest articles on DEV Community by IKEUCHI Yasuki (@ikeyasu).</description>
    <link>https://dev.to/ikeyasu</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F44677%2F458c5c0c-062c-4d35-a3eb-d9de11e5ec67.jpg</url>
      <title>DEV Community: IKEUCHI Yasuki</title>
      <link>https://dev.to/ikeyasu</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ikeyasu"/>
    <language>en</language>
    <item>
      <title>How to use Google Colaboratory with Local Runtime</title>
      <dc:creator>IKEUCHI Yasuki</dc:creator>
      <pubDate>Wed, 11 Apr 2018 01:37:36 +0000</pubDate>
      <link>https://dev.to/ikeyasu/how-to-use-google-colaboratory-with-local-runtime-4j1p</link>
      <guid>https://dev.to/ikeyasu/how-to-use-google-colaboratory-with-local-runtime-4j1p</guid>
      <description>&lt;h1&gt;
  
  
  TL;DR
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;I created &lt;a href="https://hub.docker.com/r/ikeyasu/colab-local/"&gt;docker image&lt;/a&gt; look-alike Google Colaboratory

&lt;ul&gt;
&lt;li&gt;It is using the same OS version(Ubuntu17.10) as Google colaboratory.&lt;/li&gt;
&lt;li&gt;It is installed the same python library as Google colaboratory. &lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;You can use this docker image with “Local Runtime” feature of Google Colaboratory&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Step to connect
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Setup &lt;a href="https://github.com/nvidia/nvidia-docker/wiki/Installation-(version-2.0)"&gt;nvidia-docker2&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;$ docker run --runtime=nvidia -it --rm -p 8081:8081 --cap-add SYS_ADMIN --device /dev/fuse --security-opt apparmor=unconfined ikeyasu/colab-local:latest&lt;/code&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;--cap-add SYS_ADMIN&lt;/code&gt;, &lt;code&gt;--device /dev/fuse&lt;/code&gt;, &lt;code&gt;--security-opt&lt;/code&gt; and &lt;code&gt;apparmor=unconfined&lt;/code&gt; are necessary for mounting Google drive.&lt;/li&gt;
&lt;li&gt;You need to change port number, please change &lt;code&gt;-p 8081:8081&lt;/code&gt;. For example, &lt;code&gt;-p 8082:8081&lt;/code&gt; if you want to use 8082.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Click ▼ on top right of Colaboratory(next to "CONENCT" button), and click&lt;/li&gt;
&lt;li&gt;Input backend port to your docker instance like 8081. Then, click Connect button.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  If a host running jupyter notebook is not localhost
&lt;/h3&gt;

&lt;p&gt;Colaboratory requires localhost to connect local instance. If you would like to run jupyter notebook on another host, you need to use port-forwarding as follows.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;$ ssh user@example.com -L 8081:localhost:8081&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;If you are using windows, you can use PuTTY.&lt;/p&gt;

&lt;h1&gt;
  
  
  What is benefit?
&lt;/h1&gt;

&lt;p&gt;Google Colaboratory has many limitation, especially it could be ran by 12 hours only. In other hand, Google Colaboratory is good for first step of deep learning.&lt;/p&gt;

&lt;p&gt;Thus, you can take a following step to move forward your project.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Use Google Colaboratory for rough investigation and testing. It has limitation of 12 hours.&lt;/li&gt;
&lt;li&gt;If your model is looks good, launch Local Runtime. It does not have limitations. You can run a learning process for more 12 hours.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Docker image introduced this paper is looka-like Google Colaboratory. You don't need to concern a difference of environment between host runtime and local runtime.&lt;/p&gt;

</description>
      <category>deeplearning</category>
      <category>colaboratory</category>
    </item>
  </channel>
</rss>
