222
This commit is contained in:
parent
9638f6b6fc
commit
b8e9223eb0
50
Dockerfile
50
Dockerfile
@ -1,29 +1,39 @@
|
|||||||
FROM wuuker/python-ta-lib
|
FROM python:3.8-slim
|
||||||
ENV PYTHONIOENCODING=utf-8
|
ENV PYTHONIOENCODING=utf-8
|
||||||
ENV TIME_ZONE Asia/Shanghai
|
ENV TIME_ZONE Asia/Shanghai
|
||||||
|
|
||||||
# # 更新apt-get源
|
# 更新apt-get源
|
||||||
# RUN cp /etc/apt/sources.list /etc/apt/sources.list.bak && \
|
RUN cp /etc/apt/sources.list /etc/apt/sources.list.bak && \
|
||||||
# echo > /etc/apt/sources.list && \
|
echo > /etc/apt/sources.list && \
|
||||||
# cat /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 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-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/ 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
|
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 update && apt-get upgrade -y
|
||||||
# RUN apt-get install -y --no-install-recommends build-essential gcc wget
|
|
||||||
|
|
||||||
# # TA-Lib
|
ENV APT_PKG_TEMPORARY="build-essential autoconf automake autotools-dev libopenblas-dev python3-dev"
|
||||||
# RUN wget http://prdownloads.sourceforge.net/ta-lib/ta-lib-0.4.0-src.tar.gz && \
|
ENV APT_PKG="python3 python3-pip python3-scipy python3-numpy python3-pandas python-is-python3"
|
||||||
# tar -xvzf ta-lib-0.4.0-src.tar.gz && \
|
ENV PYPI_PKG="TA-Lib numpy pandas"
|
||||||
# cd ta-lib/ && \
|
ENV DEBIAN_FRONTEND=noninteractive
|
||||||
# ./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
|
COPY ta-lib ./ta-lib
|
||||||
# RUN rm -R ta-lib ta-lib-0.4.0-src.tar.gz
|
|
||||||
|
RUN apt-get update && apt-get upgrade -y && \
|
||||||
|
apt-get install -y ${APT_PKG_TEMPORARY} ${APT_PKG} && \
|
||||||
|
ln -s /usr/include/locale.h /usr/include/xlocale.h && \
|
||||||
|
# compile TA-Lib library
|
||||||
|
cd ta-lib && \
|
||||||
|
./configure --prefix=/usr; \
|
||||||
|
make && \
|
||||||
|
make install && \
|
||||||
|
cd .. && \
|
||||||
|
rm -rf ta-lib && \
|
||||||
|
\
|
||||||
|
pip3 install --no-cache-dir $PYPI_PKG && \
|
||||||
|
apt-get autoremove -y ${APT_PKG_TEMPORARY} && \
|
||||||
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
# 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
|
||||||
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 requests schedule
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user