<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://hpcguide.tau.ac.il/index.php?action=history&amp;feed=atom&amp;title=Using_jupyter_on_Slurm</id>
	<title>Using jupyter on Slurm - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://hpcguide.tau.ac.il/index.php?action=history&amp;feed=atom&amp;title=Using_jupyter_on_Slurm"/>
	<link rel="alternate" type="text/html" href="https://hpcguide.tau.ac.il/index.php?title=Using_jupyter_on_Slurm&amp;action=history"/>
	<updated>2026-05-13T21:01:56Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.35.5</generator>
	<entry>
		<id>https://hpcguide.tau.ac.il/index.php?title=Using_jupyter_on_Slurm&amp;diff=1545&amp;oldid=prev</id>
		<title>Eyal at 14:48, 3 December 2025</title>
		<link rel="alternate" type="text/html" href="https://hpcguide.tau.ac.il/index.php?title=Using_jupyter_on_Slurm&amp;diff=1545&amp;oldid=prev"/>
		<updated>2025-12-03T14:48:30Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 14:48, 3 December 2025&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l85&quot; &gt;Line 85:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 85:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Additional Notes:&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Additional Notes:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Ensure that the SSH tunnel (ssh -N -L ...) remains open while you are working with Jupyter Lab.&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Ensure that the SSH tunnel (ssh -N -L ...) remains open while you are working with Jupyter Lab.&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;br&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;You can use different ports if 8892 is already in use, just adjust the port number in both the jupyter lab command and the SSH command.&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;You can use different ports if 8892 is already in use, just adjust the port number in both the jupyter lab command and the SSH command.&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;br&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;If you encounter any issues with port forwarding, double-check the node name (&amp;lt;compute-node-name&amp;gt;) and the port number.&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;If you encounter any issues with port forwarding, double-check the node name (&amp;lt;compute-node-name&amp;gt;) and the port number.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Eyal</name></author>
	</entry>
	<entry>
		<id>https://hpcguide.tau.ac.il/index.php?title=Using_jupyter_on_Slurm&amp;diff=1544&amp;oldid=prev</id>
		<title>Eyal: Created page with &quot;&#039;&#039;&#039;Using Jupyter Lab on Slurm Cluster&#039;&#039;&#039;  &#039;&#039;&#039;Step 1&#039;&#039;&#039;: Start an Interactive Job on the Head Node  First, you need to request resources on the Slurm cluster. Run the following...&quot;</title>
		<link rel="alternate" type="text/html" href="https://hpcguide.tau.ac.il/index.php?title=Using_jupyter_on_Slurm&amp;diff=1544&amp;oldid=prev"/>
		<updated>2025-12-03T14:43:22Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;&amp;#039;&amp;#039;&amp;#039;Using Jupyter Lab on Slurm Cluster&amp;#039;&amp;#039;&amp;#039;  &amp;#039;&amp;#039;&amp;#039;Step 1&amp;#039;&amp;#039;&amp;#039;: Start an Interactive Job on the Head Node  First, you need to request resources on the Slurm cluster. Run the following...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;Using Jupyter Lab on Slurm Cluster&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Step 1&amp;#039;&amp;#039;&amp;#039;: Start an Interactive Job on the Head Node&lt;br /&gt;
&lt;br /&gt;
First, you need to request resources on the Slurm cluster. Run the following command to start an interactive job on the appropriate partition (&amp;lt;partition-name&amp;gt;) and with your account (&amp;lt;account-name&amp;gt;):&lt;br /&gt;
&lt;br /&gt;
     srun -p &amp;lt;partition-name&amp;gt; -A &amp;lt;account-name&amp;gt; --pty bash &lt;br /&gt;
&lt;br /&gt;
Replace:&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;partition-name&amp;gt; with your Slurm partition name (e.g., power-general).&lt;br /&gt;
    &amp;lt;account-name&amp;gt; with your Slurm account name (e.g., power-leahfa-users).&lt;br /&gt;
&lt;br /&gt;
This command will allocate resources for your job and provide you with an interactive shell on a compute node (e.g., compute-0-62).&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Step 2&amp;#039;&amp;#039;&amp;#039;: Load the Jupyter Environment&lt;br /&gt;
&lt;br /&gt;
Once inside the interactive session, load the mamba-env158/jupyter module:&lt;br /&gt;
&lt;br /&gt;
      module load mamba-env158/jupyter&lt;br /&gt;
