<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Tutorials Archives | AI After Work</title>
	<atom:link href="https://www.aiafterwork.com/category/tutorials/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.aiafterwork.com/category/tutorials/</link>
	<description></description>
	<lastBuildDate>Sun, 18 Nov 2018 19:15:24 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>
	<item>
		<title>Running JupyterLab on Ubuntu Server startup</title>
		<link>https://www.aiafterwork.com/running-jupyterlab-on-ubuntu-startup/</link>
					<comments>https://www.aiafterwork.com/running-jupyterlab-on-ubuntu-startup/#respond</comments>
		
		<dc:creator><![CDATA[Aravind]]></dc:creator>
		<pubDate>Sun, 18 Nov 2018 05:00:38 +0000</pubDate>
				<category><![CDATA[Tutorials]]></category>
		<guid isPermaLink="false">https://www.aiafterwork.com/?p=296</guid>

					<description><![CDATA[<p>Running Jupyterlab manually through ssh gets boring very fast. The easier way would be to have it automatically start up when your server starts. This post walks you through just how.</p>
<p>The post <a href="https://www.aiafterwork.com/running-jupyterlab-on-ubuntu-startup/">Running JupyterLab on Ubuntu Server startup</a> appeared first on <a href="https://www.aiafterwork.com">AI After Work</a>.</p>
]]></description>
										<content:encoded><![CDATA[<div class="et_pb_section et_pb_section_0 et_section_regular" >
				
				
				
				
				
				
				<div class="et_pb_row et_pb_row_0">
				<div class="et_pb_column et_pb_column_4_4 et_pb_column_0  et_pb_css_mix_blend_mode_passthrough et-last-child">
				
				
				
				
				<div class="et_pb_module et_pb_text et_pb_text_0  et_pb_text_align_left et_pb_bg_layout_light">
				
				
				
				
				<div class="et_pb_text_inner"><p>After you <a href="https://www.aiafterwork.com/installing-python-postgresql-jupyterlab/">installed JupyterLab</a> on your <a href="https://www.aiafterwork.com/analytics-machine-learning-system-less-than-1350/">Ubuntu Analytics server</a>, you&#8217;ll realize that it becomes quite annoying after the first 10 times to start JupyterLab through ssh. It&#8217;s much easier to have it run when you start your server.</p>
<p>There are a couple of files you&#8217;ll have to create and run some commands to get this to work.</p>
<ol>
<li>Create an executable bash script. Lets name it jupyterlab.sh and place it in your home directory.
<pre class="EnlighterJSRAW" data-enlighter-language="shell">cd /home/username/
sudo nano juperterlab.sh</pre>
</li>
<li>Type in the same command that you use to start JupyterLab. Replace the &lt;installpath&gt; with the absolute path to your installation. For example no using ~ for home directory. Use /home/username for the absolute path.
<pre class="EnlighterJSRAW" data-enlighter-language="shell">#!/bin/sh
/&lt;installpath&gt;/anaconda3/bin/jupyter lab --ip=192.168.1.2 --port=12345 --no-browser
</pre>
</li>
<li>Make the file executable by typing the following
<pre class="EnlighterJSRAW" data-enlighter-language="null">sudo chmod +x jupyterlab.sh</pre>
</li>
<li>Create a service file ending in .service. I use the nano editor but you can use any editor.
<pre class="EnlighterJSRAW" data-enlighter-language="shell">sudo nano /etc/sytemd/system/jupyterlab.service</pre>
</li>
<li>And type in the following details into the file
<pre class="EnlighterJSRAW" data-enlighter-language="null">[Unit]
Description=Jupyterlab
After=syslog.target network.target

[Service]
User=username
ExecStart=/bin/bash /home/username/jupyterlab.sh

[Install]
WantedBy=multi-user.target</pre>
</li>
<li>Save the file and then run the following command to enable the service to autostart.
<pre class="EnlighterJSRAW" data-enlighter-language="shell">sudo systemctl enable jupyterlab.service</pre>
</li>
<li>Start the service 
<pre class="EnlighterJSRAW" data-enlighter-language="shell">sudo service jupyterlab start</pre>
</li>
<li>Navigate to the URL http://192.168.1.2:12345 and check if you can log in.</li>
<li>If this works then reboot the server and try the step above again.
<pre class="EnlighterJSRAW" data-enlighter-language="shell">sudo reboot</pre>
</li>
<li>If it works, Great ! If it doesn&#8217;t then try this command to see any issues.
<pre class="EnlighterJSRAW" data-enlighter-language="shell">sudo service jupyterlab status</pre>
<p> </p>
</li>
</ol></div>
			</div>
			</div>
				
				
				
				
			</div>
				
				
			</div>
<p>The post <a href="https://www.aiafterwork.com/running-jupyterlab-on-ubuntu-startup/">Running JupyterLab on Ubuntu Server startup</a> appeared first on <a href="https://www.aiafterwork.com">AI After Work</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.aiafterwork.com/running-jupyterlab-on-ubuntu-startup/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
