<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Abdoulaye on Medium]]></title>
        <description><![CDATA[Stories by Abdoulaye on Medium]]></description>
        <link>https://medium.com/@abdoulsn?source=rss-75f4ab5a8577------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*NLHKvDjAeb7DgukAVnQVZA@2x.jpeg</url>
            <title>Stories by Abdoulaye on Medium</title>
            <link>https://medium.com/@abdoulsn?source=rss-75f4ab5a8577------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 19 Nov 2026 14:50:56 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@abdoulsn/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Lancer PySpark sur Jupyter Notebook avec Docker]]></title>
            <link>https://abdoulsn.medium.com/lancer-pyspark-sur-jupyter-notebook-avec-docker-affaffd2c0e0?source=rss-75f4ab5a8577------2</link>
            <guid isPermaLink="false">https://medium.com/p/affaffd2c0e0</guid>
            <category><![CDATA[jupyter-notebook]]></category>
            <category><![CDATA[docker-pyspark]]></category>
            <category><![CDATA[pyspark]]></category>
            <category><![CDATA[jupyter]]></category>
            <dc:creator><![CDATA[Abdoulaye]]></dc:creator>
            <pubDate>Sat, 10 Apr 2021 15:12:38 GMT</pubDate>
            <atom:updated>2021-04-10T15:12:38.667Z</atom:updated>
            <content:encoded><![CDATA[<p>Docker est devenu l’outil idéal pour les développeurs, mais aussi pour les data scientist qui souhaite tester et déployer leur modèles. Pyspark demande souvent de configurer plein de machin bidules et ne marche pas à tous les coups. Dans ce chapitre, je vous explique de manière simple comment obtenir via Docker et de le lancer avec Jupyter lab ou Jupyter notebook sans problème et commencer à écrire ces codes.</p><p><strong><em>NB: Avant de se lancer vous devez avoir docker installé sur votre machine.</em></strong></p><h4>Obetnir Jupyter pySpark</h4><p>Sur Docker-Hub, le port ou les conteneurs sont livrés, une simple recherche de “pyspark” suffit.</p><p>Lien: <a href="https://hub.docker.com/r/jupyter/pyspark-notebook">pyspark-notebook</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4SvMc2pG5D1XRWY5FG_4xQ.png" /></figure><p>Sur votre ligne de commande après avoir lancé Docker, tapez:</p><blockquote>docker pull jupyter/pyspark-notebook</blockquote><p>Une fois le chargement terminé, Nous allons utiliser la commande suivante pour le lancer.</p><blockquote>docker run --rm -p 8889:8888 -e JUPYTER_ENABLE_LAB=yes -v “$PWD”:/home/jovyan/work jupyter/pyspark-notebook:latest</blockquote><p>Les commandes:</p><ul><li><strong>--rm: </strong>lancer docker avec cette commande permet d’économiser l’espace disque une fois le notebook arrêté.</li><li><strong>-p 8889:8888: </strong>Expose le port 8888 de docker sur le nouveau port 8889(vous pouvez le changer s’il est déjà ooccupé)</li><li><strong>-e JUPYTER_ENABLE_LAB=yes: </strong>Lance Jupyter sur le lab et non sur le notebook.</li><li><strong>-v “$PWD$”: /home/jovyan/work: </strong>Permet de maintenir votre travail sur le disque dure, en effet si vous le montez pas de volume en lancant Jupyter une fois fermé vous perdez tout. <strong>$PWD$</strong> correspond au répertoire courant et donc vous pouvez le remplacer par un autre chemin que vous voulez. Ceci permet également d’utiliser des notebook déja existant en local pour y travailler.</li><li><strong>jupyter/pyspark-notebook:latest: </strong>Ce paramètre récupéré le conteneur à lancer, si au lieu de pyspark vous avez télécharger <strong>jupyter/datascience-notebook </strong>il suffit juste remplacer ainsi à ce niveau pour le lancer.</li></ul><h4>Créer un alias</h4><p>Les alias permet d’éviter d’ecrir à chaque fois une ligne de commande longue. nous allons créer un alias sur le .bash_profile (OS).</p><p>Dans votre ligne de commande tapez:</p><blockquote>nano ~/.bash_profile</blockquote><p>l’editeur s’ouvre sur la commande line, allez à la dernière ligne et ajoutez après cette ligne ceci:</p><blockquote><em>alias </em><strong><em>pyspark</em></strong><em>=’docker run — rm -p 8889:8888 -e JUPYTER_ENABLE_LAB=yes -v “$PWD$”:/home/jovyan/work jupyter/pyspark-notebook:latest’</em></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oHvW1-MvTGM2DiwhkoL1GQ.png" /><figcaption>configurer alias dans bash_profile</figcaption></figure><p><em>NB: </em><strong><em>$PWD$</em></strong><em> à remplacer si besoin, j’utilise </em><strong><em>pyspark</em></strong><em> comme alias, vous pouvez le renommer à votre convenance.</em></p><p>Pour sortir de l’éditeur: Ctrl+O pour enregistrer et puis Ctrl+X pour sortir.</p><p>Pour mettre à jour le système bash_profile</p><blockquote>source ~/.bash_profile</blockquote><p>Sur votre ligne de commande l’alias pyspark permet maintenant de lancer votre notebook. j’espère ce petit tutoriel vous à aider n’hésitez pas à laisser des commentaire et suggestions pour que je l’améliore.</p><p>pyspark</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_o7kh7PP0iS0I3TTK7JMnw.png" /><figcaption>pyspark running</figcaption></figure><p>C’est fini votre jupyter est lancer sur: <a href="http://localhost:8889/login?next=%2Flab%3F">http://localhost:8889</a> n’oubliez pas de changé le port du lien dans le terminal si vous l’avez exposé sur un port différent de :8888.</p><p>Complement et source: <a href="https://github.com/jupyter/docker-stacks">https://github.com/jupyter/docker-stacks</a></p><p>Merci 🙂</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=affaffd2c0e0" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>