{"id":1748,"date":"2026-10-07T17:45:15","date_gmt":"2026-10-07T16:45:15","guid":{"rendered":"https:\/\/www.creatis.insa-lyon.fr\/~grenier\/?p=1748"},"modified":"2026-10-08T14:29:29","modified_gmt":"2026-10-08T13:29:29","slug":"mesonet-juliet-and-jupyter","status":"publish","type":"post","link":"https:\/\/www.creatis.insa-lyon.fr\/~grenier\/?p=1748","title":{"rendered":"MesoNet &#8211; Juliet and Jupyter"},"content":{"rendered":"\n<p>How to launch JupyterLab on Juliet? <\/p>\n\n\n\n<p>The MesoNet cloud provides CPU\/GPU resources and storage.<\/p>\n\n\n\n<p>Jupyterlab is a notebook server used for practical sessions.<\/p>\n\n\n\n<p>The road is long to make them work together. You need to follow all these steps :<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Create an account <\/li>\n\n\n\n<li>Set up a secure SSH connection<\/li>\n\n\n\n<li>Log on to the Juliet server<\/li>\n\n\n\n<li>Ask for a resource on the Juliet server<\/li>\n\n\n\n<li>Launch a JupyterLab server on the obtained resource<\/li>\n\n\n\n<li>Create an SSH tunnel to the JupyterLab service<\/li>\n\n\n\n<li>Connect locally to JupyterLab<\/li>\n<\/ul>\n\n\n\n<p>Remark: <strong><em>local <\/em><\/strong>means your computer. <strong><em>server <\/em><\/strong>means distant resources.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Mesonet Account<\/h3>\n\n\n\n<p>Read the following documentation: <a href=\"https:\/\/www.mesonet.fr\/documentation\/user-documentation\/acces\/portail\">https:\/\/www.mesonet.fr\/documentation\/user-documentation\/acces\/portail<\/a><\/p>\n\n\n\n<p>As EduGAIN is available, French students, teachers, researchers, and engineers can access it through their academic account.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">SSH connection setup<\/h3>\n\n\n\n<p>The documentation (in french) is <a href=\"https:\/\/www.mesonet.fr\/documentation\/user-documentation\/acces\/ssh#quest-ce-quune-cl%C3%A9-ssh-\">here<\/a>. These steps are required and are done only one time.<\/p>\n\n\n\n<p>3 steps are needed :<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Create your SSH key. On your local computer, open a terminal (Windows\/Linux) and use the following command to create a new SSH key. You will also be asked to enter a passphrase to encrypt your private key. Don&#8217;t lose this passphrase. Never send or communicate your private key! Only the public one (ending in .pub).<br>(local)$ ssh-keygen -t ed25519 -f .ssh\/id_ed25519<\/li>\n\n\n\n<li>Put your public key on Mesonet (refer to this <a href=\"https:\/\/www.mesonet.fr\/documentation\/user-documentation\/acces\/ssh#d%C3%A9poser-sa-cl%C3%A9-ssh-sur-le-portail\">documentation<\/a>) <br>To add your SSH key, log in to the MesoNET portal at https:\/\/acces.mesonet.fr. Click the <strong class=\"\">Log In<\/strong> button and sign in the same way you did when creating your account\u2014typically via eduGAIN. Once authenticated, click the <strong class=\"\">User<\/strong> icon in the top-right corner, then select <strong class=\"\">SSH Keys<\/strong>. This opens the SSH key management page.<\/li>\n\n\n\n<li>Associate your public key with a project (read this <a href=\"https:\/\/www.mesonet.fr\/documentation\/user-documentation\/acces\/ssh#associer-sa-cl%C3%A9-ssh-%C3%A0-un-compte-dans-un-projet\">page<\/a>)<\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\">Log in to Juliet<\/h3>\n\n\n\n<p>Use an SSH connection to juliet.mesonet.fr with the username given by email or on the website (ie tgrenier). See <a href=\"https:\/\/www.mesonet.fr\/documentation\/user-documentation\/code_form\/juliet\/connexion\">here<\/a> for more details. As an example, here is the command to enter on your computer (local) &#8211; change USERNAME to your real login: <\/p>\n\n\n\n<p><code>(local)$ ssh USERNAME@juliet.mesonet.fr<\/code><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Obtain resources on Juliet<\/h3>\n\n\n\n<p>You have to submit a job on Juliet to obtain access to a GPU. For our particular usage with JupyterLab and as a &#8220;beginner&#8221;, we will submit an interactive job with the following commands.<\/p>\n\n\n\n<p>1- <strong>Obtain<\/strong> the project ID. You will get a value such as: <strong>m2XXXX<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>(juliet1)$ sacctmgr --noheader --parsable2 show association where user=$USER format=account<\/code><\/pre>\n\n\n\n<p>2- <strong>Launch an interactive job.<\/strong> Change the <strong>m2XXXX<\/strong> to the value obtained with the previous command. This command asks for a 4-hour interactive job, 4 CPUs, and 1 GPU.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>(juliet1)$ srun --time=4:00:00 --account=<strong>m2XXXX<\/strong> --pty -c 4 --gres=gpu:1 \/bin\/bash<\/code><\/pre>\n\n\n\n<p>When the srun command succeeds and a resource is obtained, you are logged on the computational node with a new bash. In the following example, from juliet1 (the server), I obtain an interactive job on <strong>juliet2<\/strong>. It is important to note the name of this NODE (here<strong> juliet2)<\/strong>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large wp-duotone-unset-1\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"90\" src=\"https:\/\/www.creatis.insa-lyon.fr\/~grenier\/wp-content\/uploads\/image-4-1024x90.png\" alt=\"\" class=\"wp-image-1758\" srcset=\"https:\/\/www.creatis.insa-lyon.fr\/~grenier\/wp-content\/uploads\/image-4-1024x90.png 1024w, https:\/\/www.creatis.insa-lyon.fr\/~grenier\/wp-content\/uploads\/image-4-300x26.png 300w, https:\/\/www.creatis.insa-lyon.fr\/~grenier\/wp-content\/uploads\/image-4-768x68.png 768w, https:\/\/www.creatis.insa-lyon.fr\/~grenier\/wp-content\/uploads\/image-4.png 1032w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Launch a JupyterLab server<\/h3>\n\n\n\n<p>If not already done, you have to install Miniconda.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>(julietN)$ cp \/projects\/m26238\/Install\/Miniconda3-latest-Linux-x86_64.sh ~\/<br>(julietN)$ bash ~\/Miniconda3-latest-Linux-x86_64.sh<\/code><\/pre>\n\n\n\n<p>Activate the conda environment used for this practical session (how to create it yourself is described <a href=\"https:\/\/www.creatis.insa-lyon.fr\/~grenier\/?p=1716\">here<\/a>):<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>(julietN)$ conda activate \/projects\/m26238\/Keras3TF<\/code><\/pre>\n\n\n\n<p>Launch JupyterLab with:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>(julietN)$ jupyter lab<\/code><\/pre>\n\n\n\n<p>Have a look at the output of this command. It will give you i) the <strong>PORT <\/strong>number (8888 here) and ii) the <strong>TOKEN <\/strong>(a69ab&#8230;. ).<\/p>\n\n\n\n<figure class=\"wp-block-image size-large wp-duotone-unset-2\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"310\" src=\"https:\/\/www.creatis.insa-lyon.fr\/~grenier\/wp-content\/uploads\/JupyterOnJuliet-1024x310.png\" alt=\"\" class=\"wp-image-1761\" srcset=\"https:\/\/www.creatis.insa-lyon.fr\/~grenier\/wp-content\/uploads\/JupyterOnJuliet-1024x310.png 1024w, https:\/\/www.creatis.insa-lyon.fr\/~grenier\/wp-content\/uploads\/JupyterOnJuliet-300x91.png 300w, https:\/\/www.creatis.insa-lyon.fr\/~grenier\/wp-content\/uploads\/JupyterOnJuliet-768x233.png 768w, https:\/\/www.creatis.insa-lyon.fr\/~grenier\/wp-content\/uploads\/JupyterOnJuliet.png 1182w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Create an SSH tunnel to the JupyterLab server<\/h3>\n\n\n\n<p>In a new <strong>local <\/strong>terminal, adjust the following command to your USERNAME, your NODE, the PORT of the JupyterLab server, and your USERNAME<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>(local)$ ssh -J USERNAME@juliet.mesonet.fr -L 8000:localhost:PORT USERNAME@NODE<\/code><\/pre>\n\n\n\n<p>It can look like:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>(local)$ ssh -J tgrenier@juliet.mesonet.fr -L 8000:localhost:8888 tgrenier@juliet2<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Access to JupyterLab<\/h3>\n\n\n\n<p>In your favorite web browser (from your local computer), open the address 127.0.0.1:8000. When asked for a password or token, use the TOKEN of the JupyterLab and log in.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full wp-duotone-unset-3\"><img loading=\"lazy\" decoding=\"async\" width=\"814\" height=\"358\" src=\"https:\/\/www.creatis.insa-lyon.fr\/~grenier\/wp-content\/uploads\/JupyterLab.png\" alt=\"\" class=\"wp-image-1764\" srcset=\"https:\/\/www.creatis.insa-lyon.fr\/~grenier\/wp-content\/uploads\/JupyterLab.png 814w, https:\/\/www.creatis.insa-lyon.fr\/~grenier\/wp-content\/uploads\/JupyterLab-300x132.png 300w, https:\/\/www.creatis.insa-lyon.fr\/~grenier\/wp-content\/uploads\/JupyterLab-768x338.png 768w\" sizes=\"auto, (max-width: 814px) 100vw, 814px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Enjoy!<\/h3>\n\n\n\n<figure class=\"wp-block-image size-large wp-duotone-unset-4\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"544\" src=\"https:\/\/www.creatis.insa-lyon.fr\/~grenier\/wp-content\/uploads\/image-5-1024x544.png\" alt=\"\" class=\"wp-image-1766\" srcset=\"https:\/\/www.creatis.insa-lyon.fr\/~grenier\/wp-content\/uploads\/image-5-1024x544.png 1024w, https:\/\/www.creatis.insa-lyon.fr\/~grenier\/wp-content\/uploads\/image-5-300x160.png 300w, https:\/\/www.creatis.insa-lyon.fr\/~grenier\/wp-content\/uploads\/image-5-768x408.png 768w, https:\/\/www.creatis.insa-lyon.fr\/~grenier\/wp-content\/uploads\/image-5-1536x817.png 1536w, https:\/\/www.creatis.insa-lyon.fr\/~grenier\/wp-content\/uploads\/image-5.png 1544w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Now you can download the material on classification <a href=\"https:\/\/gitlab.in2p3.fr\/thomas.grenier\/tp1ss_classification\/-\/raw\/master\/TP_Classification_v06.zip?ref_type=heads\">here<\/a>, or segmentation <a href=\"https:\/\/gitlab.in2p3.fr\/thomas.grenier\/tp4ss_segmentation\/-\/raw\/master\/TP_Segmentation_v06.zip?ref_type=heads\">here<\/a>, or&#8230; and drag and drop this file into the left panel.<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>How to launch JupyterLab on Juliet? The MesoNet cloud provides CPU\/GPU resources and storage. Jupyterlab is a notebook server used for practical sessions. The road is long to make them work together. You need to follow all these steps : Remark: local means your computer. server means distant resources. Mesonet Account Read the following documentation: [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5,18,4,1],"tags":[],"class_list":["post-1748","post","type-post","status-publish","format-standard","hentry","category-computer-science","category-deep-learning-teaching","category-teaching","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/www.creatis.insa-lyon.fr\/~grenier\/index.php?rest_route=\/wp\/v2\/posts\/1748","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.creatis.insa-lyon.fr\/~grenier\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.creatis.insa-lyon.fr\/~grenier\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.creatis.insa-lyon.fr\/~grenier\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.creatis.insa-lyon.fr\/~grenier\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1748"}],"version-history":[{"count":21,"href":"https:\/\/www.creatis.insa-lyon.fr\/~grenier\/index.php?rest_route=\/wp\/v2\/posts\/1748\/revisions"}],"predecessor-version":[{"id":1775,"href":"https:\/\/www.creatis.insa-lyon.fr\/~grenier\/index.php?rest_route=\/wp\/v2\/posts\/1748\/revisions\/1775"}],"wp:attachment":[{"href":"https:\/\/www.creatis.insa-lyon.fr\/~grenier\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1748"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.creatis.insa-lyon.fr\/~grenier\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1748"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.creatis.insa-lyon.fr\/~grenier\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1748"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}