From c9d504569776ad425229d79537ca2180c315d673 Mon Sep 17 00:00:00 2001 From: 51bitquant Date: Wed, 12 Jul 2023 22:37:16 +0930 Subject: [PATCH] docker --- docker/Dockerfile | 32 ++++++++++++++++++++++++++++++++ requirements.txt | 36 +++++++++++++++++------------------- 2 files changed, 49 insertions(+), 19 deletions(-) create mode 100644 docker/Dockerfile diff --git a/docker/Dockerfile b/docker/Dockerfile new file mode 100644 index 0000000..86a7b2b --- /dev/null +++ b/docker/Dockerfile @@ -0,0 +1,32 @@ +FROM python:3.11 + +LABEL authors="51bitquant" + +RUN apt-get update && apt-get install -y \ + build-essential \ + wget \ + && rm -rf /var/lib/apt/lists/* + +# Download and install TA-Lib +WORKDIR /tmp +RUN wget http://prdownloads.sourceforge.net/ta-lib/ta-lib-0.4.0-src.tar.gz \ + && tar -xzf ta-lib-0.4.0-src.tar.gz \ + && cd ta-lib \ + && ./configure --prefix=/usr \ + && make \ + && make install \ + && cd .. \ + && rm -rf ta-lib ta-lib-0.4.0-src.tar.gz + +# working directory +WORKDIR /app +COPY . /app + +# Install Python packages +RUN pip install -r requirements.txt +RUN pip install TA-Lib==0.4.26 +RUN pip install git+https://github.com/51bitquant/howtrader + +# port for signal from Tradingview. +EXPOSE 9999 +CMD [ "python", "-u", "main.py"] \ No newline at end of file diff --git a/requirements.txt b/requirements.txt index 78014bf..a667b7b 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,20 +1,18 @@ -simplejson -requests -aiohttp -flask -pytz -peewee -pymongo -tzlocal -PySide6==6.2.2 -pyqtgraph==0.12.3 -qdarkstyle -numpy==1.23.0 -pandas -matplotlib -seaborn -deap -plotly -importlib-metadata -backports.zoneinfo; python_version < '3.9' +simplejson==3.19.1 +requests==2.31.0 +Flask==2.3.2 +pytz==2023.3 +peewee==3.16.2 +pymongo==4.3.3 +tzlocal==5.0.1 +PySide6==6.5.1.1 +pyqtgraph==0.13.3 +QDarkStyle==3.1 +numpy==1.24.3 +pandas==2.0.2 +matplotlib==3.7.1 +seaborn==0.12.2 +deap==1.3.3 +plotly==5.14.1 +importlib-metadata==6.6.0