diff --git a/.dockerignore b/.dockerignore index 8996ddbcf25..f3f229891e5 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,7 +1,6 @@ .git .* .dockerignore -.env* .gitignore docker-compose.yaml Dockerfile* diff --git a/DOCKER_ADVANCED.md b/DOCKER_ADVANCED.md index e3488d5e312..605559158cb 100644 --- a/DOCKER_ADVANCED.md +++ b/DOCKER_ADVANCED.md @@ -1,43 +1,5 @@ # Docker Advanced Settings -## Environment Variables - -In order to pass your API keys to the docker container, they must first be set in a local file. In the main repository, -there is a file with predefined keys and terminal settings [setenv](/docker/setenv). This can be downloaded or created -on your own - -The file should contain something such as: - -```bash -DISPLAY= - -OPENBB_API_KEY_FINANCIALMODELINGPREP=qwerty123456 -... -OPENBB_API_POLYGON_KEY=qwerty123456 -OPENBB_API_FRED_KEY=qwerty123456 - -HDF5_DISABLE_VERSION_CHECK=2 - -OPENBB_ENABLE_PREDICT=True -OPENBB_ENABLE_THOUGHTS_DAY=False -OPENBB_USE_PROMPT_TOOLKIT=True -OPENBB_USE_ION=True -``` - -where 'qwerty123456' corresponds to each individual API key. Note: - -1. Unlike API keys in [config_terminal](/openbb_terminal/config_terminal.py), these keys **DO NOT** use " ". -2. This file is sensible to white spaces. Therefore, make sure there isn't an additional white space at the end of the - key, otherwise it won't work. - -In order to run the docker container with the environment variables, make sure to edit with whatever keys you have and -then run the container (`path/to/setenv`) should be replaced with wherever this file was created). If you have -downloaded the entire repository and your current directory is `OpenBBTerminal`, then the path would be `docker/setenv` - -```bash -docker run -it --rm --env-file=path/to/setenv ghcr.io/openbb-finance/openbbterminal-poetry:latest -``` - ## Display In order to display plots in the docker container, we can configure our XServer. diff --git a/build/pyinstaller/.env b/build/pyinstaller/.env index e7a4a78eeaf..3d66e605689 100644 --- a/build/pyinstaller/.env +++ b/build/pyinstaller/.env @@ -1,5 +1,5 @@ OPENBB_PACKAGED_APPLICATION=true -OPENBB_LOGGING_COMMIT_HASH='sha:dd768556' +OPENBB_LOGGING_COMMIT_HASH='sha:2e723d64' OPENBB_ENABLE_PREDICT=false OPENBB_ENABLE_CHECK_API=true OPENBB_ENABLE_THOUGHTS_DAY=false diff --git a/docker/compose.env b/docker/compose.env index a08b6757ca4..e3ce49cafba 100644 --- a/docker/compose.env +++ b/docker/compose.env @@ -1,18 +1,12 @@ OPENBBTERMINAL_DOCKER_IMAGE_PREFIX="ghcr.io/openbb-finance" -OPENBBTERMINAL_DOCKER_PYTHON_VERSION="1.7.0" -OPENBBTERMINAL_DOCKER_DEPS_VERSION="1.7.0" -OPENBBTERMINAL_DOCKER_POETRY_DEPS_VERSION="1.7.0" -OPENBBTERMINAL_DOCKER_POETRY_FULL_DEPS_VERSION="1.7.0" -OPENBBTERMINAL_DOCKER_OPENBBTERMINAL_VERSION="1.7.0" -OPENBBTERMINAL_DOCKER_POETRY_VERSION="1.7.0" -OPENBBTERMINAL_DOCKER_POETRY_FULL_VERSION="1.7.0" +OPENBBTERMINAL_DOCKER_PYTHON_VERSION="1.8.0" +OPENBBTERMINAL_DOCKER_POETRY_DEPS_VERSION="1.8.0" +OPENBBTERMINAL_DOCKER_POETRY_VERSION="1.8.0" DOCKER_DEFAULT_PLATFORM=linux/amd64 export OPENBBTERMINAL_DOCKER_IMAGE_PREFIX export OPENBBTERMINAL_DOCKER_PYTHON_VERSION export OPENBBTERMINAL_DOCKER_DEPS_VERSION export OPENBBTERMINAL_DOCKER_POETRY_DEPS_VERSION -export OPENBBTERMINAL_DOCKER_POETRY_FULL_DEPS_VERSION export OPENBBTERMINAL_DOCKER_OPENBBTERMINAL_VERSION export OPENBBTERMINAL_DOCKER_POETRY_VERSION -export OPENBBTERMINAL_DOCKER_POETRY_FULL_VERSION diff --git a/docker/docker-compose.yaml b/docker/docker-compose.yaml index 6b19f440d99..e669f75b19f 100644 --- a/docker/docker-compose.yaml +++ b/docker/docker-compose.yaml @@ -25,4 +25,3 @@ services: OPENBBTERMINAL_DOCKER_POETRY_DEPS_VERSION: ${OPENBBTERMINAL_DOCKER_POETRY_DEPS_VERSION} image: "${OPENBBTERMINAL_DOCKER_IMAGE_PREFIX}/openbbterminal-poetry:${OPENBBTERMINAL_DOCKER_POETRY_VERSION}" tty: true - env_file: setenv diff --git a/docker/entry-point-poetry-jupyter.sh b/docker/entry-point-poetry-jupyter.sh deleted file mode 100644 index af17da7091e..00000000000 --- a/docker/entry-point-poetry-jupyter.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -source $(poetry env info --path)/bin/activate -#export PS1="(OPENBBTERMINAL_) > " -# stty erase ^h -jupyter lab --ip=0.0.0.0 -#poetry run python terminal.py diff --git a/docker/extension.sh b/docker/extension.sh deleted file mode 100644 index 55fb9a92473..00000000000 --- a/docker/extension.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash - -source $(poetry env info --path)/bin/activate - -pip install -e jupyterlab/openbb -pip install -e jupyterlab/openbbterminal-settings -pip install -e jupyterlab/documentation -jupyter-labextension install jupyterlab/openbb -jupyter-labextension install jupyterlab/openbb-settings -jupyter-labextension install jupyterlab/documentation diff --git a/docker/lab-settings.json b/docker/lab-settings.json deleted file mode 100644 index a9ca1312d5b..00000000000 --- a/docker/lab-settings.json +++ /dev/null @@ -1,377 +0,0 @@ -{ - "title": "Gamestonk settings", - "description": "Settings for OpenBB Terminal extension.", - "type": "object", - "properties": { - "FEATURE_FLAGS": { - "title": "Feature flags", - "description": "Feature flags for the OpenBB Terminal.", - "default": { - "OPENBB_USE_CLEAR_AFTER_CMD": { - "type": "bool", - "form": "checkbox", - "title": "Clear after command", - "description": "Use clear console after each command", - "default": false, - "value": "" - }, - "OPENBB_USE_COLOR": { - "type": "bool", - "form": "checkbox", - "title": "Colors", - "description": "Use coloring features", - "default": true, - "value": "" - }, - "OPENBB_USE_FLAIR": { - "type": "string", - "form": "text", - "title": "Console flair", - "description": "Select console flair (choose from config_terminal.py list)", - "default": "openbb", - "value": "" - }, - "OPENBB_USE_ION": { - "type": "bool", - "form": "checkbox", - "title": "Interactive charts", - "description": "Enable interactive matplotlib", - "default": true, - "value": "" - }, - "OPENBB_USE_PROMPT_TOOLKIT": { - "type": "bool", - "form": "checkbox", - "title": "Autocomplete", - "description": "Enable Prompt Toolkit", - "default": true, - "value": "" - }, - "OPENBB_ENABLE_PREDICT": { - "type": "bool", - "form": "checkbox", - "title": "Prediction menu", - "description": "Enable Prediction features", - "default": true, - "value": "" - }, - "OPENBB_USE_PLOT_AUTOSCALING": { - "type": "bool", - "form": "checkbox", - "title": "Plot autoscaling", - "description": "Enable plot autoscaling", - "default": false, - "value": "" - }, - "OPENBB_ENABLE_THOUGHTS_DAY": { - "type": "bool", - "form": "checkbox", - "title": "Thoughts of the day", - "description": "Enable thoughts of the day", - "default": false, - "value": "" - }, - "OPENBB_ENABLE_QUICK_EXIT": { - "type": "bool", - "form": "checkbox", - "title": "Quick exit", - "description": "Quick exit for testing", - "default": false, - "value": "" - } - } - }, - "APP_SETTINGS": { - "title": "General", - "description": "Application settings for the OpenBB Terminal.", - "default": { - "PAPERMILL_NOTEBOOK_REPORT_PORT": { - "type": "number", - "form": "number", - "title": "Papermill port", - "description": "Papermill port", - "default": 8892, - "value": "" - }, - "PYTHON_BINARY": { - "type": "string", - "form": "text", - "title": "Python executable", - "description": "Path to the python in your custom environment", - "default": "poetry run python", - "value": "" - }, - "TERMINAL_PATH": { - "type": "string", - "form": "text", - "title": "Terminal path", - "description": "Path to the terminal.py", - "default": "terminal.py", - "value": "" - }, - "PATH_TO_SELENIUM_DRIVER": { - "type": "string", - "form": "text", - "title": "Path to webdriver", - "description": "Path to the selenium driver", - "default": "", - "value": "" - }, - "WEBDRIVER_TO_USE": { - "type": "string", - "form": "text", - "title": "Webdriver", - "description": "Selenium browser drivers can be found at https://selenium-python.readthedocs.io/installation.html", - "default": "chrome", - "value": "" - } - } - }, - "API_KEYS": { - "title": "API Keys", - "description": "Access credentials for data providers.", - "default": { - "OPENBB_API_KEY_ALPHAVANTAGE": { - "type": "string", - "form": "password", - "title": "Alphavantage", - "description": "https://www.alphavantage.co", - "default": "REPLACE_ME", - "value": "" - }, - "OPENBB_API_KEY_FINANCIALMODELINGPREP": { - "type": "string", - "form": "password", - "title": "financialmodelingprep", - "description": "https://financialmodelingprep.com/developer", - "default": "REPLACE_ME", - "value": "" - }, - "OPENBB_API_KEY_QUANDL": { - "type": "string", - "form": "password", - "title": "quandl", - "description": "https://www.quandl.com/tools/api", - "default": "REPLACE_ME", - "value": "" - }, - "OPENBB_API_REDDIT_CLIENT_ID": { - "type": "string", - "form": "password", - "title": "Reddit client ID", - "description": "https://www.reddit.com/prefs/apps", - "default": "REPLACE_ME", - "value": "" - }, - "OPENBB_API_REDDIT_CLIENT_SECRET": { - "type": "string", - "form": "password", - "title": "Reddit client secret", - "description": "https://www.reddit.com/prefs/apps", - "default": "REPLACE_ME", - "value": "" - }, - "OPENBB_API_REDDIT_USERNAME": { - "type": "string", - "form": "password", - "title": "Reddit username", - "description": "https://www.reddit.com/prefs/apps", - "default": "REPLACE_ME", - "value": "" - }, - "OPENBB_API_REDDIT_USER_AGENT": { - "type": "string", - "form": "password", - "title": "Reddit user agent", - "description": "https://www.reddit.com/prefs/apps", - "default": "REPLACE_ME", - "value": "" - }, - "OPENBB_API_REDDIT_PASSWORD": { - "type": "string", - "form": "password", - "title": "Reddit password", - "description": "https://www.reddit.com/prefs/apps", - "default": "REPLACE_ME", - "value": "" - }, - "OPENBB_API_POLYGON_KEY": { - "type": "string", - "form": "password", - "title": "Polygon", - "description": "https://polygon.io", - "default": "REPLACE_ME", - "value": "" - }, - "OPENBB_API_TWITTER_KEY": { - "type": "string", - "form": "password", - "title": "Twitter key", - "description": "https://developer.twitter.com", - "default": "REPLACE_ME", - "value": "" - }, - "OPENBB_API_TWITTER_SECRET_KEY": { - "type": "string", - "form": "password", - "title": "Twitter secret", - "description": "https://developer.twitter.com", - "default": "REPLACE_ME", - "value": "" - }, - "OPENBB_API_TWITTER_BEARER_TOKEN": { - "type": "string", - "form": "password", - "title": "Twitter token", - "description": "https://developer.twitter.com", - "default": "REPLACE_ME", - "value": "" - }, - "OPENBB_API_FRED_KEY": { - "type": "string", - "form": "password", - "title": "FRED", - "description": "https://fred.stlouisfed.org/docs/api/api_key.html", - "default": "REPLACE_ME", - "value": "" - }, - "OPENBB_API_NEWS_TOKEN": { - "type": "string", - "form": "password", - "title": "NewsAPI", - "description": "https://newsapi.org", - "default": "REPLACE_ME", - "value": "" - }, - "OPENBB_RH_USERNAME": { - "type": "string", - "form": "password", - "title": "Robinhood username", - "description": "Robinhood", - "default": "REPLACE_ME", - "value": "" - }, - "OPENBB_RH_PASSWORD": { - "type": "string", - "form": "password", - "title": "Robinhood password", - "description": "Robinhood", - "default": "REPLACE_ME", - "value": "" - }, - "OPENBB_DG_USERNAME": { - "type": "string", - "form": "password", - "title": "Degiro username", - "description": "Degiro", - "default": "REPLACE_ME", - "value": "" - }, - "OPENBB_DG_PASSWORD": { - "type": "string", - "form": "password", - "title": "Degiro password", - "description": "Degiro", - "default": "REPLACE_ME", - "value": "" - }, - "OPENBB_DG_TOTP_SECRET": { - "type": "string", - "form": "password", - "title": "Degiro secret", - "description": "Degiro", - "default": "REPLACE_ME", - "value": "" - }, - "OPENBB_OANDA_ACCOUNT_TYPE": { - "type": "string", - "form": "password", - "title": "Oanda account type", - "description": "https://developer.oanda.com", - "default": "practice", - "value": "" - }, - "OPENBB_OANDA_ACCOUNT": { - "type": "string", - "form": "password", - "title": "Oanda account", - "description": "https://developer.oanda.com", - "default": "REPLACE_ME", - "value": "" - }, - "OPENBB_OANDA_TOKEN": { - "type": "string", - "form": "password", - "title": "Oanda token", - "description": "https://developer.oanda.com", - "default": "REPLACE_ME", - "value": "" - }, - "OPENBB_API_TRADIER_TOKEN": { - "type": "string", - "form": "password", - "title": "Tradier token", - "description": "https://tradier.com/products/market-data-api", - "default": "REPLACE_ME", - "value": "" - }, - "OPENBB_API_CMC_KEY": { - "type": "string", - "form": "password", - "title": "Coinmarketcap key", - "description": "https://coinmarketcap.com/api/", - "default": "REPLACE_ME", - "value": "" - }, - "OPENBB_API_BINANCE_KEY": { - "type": "string", - "form": "password", - "title": "Binance key", - "description": "https://www.binance.com/en/", - "default": "REPLACE_ME", - "value": "" - }, - "OPENBB_API_BINANCE_SECRET": { - "type": "string", - "form": "password", - "title": "Binance secret", - "description": "Binance secret", - "default": "REPLACE_ME", - "value": "" - }, - "OPENBB_API_FINNHUB_KEY": { - "type": "string", - "form": "password", - "title": "Finnhub key", - "description": "https://finnhub.io", - "default": "REPLACE_ME", - "value": "" - }, - "OPENBB_API_IEX_KEY": { - "type": "string", - "form": "password", - "title": "IEX Cloud key", - "description": "https://iexcloud.io", - "default": "REPLACE_ME", - "value": "" - }, - "OPENBB_API_SENTIMENTINVESTOR_KEY": { - "type": "string", - "form": "password", - "title": "Sentimentinvestor key", - "description": "https://www.sentimentinvestor.com", - "default": "REPLACE_ME", - "value": "" - }, - "OPENBB_API_SENTIMENTINVESTOR_TOKEN": { - "type": "string", - "form": "password", - "title": "Sentimentinvestor token", - "description": "https://www.sentimentinvestor.com", - "default": "REPLACE_ME", - "value": "" - } - } - } - } -} diff --git a/docker/openbbterminal-deps.dockerfile b/docker/openbbterminal-deps.dockerfile deleted file mode 100644 index fabbbe09077..00000000000 --- a/docker/openbbterminal-deps.dockerfile +++ /dev/null @@ -1,9 +0,0 @@ -ARG OPENBBTERMINAL_DOCKER_IMAGE_PREFIX="ghcr.io/openbb-finance" -ARG OPENBBTERMINAL_DOCKER_PYTHON_VERSION="1.0.0" -FROM ${OPENBBTERMINAL_DOCKER_IMAGE_PREFIX}/openbbterminal-python:${OPENBBTERMINAL_DOCKER_PYTHON_VERSION} - -LABEL org.opencontainers.image.source https://github.com/OpenBB-finance/OpenBBTerminal - -COPY --chown=python:python requirements.txt /home/python/ - -RUN pip install -r requirements.txt diff --git a/docker/openbbterminal-poetry-full-deps.dockerfile b/docker/openbbterminal-poetry-full-deps.dockerfile deleted file mode 100644 index 30866506605..00000000000 --- a/docker/openbbterminal-poetry-full-deps.dockerfile +++ /dev/null @@ -1,8 +0,0 @@ -ARG OPENBBTERMINAL_DOCKER_IMAGE_PREFIX="ghcr.io/openbb-finance" -ARG OPENBBTERMINAL_DOCKER_POETRY_DEPS_VERSION="1.2.0" -FROM ${OPENBBTERMINAL_DOCKER_IMAGE_PREFIX}/openbbterminal-poetry-deps:${OPENBBTERMINAL_DOCKER_POETRY_DEPS_VERSION} - -LABEL org.opencontainers.image.source https://github.com/OpenBB-finance/OpenBBTerminal - -RUN cd /home/python/openbb_terminal && \ - poetry install -E prediction diff --git a/docker/openbbterminal-poetry-full.dockerfile b/docker/openbbterminal-poetry-full.dockerfile deleted file mode 100644 index 8d79418a248..00000000000 --- a/docker/openbbterminal-poetry-full.dockerfile +++ /dev/null @@ -1,9 +0,0 @@ -ARG OPENBBTERMINAL_DOCKER_IMAGE_PREFIX="ghcr.io/openbb-finance" -ARG OPENBBTERMINAL_DOCKER_POETRY_FULL_DEPS_VERSION="1.2.0" -FROM ${OPENBBTERMINAL_DOCKER_IMAGE_PREFIX}/openbbterminal-poetry-full-deps:${OPENBBTERMINAL_DOCKER_POETRY_FULL_DEPS_VERSION} - -LABEL org.opencontainers.image.source https://github.com/OpenBB-finance/OpenBBTerminal - -COPY --chown=python:python . . - -CMD ["bash", "docker/entry-point-poetry.sh"] diff --git a/docker/openbbterminal-poetry-jupyter.dockerfile b/docker/openbbterminal-poetry-jupyter.dockerfile deleted file mode 100644 index aa2c6e583a3..00000000000 --- a/docker/openbbterminal-poetry-jupyter.dockerfile +++ /dev/null @@ -1,14 +0,0 @@ -ARG OPENBBTERMINAL_DOCKER_IMAGE_PREFIX="ghcr.io/openbb-finance" -ARG OPENBBTERMINAL_DOCKER_POETRY_FULL_DEPS_VERSION="1.2.0" -FROM ${OPENBBTERMINAL_DOCKER_IMAGE_PREFIX}/openbbterminal-poetry-full-deps:${OPENBBTERMINAL_DOCKER_POETRY_FULL_DEPS_VERSION} - -LABEL org.opencontainers.image.source https://github.com/OpenBB-finance/OpenBBTerminal - -EXPOSE 8888 - -COPY --chown=python:python . . - -RUN cp docker/lab-settings.json jupyterlab/openbb-settings/schema/settings.json && \ - bash -x docker/extension.sh - -CMD ["bash", "docker/entry-point-poetry-jupyter.sh"] diff --git a/docker/openbbterminal.dockerfile b/docker/openbbterminal.dockerfile deleted file mode 100644 index e016db26a26..00000000000 --- a/docker/openbbterminal.dockerfile +++ /dev/null @@ -1,7 +0,0 @@ -ARG OPENBBTERMINAL_DOCKER_IMAGE_PREFIX="ghcr.io/openbb-finance" -ARG OPENBBTERMINAL_DOCKER_DEPS_VERSION="1.2.0" -FROM ${OPENBBTERMINAL_DOCKER_IMAGE_PREFIX}/openbbterminal-deps:${OPENBBTERMINAL_DOCKER_DEPS_VERSION} - -COPY --chown=python:python . . - -CMD ["bash", "docker/entry-point.sh"] diff --git a/docker/setenv b/docker/setenv deleted file mode 100644 index 6d2c1d498dd..00000000000 --- a/docker/setenv +++ /dev/null @@ -1,33 +0,0 @@ -DISPLAY= - -OPENBB_API_KEY_FINANCIALMODELINGPREP= -OPENBB_API_KEY_ALPHAVANTAGE= -OPENBB_API_KEY_QUANDL= -OPENBB_API_REDDIT_CLIENT_ID= -OPENBB_API_REDDIT_CLIENT_SECRET= -OPENBB_API_REDDIT_USERNAME= -OPENBB_API_REDDIT_USER_AGENT=Python -OPENBB_API_REDDIT_PASSWORD= -OPENBB_API_TWITTER_KEY= -OPENBB_API_TWITTER_SECRET_KEY= -OPENBB_API_TWITTER_BEARER_TOKEN= -OPENBB_API_POLYGON_KEY= -OPENBB_API_FRED_KEY= -OPENBB_API_NEWS_TOKEN= -OPENBB_API_TRADIER_TOKEN= -OPENBB_API_CMC_KEY= -OPENBB_API_BINANCE_KEY= -OPENBB_API_BINANCE_SECRET= -OPENBB_API_FINNHUB_KEY= -OPENBB_API_IEX_KEY= -OPENBB_API_SENTIMENTINVESTOR_TOKEN= -OPENBB_API_COINBASE_KEY= -OPENBB_API_COINBASE_SECRET= -OPENBB_API_COINBASE_PASS_PHRASE= - -HDF5_DISABLE_VERSION_CHECK=2 - -OPENBB_ENABLE_PREDICT=True -OPENBB_ENABLE_THOUGHTS_DAY=False -OPENBB_USE_PROMPT_TOOLKIT=True -OPENBB_USE_ION=True diff --git a/openbb_terminal/README.md b/openbb_terminal/README.md index 07c4ac14dd4..538dec83927 100644 --- a/openbb_terminal/README.md +++ b/openbb_terminal/README.md @@ -275,15 +275,18 @@ git stash pop 3. Run a container - You are now ready to run the terminal (every time you want to use the terminal you need to run this command): + To launch the container you need to run the following command: - `docker run -it --rm ghcr.io/openbb-finance/openbbterminal-poetry:latest` + `docker run -v ~/.openbb_terminal/:/home/python/.openbb_terminal -v ~/OpenBBUserData:/home/python/OpenBBUserData -it --rm ghcr.io/openbb-finance/openbbterminal-poetry:1.6.0` - This will open up the terminal in your command prompt or terminal. Note that this has provided now environment file, - so you will not be able to view plots or use keys at this stage. + **NOTE FOR WINDOWS** - At this point, you should be able to use the majority of the features using Docker. To read more on adding the - environment keys and how to configure your X-server to show plots, hop over to the + Replace `~` by `%USERPROFILE%` in the command above. + This applies if you are using the builtin Windows interpreter. + You won't have to do this inside Powershell or more evolved interpreters. + + At this point, you should be able to use the majority of the features using Docker. To read more on how to configure + your X-server to show plots, hop over to the [Advanced Docker Setup](/DOCKER_ADVANCED.md). ## Web UI - Docker