* Re-solve the dependencies for optimization extras * Remove unused reportlab helpers * Update install from source and troubleshooting docs * Fix typos found by cspell * Prevent po menu from launching when optimization toolkit not installed * Add optimization dependencies to default requirements.txt for the CI * Add optimization toolkit installation to the CI * Fix markdown linting * Update CI test dependency installation for matrix tests * Fix markdown linting * Update source installation docs * Clean up ToC in the main readme * Update the SDK documentation * Fix markdown linting after making readme sections linkable * Fix more markdown linting * Fix more markdown linting * Update secrets detection with exclusion rules * Bump detect-secrets configuration * Tune secret detector * Fix more markdown linting * Add optimization toolkit install to installer GH actions * Add optimization toolkit install to docker build * Fix typos * Add "all" extras setting to install torch and riskfolio * Move forecasting dependencies to pyproject.toml * Update CI build configs * Update documentation to feature the "all" extra * Lint markdown * Update docs to specify requirement of having a C compiler * Added log Id to codesigning steps in inteel Macos workflow * Changed disk for the m1 macos build * Changed disk for the m1 macos build * Changed disk for the intel macos build * taking out sigtool removal line * Remove dev version number from pyproject.toml * removing sigtool from all build steps * changes to m1 build and commenting test_report_economy * more m1 build changes * testing exit on conda setup * some more * changing shell to bash to setup conda * bash on lines * bash on all lines * small bash removals * intel fix and test_crypto int test * upgrading setupminiconda version * adding back in intel conda init and reset * intel removal of init * taking bash back out from m1 * removing old codesign lines * adding codesign specific binaries * ssl fix for all terminal * removing if installer * various ssl fixes across commands * fixing ssl mistake * integration test changes * Linting + remove comment * Update poetry.lock * Update requirements * Update the docs to mention that PO is not working on arm arch * Update deps to pin setuptools * Disable reports on pyinstaller packaged version * Update reports * small grammar change for forecast report message * Pin grpcio following introduced regression in 1.51.0 * Update docs to reflect changes in how optimization is installed Co-authored-by: Luqman Bello <lb@Luqmans-MacBook-Pro.local> Co-authored-by: James Simmons <simmonsj330@gmail.com> Co-authored-by: James Simmons <53658028+simmonsj330@users.noreply.github.com> Co-authored-by: James Maslek <jmaslek11@gmail.com> Co-authored-by: Chavithra <chavithra@gmail.com>
OpenBBTerminal Docker
These files create our docker images. To use docker read this.
Building the Docker Image
Building the Docker image can be done easily. The following steps allow users to create a docker image on their local machine:
- Enter the OpenBB directory
cd ~/OpenbbTerminal - Open
docker/compose.envand setOPENBBTERMINAL_DOCKER_RELEASE_VERSIONto the desired version - Load the environment variables
bash compose/env - Run the build script
bash docker/build.sh
Important Notes
-
The
build.shscript requires bash 5.0 or newer. -
We currently build without developer dependnencies such as pytest. If you want to develop using this image please open
poetry.dockerfileand replaceRUN poetry install --no-devwithRUN poetry install -
If you have issues building on MacOs run the following commands:
export DOCKER_BUILDKIT=0export COMPOSE_DOCKER_CLI_BUILD=0
Testing the Docker Image
Integration and unit tests can be run on the new docker image. Before running either set of tests you need to start up an image with:
docker run -it --rm ghcr.io/[BUILD_NAME]
Leave the terminal open and then navigate docker desktop. Find the currently running image and
select open in terminal. Now:
- For integration tests run:
poetry run python terminal.py scripts -t - For unit tests run
poetry run pytest tests/
Setup Explanation
The compose.env file is responsible for loading in the correct environment variables before a
session begins. Once this is done the build.sh file creates a docker image with the appropriate
tag. The poetry.dockerfile is the file used to create the image. It has enhanced caching by
building in three stages. The stages are described below.
- python: this stage creates a new
python:3.9-slim-bullseyeimage. Slim-buster is a small linux distro that comes with a lot of the functionality we need. We then set environment variables. This image will only be reran when there is a new version ofpython:3.9-slim-bullseyeor when the environment variables are updated (there is almost never a reason to update them). - poetry-deps: this stage installs necessary apt packages like curl and git, and then installs
poetry. This will be reran whenever dependencies change, or whenever
pythonhas been rerun. - poetry: this takes the build from
poetry-depsand then copies the terminal files into it. Then this image runs the terminal. This image will be rebuilt every time files are changed in the terminal or whenpoetry-depshas been rerun, however; this is not an issue because it builds quickly.