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

# Installation

On this page, you will find the installation instructions for ReinforceUI Studio.

## Prerequisites

Before installing ReinforceUI Studio, we will need  you to have the following prerequisites installed on your system:

<Accordion icon="github" title="requires">
  * Ubuntu Linux (Tested on Ubuntu 22.04 LTS and 24.04 LTS)
  * Python 3.8 or higher (Tested on python 3.10, 3.11, and 3.12)
</Accordion>

From now on, we will take care of the rest.

## Installation

ReinforceUI Studio offers several ways to get started, allowing you to choose the method that best suits your setup:

### Run Locally

<Tip>
  Running locally means setting up ReinforceUI Studio directly on your machine. This method is ideal for users who prefer
  full control over the application and its dependencies. With just a few commands, you can have everything configured and
  ready to go, no extra tools are required.
</Tip>

<Steps>
  <Step title="The easiest way to use ReinforceUI Studio is by installing it directly from the official PyPI">
    ```bash theme={null}
      pip install reinforceui-studio
    ```
  </Step>

  <Step title="Run the application">
    ```bash theme={null}
      reinforceui-studio
    ```
  </Step>
</Steps>

<Steps>
  <Step title=" Or install it from source">
    ```bash theme={null}
      git clone git@github.com:dvalenciar/ReinforceUI-Studio.git
      cd ReinforceUI-Studio
      pip install -r requirements.txt
      pip install .
    ```
  </Step>

  <Step title="Run the application">
    ```python theme={null}
      python reinforceui_studio/main.py
    ```
  </Step>
</Steps>

### Conda Environment

<Tip>
  Conda is a widely used package manager that simplifies dependency management and ensures compatibility across platforms.
  This method is ideal for users who want a clean, isolated environment without conflicts with other Python libraries or
  system configurations. Ensure Conda is installed on your system before proceeding.
  You can find Conda installation instructions [Conda Installation](https://docs.conda.io/projects/conda/en/latest/user-guide/install/linux.html).
</Tip>

<Steps>
  <Step title="Create a new Conda environment">
    ```bash theme={null}
      conda create -n reinforceui python=3.10
      conda activate reinforceui
    ```
  </Step>

  <Step title="Clone the repository and install the required dependencies">
    ```bash theme={null}
      git clone git@github.com:dvalenciar/ReinforceUI-Studio.git
      cd ReinforceUI-Studio
      pip install -r requirements.txt
      pip install .
    ```
  </Step>

  <Step title="Run the application">
    ```bash theme={null}
        python reinforceui_studio/main.py
    ```
  </Step>
</Steps>

### Conda Environment with YML file

<Tip>
  Another easy way to install ReinforceUI Studio in a Conda environment is to use the provided `conda_environment.yml` file.
  This file contains all the dependencies required to run the application, making the installation process even simpler.
</Tip>

<Steps>
  <Step title="Clone the repository">
    ```bash theme={null}
      git clone git@github.com:dvalenciar/ReinforceUI-Studio.git
      cd ReinforceUI-Studio
    ```
  </Step>

  <Step title="Create a new Conda environment using the `conda_environment.yml` file">
    ```bash theme={null}
      conda env create -f conda_environment.yml
    ```
  </Step>

  <Step title="Activate the Conda environment">
    ```bash theme={null}
      conda activate reinforceui
    ```
  </Step>

  <Step title="Run the application">
    ```bash theme={null}
      python reinforceui_studio/main.py
    ```
  </Step>
</Steps>

### Virtual Python Environment

<Tip>
  If you do not like Conda, a virtual Python environment is another option for installing ReinforceUI Studio.
  A virtual Python environment is an isolated setup that allows you to manage project dependencies without affecting your
  system’s Python or other projects. It's ideal for users who prefer lightweight setups without additional package managers like Conda.
</Tip>

<Steps>
  <Step title="Create a new virtual Python environment">
    ```bash theme={null}
      python3 -m venv reinforceui
      source reinforceui/bin/activate
    ```
  </Step>

  <Step title="Clone the repository">
    ```bash theme={null}
      git clone git@github.com:dvalenciar/ReinforceUI-Studio.git
      cd ReinforceUI-Studio
    ```
  </Step>

  <Step title="Install the required dependencies">
    ```bash theme={null}
      pip install -r requirements.txt
      pip install .

    ```
  </Step>

  <Step title="Run the application">
    ```bash theme={null}
      python reinforceui_studio/main.py
    ```
  </Step>
</Steps>

### Docker Container

<Tip>
  Docker is a popular containerization tool that simplifies the deployment of applications across different platforms.
  This method is perfect for users who want a hassle-free, isolated setup without worrying about managing dependencies.
  Make sure Docker is installed on your system. Docker installation instructions [Docker Installation](https://docs.docker.com/get-docker/).
</Tip>

To make it even easier, we have already provided a pre-built image, ready to run in a Docker container.

<Steps>
  <Step title="Pull the ReinforceUI Studio Docker image:">
    ```bash theme={null}
      docker pull ghcr.io/dvalenciar/reinforceui-studio:latest
    ```
  </Step>

  <Step title="Run the Docker container">
    ```bash theme={null}
      xhost +local:
      docker run -it --rm   -e DISPLAY=$DISPLAY   -v /tmp/.X11-unix:/tmp/.X11-unix   -v /home/{user_name}:/root/logs   reinforceui-studio bash
    ```

    You can get your `{user_name}` by running: `whoami`, for example, in my case, the full command is:

    ```bash theme={null}
      docker run -it --rm   -e DISPLAY=$DISPLAY   -v /tmp/.X11-unix:/tmp/.X11-unix   -v /home/david:/root/logs  reinforceui-studio bash
    ```
  </Step>

  <Step title="Inside the docker container, run the application: ">
    ```bash theme={null}
      python reinforceui_studio/main.py
    ```
  </Step>
</Steps>

<Note>
  There are some issues with the docker folder log and some video records; we are working on it.
</Note>
