Open. You will see a message saying
Install with Docker
- Here are the steps to get OpenBBTerminal using the Docker containers that we provide: -1. Installing `Docker` and `Docker Compose` -2. Pulling and running `OpenBBTerminal Docker Container` -3. Configuring your X-server to show plots +Here we will detail how to run OpenBB Terminal Docker image. -Each of this steps need to be followed to have a working version of OpenBBTerminal. +Please check the section matching to your OS. -We will detail these steps in the rest of this document. +## 1. Windows -## 1. Installing `Docker` and `Docker Compose` +### 1.1. Install Docker Desktop -**INSTALL DOCKER** +You can find `Docker Desktop` for Windows here: [Download Docker Desktop](https://www.docker.com/products/docker-desktop) -Installing Docker Desktop is an alternative way and has a `Graphical User Interface` built in with `Docker Compose`. +### 1.2. Start Docker -You can find `Docker Desktop` installation file for your `OS` here: [Download Docker Desktop](https://www.docker.com/products/docker-desktop) - -**START DOCKER** - -Once you have `Docker` installed and running, you can use the following command to check the state: +Execute the following command: ```bash docker info ``` -It should output a text like this one: +If you have something like this, it means you haven't started Docker: -```text +```bash +docker info +Server: +ERROR: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. +Is the docker daemon running? +``` + +Start Docker, this is how the right output looks like: + +```bash +docker info Client: Context: default Debug Mode: false @@ -124,72 +127,17 @@ Server: Stopped: 10 ``` -If you see a message like the following, it most likely means you need to start `Docker`. +### 1.3. Install VcXsrv -Open the docker desktop app in this case. +To display charts with your container, you need : VcXsrv. -```text -Server: -ERROR: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. -Is the docker daemon running? -``` +You can download VcXsrv here : [Download VcXsrv](https://sourceforge.net/projects/vcxsrv) -## 2. Pulling and running `OpenBBTerminal Docker Container` +When running VcXsrv program check the option: `Disable access control` -**DOCKER COMPOSE** +### 1.4. Pull and run the container -Here are the commands to use `Docker Compose` to pull and run the `OpenBBTerminal Docker Container`: - -```bash -curl -o docker-compose.yaml https://raw.githubusercontent.com/OpenBB-finance/OpenBBTerminal/main/build/docker/docker-compose.yaml - -docker compose run openbb -``` - -The command line with `curl` is downloading this file : [`docker-compose.yaml`](https://raw.githubusercontent.com/OpenBB-finance/OpenBBTerminal/main/build/docker/docker-compose.yaml). - -The `docker-compose.yaml` file is a configuration file telling `Docker Compose`: - -- where to find `OpenBBTerminal Docker Container` -- how to run this container. - -The second command runs `Docker Compose` on the service `poetry` defined in this `docker-compose.yaml` file. - -This second command must be run in the same folder in which `docker-compose.yaml` file is. - -**DOCKER** - -If you don't have `Docker Compose` you can also use `Docker` directly to run the `OpenBBTerminal Docker Container`. - -Here is the commands to run: - -```bash -docker pull ghcr.io/openbb-finance/openbbterminal/openbb:latest - -docker run -v ~/.openbb_terminal/:/home/python/.openbb_terminal -v ~/OpenBBUserData:/home/python/OpenBBUserData -it --rm ghcr.io/openbb-finance/openbbterminal/openbb:latest -``` - -You can replace `latest` with the version you want to pull and run. - -Note for windows: - -```text - Ignore this message if you are using Powershell or a more evolved interpreters. - If you are using the builtin Windows interpreter. - Replace `~` by `%USERPROFILE%` in the command above. -``` - -## 3. Configuring your X-server to show plots - -In order to display plots in the docker container, we need to configure the XServer on the host machine. Without this configuration the interactive charts will not be displayed. - -### On Windows - -Download and install : [VcXsrv](https://sourceforge.net/projects/vcxsrv/) - -When running the program is important to check "Disable access control" - -Run `Docker Compose` like this: +Execute this commands: ```bash curl -o docker-compose.yaml https://raw.githubusercontent.com/OpenBB-finance/OpenBBTerminal/main/build/docker/docker-compose.yaml @@ -197,68 +145,86 @@ curl -o docker-compose.yaml https://raw.githubusercontent.com/OpenBB-finance/Ope docker compose run poetry ``` -Or run `Docker` directly: +This will download and run the file: `docker-compose.yaml` + +This file contents the settings to pull and run OpenBB Terminal Docker image. + +## 2. macOS + +### 2.1. Install and run Docker Desktop + +Install and run Docker Desktop as describe above in this document. + +### 2.2. Install XQuartz + +You can download XQuartz here: [Download XQuartz](https://www.xquartz.org) + +Open X Quartz. + +Then on `Preferences > Security`. + +Make sure both of these options are enabled: + +- `Authenticate connections` +- `Allow connections from network clients` + +It should look like this: +  + +### 2.3. Get Docker IP + +To get Docker IP you can use this command: ```bash -docker run -v ~/.openbb_terminal:/home/python/.openbb_terminal -v ~/OpenBBUserData:/home/python/OpenBBUserData -it --rm --env DISPLAY=host.docker.internal:0.0 ghcr.io/openbb-finance/openbbterminal/openbb:latest +IP=$(ifconfig | grep inet | grep -v "127.0.0.1" | awk '$1=="inet" {print $2}') ``` -### X-Server on macOS +### 2.4. Pull and run the container -Users familiar with Docker and X-Server can set the `DISPLAY` variable in the file [setenv](/docker/setenv) described above. If you use this approach remember to add `:0` at the end of your inet address. E.g. `DISPLAY=192.168.1.155:0`. - -For help setting up the X-Server continue reading: - -#### Setting up X Quartz/X11 - -On macOS the X11 client of choice is [XQuartz](https://www.xquartz.org/). On Windows it's [Xming](http://www.straightrunning.com/XmingNotes/). XQuartz will be used as an example further on. - -0. Install X Quartz from