Files
OpenBB/docker/poetry.dockerfile
Theodore Aptekarev 15d1870194 Reorganize project extras for a pip installable package (#3432)
* 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>
2022-11-22 12:33:59 -05:00

73 lines
2.0 KiB
Docker
Vendored

###############################################
# Base Image openbb poetry build
###############################################
FROM --platform=linux/amd64 python:3.9-slim-bullseye as python
LABEL org.opencontainers.image.source https://github.com/OpenBB-finance/OpenBBTerminal
# PIP_DEFAULT_TIMEOUT: Set the default timeout for pip
ENV PIP_DEFAULT_TIMEOUT=100 \
POETRY_VERSION=1.1.15 \
POETRY_HOME="/opt/poetry" \
POETRY_VIRTUALENVS_IN_PROJECT=true \
POETRY_NO_INTERACTION=1 \
PYSETUP_PATH="/opt" \
VENV_PATH="/opt/.venv"
# prepend poetry and venv to path
ENV PATH="$POETRY_HOME/bin:$VENV_PATH/bin:$PATH"
###############################################
# Builder Image openbb poetry build
###############################################
FROM python as poetry-deps
RUN apt-get update
RUN apt-get install --no-install-recommends -y \
curl \
build-essential \
unzip \
git
RUN curl -sL https://deb.nodesource.com/setup_16.x -o nodesource_setup.sh
RUN bash nodesource_setup.sh
RUN apt-get install -y nodejs
RUN apt-get -y autoremove
RUN apt-get clean
RUN rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
# install poetry - respects $POETRY_VERSION & $POETRY_HOME
RUN curl -sSL https://install.python-poetry.org | python3 -
# copy project requirement files here to ensure they will be cached.
WORKDIR $PYSETUP_PATH
# Copy poetry files and install git
COPY pyproject.toml README.md poetry.lock ./
RUN mkdir $PYSETUP_PATH/openbb_terminal
RUN touch openbb_terminal/__init__.py
# install runtime deps - uses $POETRY_VIRTUALENVS_IN_PROJECT internally
RUN poetry install
RUN poetry install -E optimization
###############################################
# Production Image openbb poetry build
###############################################
FROM python as poetry
COPY --from=poetry-deps $PYSETUP_PATH $PYSETUP_PATH
WORKDIR $PYSETUP_PATH
COPY . .
RUN pip install "u8darts[torch]"
RUN echo "OPENBB_LOGGING_APP_NAME=gst_docker" > .env
CMD ["python", "terminal.py"]