This commit is contained in:
aazhou 2023-06-08 23:30:08 +08:00
parent 253d2c95df
commit 224b4da32c

View File

@ -1,26 +1,20 @@
FROM python:3.8-slim FROM python:3.8-slim
ENV PYTHONIOENCODING=utf-8 ENV PYTHONIOENCODING=utf-8
ENV TIME_ZONE Asia/Shanghai ENV TIME_ZONE Asia/Shanghai
RUN sudo apt-get update
RUN apt-get -y install gcc build-essential
RUN wget -O inst_conda.sh "https://repo.anaconda.com/archive/Anaconda3-2020.11-Linux-x86_64.sh" \
&& /bin/bash inst_conda.sh -b \
&& rm inst_conda.sh \
&& ./anaconda3/bin/conda init \
&& source ~/.bashrc \
&& conda create -n quantra python=3.6.8 -y \
&& conda activate quantra
RUN wget http://prdownloads.sourceforge.net/ta-lib/ta-lib-0.4.0-src.tar.gz \ RUN apt-get update
&& sudo tar -xzf ta-lib-0.4.0-src.tar.gz \ RUN apt-get install -y --no-install-recommends build-essential gcc wget
&& sudo rm ta-lib-0.4.0-src.tar.gz \
&& cd ta-lib/ \ # TA-Lib
&& sudo ./configure --prefix=/usr \ RUN wget http://prdownloads.sourceforge.net/ta-lib/ta-lib-0.4.0-src.tar.gz && \
&& sudo make \ tar -xvzf ta-lib-0.4.0-src.tar.gz && \
&& sudo make install \ cd ta-lib/ && \
&& cd ~ \ ./configure --prefix=/opt/venv && \
&& sudo rm -rf ta-lib/ \ make && \
&& pip install ta-lib make install
RUN pip install --global-option=build_ext --global-option="-L/opt/venv/lib" TA-Lib==0.4.16
RUN rm -R ta-lib ta-lib-0.4.0-src.tar.gz
RUN pip3 install -i https://mirrors.aliyun.com/pypi/simple/ binance binance_connector numpy requests schedule TA_Lib RUN pip3 install -i https://mirrors.aliyun.com/pypi/simple/ binance binance_connector numpy requests schedule TA_Lib
WORKDIR /opt/ WORKDIR /opt/