From e4619a95d2f864309f4f44e3db9885b6057577e9 Mon Sep 17 00:00:00 2001 From: Ojietohamen Samuel Date: Sat, 3 Aug 2024 15:12:27 +0100 Subject: [PATCH] update docker base image and project dependencies --- Dockerfile | 25 ++----------------------- Makefile | 4 ++-- README.md | 4 ++-- pyproject.toml | 2 +- requirements.txt | 4 ++-- 5 files changed, 9 insertions(+), 30 deletions(-) diff --git a/Dockerfile b/Dockerfile index c689903..213c13b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,4 @@ -FROM rust:slim-buster - -ENV USER=root -ENV PYTHON_VERSION=3.11.3 +FROM ghcr.io/nautechsystems/nautilus_trader:latest # Install system dependencies RUN apt-get update && \ @@ -9,30 +6,11 @@ RUN apt-get update && \ sudo \ build-essential \ clang \ - zlib1g-dev \ - libncurses5-dev \ - libgdbm-dev \ - libnss3-dev \ - libssl-dev \ - libreadline-dev \ - libffi-dev \ - libsqlite3-dev \ wget \ curl \ libbz2-dev \ && rm -rf /var/lib/apt/lists/* -WORKDIR /tmp -RUN wget https://www.python.org/ftp/python/$PYTHON_VERSION/Python-$PYTHON_VERSION.tgz \ - && tar -xzf Python-$PYTHON_VERSION.tgz \ - && cd Python-$PYTHON_VERSION \ - && ./configure --enable-optimizations \ - && make -j $(nproc) \ - && make altinstall - -# ENV PATH="/usr/local/bin:$PATH" -RUN ln -s /usr/local/bin/python3.11 /usr/local/bin/python - # Set the working directory WORKDIR /app @@ -42,6 +20,7 @@ COPY . . # Install application system dependencies (e.g., TA-Lib) RUN bash scripts/install-talib.sh # RUN bash scripts/install-pygame.sh +RUN curl -sSL https://install.python-poetry.org | python - # Install package RUN python -m pip install -e . diff --git a/Makefile b/Makefile index 7882824..bde332d 100644 --- a/Makefile +++ b/Makefile @@ -4,8 +4,8 @@ build: docker build -f Dockerfile -t trade_flow . run: - docker run -it trade_flow trade_flow-platform + docker run -it trade_flow trade_flow-environment shell: - docker exec -it trade_flow sh + docker exec -it trade_flow-environment sh \ No newline at end of file diff --git a/README.md b/README.md index cabbdba..b31b169 100644 --- a/README.md +++ b/README.md @@ -12,9 +12,9 @@ TradeFlow is an intelligent trading bot designed to streamline your trading expe 1. **Prerequisites:** -- Python (<= 3.11.9) +- Python (>=3.10) - ta-lib, nautilus_trader -- pandas, tensorflow, ray +- pandas, pytorch, ray - flask, metatrader-sockets-client 1. **Clone the Repository:** diff --git a/pyproject.toml b/pyproject.toml index ca91e19..37216bf 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,7 +3,7 @@ name = "trade_flow" version = "0.0.1" description = "TradeFlow is an intelligent trading bot that leverages automation and analysis to navigate markets for you" readme = "README.md" -requires-python = "<=3.11.9" +requires-python = ">=3.10" keywords = ["algo", "trading", "trade_flow", "deep learning", "machine learning", "ai"] classifiers = [ "Programming Language :: Python :: 3", diff --git a/requirements.txt b/requirements.txt index e137cb4..1e64069 100644 --- a/requirements.txt +++ b/requirements.txt @@ -10,7 +10,7 @@ ta-lib # Python wrapper for TA-lib (native) library pandas_ta # Algorithms -scikit-learn==1.5 +scikit-learn # ==1.5 lightgbm>=4 # tensorflow==2.14.1 # tensorflow>=2.16.* # gymnasium # gymnasium[all] | gymnasium==0.26.1 @@ -19,7 +19,7 @@ lightgbm>=4 # keras # keras-tcn # gym-anytrading -stable-baselines3[extra] +stable-baselines3 # stable-baselines3[extra] ray[all] # ==2.5.1 seaborn # if diagrams are turned on