简体   繁体   中英

Install talib on docker

FROM python:3
USER root

RUN apt-get update
RUN apt-get -y install locales && \
    localedef -f UTF-8 -i ja_JP ja_JP.UTF-8

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=/usr && \
  make && \
  make install
RUN pip install TA-Lib
RUN rm -R ta-lib ta-lib-0.4.0-src.tar.gz

ENV LANG ja_JP.UTF-8
ENV LANGUAGE ja_JP:ja
ENV LC_ALL ja_JP.UTF-8
ENV TZ JST-9
ENV TERM xterm

ADD . /code
WORKDIR /code

RUN apt-get install -y vim less
RUN pip install --upgrade pip
RUN pip install --upgrade setuptools
RUN pip install -r requirements.txt
version: "3"
services:
  python3:
    restart: always
    build: .
    container_name: "binancepython3"
    working_dir: /root/
    tty: true
    volumes:
      - ./opt:/root/opt
pandas
requests
ccxt == 1.81.77

I'm trying to install talib on docker, but I got an error like below, could you teach me how to solve it?

Is the problem caused by the environment? Should I use anaconda instead of python:3?

#7 3.276 configure: error: cannot guess build type; you must specify one
------
executor failed running [/bin/sh -c 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=/usr &&   make &&   make install]: exit code: 1
ERROR: Service 'python3' failed to build : Build failed

add:

./configure --build=aarch64-unknown-linux-gnu

more info: https://stackoverflow.com/a/68025766/1145929

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM