> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dwe.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# dweOS Legacy

<Warning>
  dweOS Legacy a été abandonné au profit de [dweOS
  2.0](/fr/dwe-os).
</Warning>

## Installation

<Tabs>
  <Tab title="Option 1 : Graver une image Raspberry Pi (recommandé)">
    <Steps>
      <Step title="Première étape">
        Téléchargez la dernière image [ici](https://github.com/DeepwaterExploration/dweOS/releases/).
      </Step>

      <Step title="Deuxième étape">
        Téléchargez [Raspberry Pi Imager](https://www.raspberrypi.com/software/) pour flasher l'image sur une carte SD.
      </Step>

      <Step title="Sélectionner l'appareil">
        <video controls={true} autoPlay loop height="300px" className="w-full aspect-video" src="https://cdn.shopify.com/videos/c/o/v/ce746d70d36443e4b5dcbab6a2e89a87.webm" />
      </Step>

      <Step title="Sélectionner l'image dweOS">
        <video controls={true} autoPlay loop height="300px" className="w-full aspect-video" src="https://cdn.shopify.com/videos/c/o/v/7cc23a4b35724451886fb1eea783edf8.webm" />
      </Step>

      <Step title="Sélectionner la carte SD">
        <video controls={true} autoPlay loop height="300px" className="w-full aspect-video" src="https://cdn.shopify.com/videos/c/o/v/70b76e866efd4757ac16f1d1cf577395.webm" />
      </Step>

      <Step title="Succès !">
        ![dweOS Success](https://cdn.shopify.com/s/files/1/0575/8785/9626/files/dwe_os_1_step_4.png)
      </Step>
    </Steps>
  </Tab>

  <Tab title="Option 2 : SSH et installation">
    ## Connexion

    <Card title="Instructions SSH" icon="link" href="/fr/dwe-os/guides/ssh-rpi">
      Connectez-vous d'abord en SSH à votre Raspberry Pi.
    </Card>

    <Steps>
      <Step title="Script d'installation">
        Pour installer pour le Raspberry Pi, vous pouvez exécuter les commandes suivantes :

        ```sh theme={null}
        sudo apt update

        sudo apt upgrade

        curl -fsSL https://raw.githubusercontent.com/DeepwaterExploration/dweOS/main/scripts/install.sh | sudo -E bash -
        ```
      </Step>

      <Step title="Terminé.">
        Une fois installé, le script devrait se terminer avec le message suivant :

        ```
        Installation of dweOS was successful.
        ```
      </Step>
    </Steps>
  </Tab>

  <Tab title="Option 3 : Installation manuelle">
    <Warning> Veuillez suivre ce guide uniquement si vous êtes un expert. </Warning>

    Vous pouvez installer manuellement (pour `Raspberry Pi` ou d'autres systèmes `ARM`/`x86`) en suivant les instructions individuelles du script d'installation ci-dessous.

    ### Installer NodeJS 20 et NPM

    ```sh theme={null}
    sudo apt update
    sudo apt upgrade
    curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -
    sudo apt install nodejs
    curl -L https://npmjs.org/install.sh | sudo sh
    ```

    ### Installer les autres dépendances :

    ```sh theme={null}
    sudo apt install libudev-dev libgstreamer-plugins-base1.0-dev libgstreamer1.0-dev gstreamer1.0-plugins-good gstreamer1.0-plugins-bad
    ```

    ### Installer dweOS :

    ```sh theme={null}
    sudo npm install -g @dwe.ai/dwe-os-1
    ```

    ### Exécuter dweOS manuellement :

    Tapez ce qui suit dans votre shell :

    ```sh theme={null}
    dwe-os-1
    ```

    puis appuyez sur `Entrée`. Ajoutez `--help` à la fin pour voir plus d'options.

    ### Lancement automatique (RPi)

    Pour activer le lancement automatique (recommandé pour Raspberry Pi) :

    1. Installez [pm2](https://www.npmjs.com/package/pm2) :

    ```sh theme={null}
    sudo npm install -g pm2
    ```

    2. Démarrez dwe-os-1 depuis pm2 :

    ```sh theme={null}
    pm2 start dwe-os-1
    ```

    3. Enregistrez la liste des processus :

    ```sh theme={null}
    pm2 save
    ```

    4. Activez le démarrage pour pm2 sur Raspberry Pi :
       Raspberry Pi :

       ```sh theme={null}
       sudo pm2 startup systemd -u pi --hp /home/pi
       ```

       Système personnalisé :

       ```sh theme={null}
       sudo pm2 startup systemd -u <your username> --hp /home/<your username>
       ```
  </Tab>
</Tabs>