&lt;br /&gt;
This will prepare the environment to run Jupyter.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Step 3&amp;#039;&amp;#039;&amp;#039;: Start Jupyter Lab&lt;br /&gt;
&lt;br /&gt;
Now, start the Jupyter Lab server. Run the following command inside the interactive session:&lt;br /&gt;
&lt;br /&gt;
    jupyter lab --ip=* --port=8892 --no-browser&lt;br /&gt;
&lt;br /&gt;
    The --ip=* option binds Jupyter Lab to all available network interfaces.&lt;br /&gt;
    The --port=8892 specifies that Jupyter Lab will use port 8892.&lt;br /&gt;
    The --no-browser option prevents Jupyter Lab from opening a browser automatically.&lt;br /&gt;
&lt;br /&gt;
Once Jupyter Lab starts, you should see output like this:&lt;br /&gt;
&lt;br /&gt;
     [I 2025-03-16 09:25:06.190 ServerApp] Jupyter Server 2.14.2 is running at:&lt;br /&gt;
     [I 2025-03-16 09:25:06.190 ServerApp] http://localhost:8892/lab?token=&amp;lt;token&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
[[File:2025-12-03 161826.jpg]]&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Step 4&amp;#039;&amp;#039;&amp;#039;: Set Up SSH Port Forwarding&lt;br /&gt;
&lt;br /&gt;
To access the Jupyter Lab server from your local machine, you need to set up SSH port forwarding.&lt;br /&gt;
&lt;br /&gt;
Open a terminal on your local (cmd on windows) machine and run the following command:&lt;br /&gt;
&lt;br /&gt;
        ssh -N -L 8892:&amp;lt;compute-node-name&amp;gt;:8892 &amp;lt;username&amp;gt;@&amp;lt;headnode-name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Replace:&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;compute-node-name&amp;gt; with the name of the compute node where Jupyter Lab is running (e.g., compute-0-62).&lt;br /&gt;
    &amp;lt;username&amp;gt; with your Slurm username.&lt;br /&gt;
    &amp;lt;headnode-name&amp;gt; with the hostname or IP address of the Slurm head node (e.g., powerslurm-login.tau.ac.il).&lt;br /&gt;
&lt;br /&gt;
This command forwards port 8892 from the compute node back to your local machine.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
[[File:2025-12-03 162115.jpg]]&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Step 5&amp;#039;&amp;#039;&amp;#039;: Open Jupyter Lab in Your Browser&lt;br /&gt;
&lt;br /&gt;
After establishing the SSH tunnel, open your web browser and navigate to:&lt;br /&gt;
&lt;br /&gt;
    http://localhost:8892/lab?token=&amp;lt;token&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This URL will give you access to your Jupyter Lab instance.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
[[File:2025-12-03 162302.jpg]]&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Step 6&amp;#039;&amp;#039;&amp;#039;: Start Using Jupyter Lab&lt;br /&gt;
&lt;br /&gt;
Once you’ve entered the token, you can start working with Jupyter Lab on your browser, using the resources of the cluster.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Step 7&amp;#039;&amp;#039;&amp;#039;: Closing the Job&lt;br /&gt;
&lt;br /&gt;
When you&amp;#039;re finished using Jupyter Lab, return to the interactive session and press Ctrl+C to stop the Jupyter Lab server. Then, exit the interactive session by typing:&lt;br /&gt;
&lt;br /&gt;
    exit&lt;br /&gt;
&lt;br /&gt;
Additional Notes:&lt;br /&gt;
&lt;br /&gt;
Ensure that the SSH tunnel (ssh -N -L ...) remains open while you are working with Jupyter Lab.&lt;br /&gt;
You can use different ports if 8892 is already in use, just adjust the port number in both the jupyter lab command and the SSH command.&lt;br /&gt;
If you encounter any issues with port forwarding, double-check the node name (&amp;lt;compute-node-name&amp;gt;) and the port number.&lt;/div&gt;</summary>
		<author><name>Eyal</name></author>
	</entry>
</feed>