Files
OpenBB/build/docker/openbb.dockerfile
teh_coderer 7972098ce7 hotfix/PyWry Linux Wheels-Import Error Handing (#4561)
* init

* Update openbb.dockerfile

* fixing linting

* req files CLI update

* bump pywry

* new width/weight env vars for pywry specifically

* Update backend.py

* req files

* Update backend.py

* last bump pywry 0.4.0

* Update dashboards_controller.py

---------

Co-authored-by: andrewkenreich <andrew.kenreich@gmail.com>
Co-authored-by: James Maslek <jmaslek11@gmail.com>
2023-03-23 20:22:05 +00:00

76 lines
1.6 KiB
Docker
Vendored

# SETUP PYTHON IMAGE
FROM --platform=linux/amd64 python:3.10-slim-bullseye as python
LABEL org.opencontainers.image.source https://github.com/OpenBB-finance/OpenBBTerminal
# SETUP DEBIAN IMAGE
FROM python as debian
RUN apt-get update
RUN apt-get -y install --no-install-recommends \
gcc \
g++ \
make
RUN apt-get -y install --no-install-recommends \
git
RUN apt-get -y install --no-install-recommends \
curl \
wget
RUN apt-get -y install --no-install-recommends \
libsm6 \
libxt6 \
libgl1-mesa-glx \
libpng16-16 \
libwebkit2gtk-4.0-dev \
build-essential \
libssl-dev \
librsvg2-dev \
ffmpeg \
python3-tk
RUN apt-get clean
RUN useradd --create-home --shell /bin/bash python
USER python
WORKDIR /home/python
# SETUP POETRY IMAGE
FROM debian as poetry
ENV PATH="/home/python/.local/bin:${PATH}"
RUN pip install --upgrade pip wheel
RUN pip install poetry==1.3.2
# SETUP OPENBB IMAGE
FROM poetry as repository
COPY --chown=python:python pyproject.toml poetry.lock terminal.py ./
RUN mkdir openbb_terminal
COPY --chown=python:python openbb_terminal openbb_terminal
RUN mkdir -p website/content/sdk
COPY --chown=python:python ./website/content/sdk/installation.md ./website/content/sdk
RUN mkdir OpenBBUserData
RUN chown python:python OpenBBUserData
RUN mkdir .openbb_terminal
RUN chown python:python .openbb_terminal
# SETUP OPENBB IMAGE
FROM repository as dependencies
RUN poetry install --no-root --no-dev --extras optimization --extras forecast
# SETUP OPENBB IMAGE
FROM dependencies as openbb
CMD ["poetry", "run", "python", "terminal.py"]