111
This commit is contained in:
parent
5cbed6718d
commit
9638f6b6fc
44
Dockerfile
44
Dockerfile
@ -1,31 +1,33 @@
|
||||
FROM python:3.8-slim
|
||||
FROM wuuker/python-ta-lib
|
||||
ENV PYTHONIOENCODING=utf-8
|
||||
ENV TIME_ZONE Asia/Shanghai
|
||||
|
||||
# 更新apt-get源
|
||||
RUN cp /etc/apt/sources.list /etc/apt/sources.list.bak && \
|
||||
echo > /etc/apt/sources.list && \
|
||||
cat /etc/apt/sources.list && \
|
||||
echo "deb http://mirrors.tuna.tsinghua.edu.cn/debian/ buster main contrib non-free" >/etc/apt/sources.list && \
|
||||
echo "deb http://mirrors.tuna.tsinghua.edu.cn/debian/ buster-updates main contrib non-free" >>/etc/apt/sources.list && \
|
||||
echo "deb http://mirrors.tuna.tsinghua.edu.cn/debian/ buster-backports main contrib non-free" >>/etc/apt/sources.list && \
|
||||
echo "deb http://mirrors.tuna.tsinghua.edu.cn/debian-security buster/updates main contrib non-free" >>/etc/apt/sources.list
|
||||
# # 更新apt-get源
|
||||
# RUN cp /etc/apt/sources.list /etc/apt/sources.list.bak && \
|
||||
# echo > /etc/apt/sources.list && \
|
||||
# cat /etc/apt/sources.list && \
|
||||
# echo "deb http://mirrors.tuna.tsinghua.edu.cn/debian/ buster main contrib non-free" >/etc/apt/sources.list && \
|
||||
# echo "deb http://mirrors.tuna.tsinghua.edu.cn/debian/ buster-updates main contrib non-free" >>/etc/apt/sources.list && \
|
||||
# echo "deb http://mirrors.tuna.tsinghua.edu.cn/debian/ buster-backports main contrib non-free" >>/etc/apt/sources.list && \
|
||||
# echo "deb http://mirrors.tuna.tsinghua.edu.cn/debian-security buster/updates main contrib non-free" >>/etc/apt/sources.list
|
||||
|
||||
RUN apt-get update && apt-get upgrade -y
|
||||
RUN apt-get install -y --no-install-recommends build-essential gcc wget
|
||||
# RUN apt-get update && apt-get upgrade -y
|
||||
# RUN apt-get install -y --no-install-recommends build-essential gcc wget
|
||||
|
||||
# TA-Lib
|
||||
RUN wget http://prdownloads.sourceforge.net/ta-lib/ta-lib-0.4.0-src.tar.gz && \
|
||||
tar -xvzf ta-lib-0.4.0-src.tar.gz && \
|
||||
cd ta-lib/ && \
|
||||
./configure --prefix=/opt/venv && \
|
||||
make && \
|
||||
make install
|
||||
# # TA-Lib
|
||||
# RUN wget http://prdownloads.sourceforge.net/ta-lib/ta-lib-0.4.0-src.tar.gz && \
|
||||
# tar -xvzf ta-lib-0.4.0-src.tar.gz && \
|
||||
# cd ta-lib/ && \
|
||||
# ./configure --prefix=/opt/venv && \
|
||||
# make && \
|
||||
# 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 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 requests schedule
|
||||
|
||||
RUN pip3 install -i https://mirrors.aliyun.com/pypi/simple/ binance binance_connector numpy requests schedule TA_Lib
|
||||
WORKDIR /opt/
|
||||
COPY ["./", "/opt/"]
|
||||
CMD python3 -u main.py
|
||||
Loading…
Reference in New Issue
Block a user