TA-Lib / ta-lib-python

Python wrapper for TA-Lib (http://ta-lib.org/).
http://ta-lib.github.io/ta-lib-python
Other
9.79k stars 1.78k forks source link

Additional Files Needed for TA-Lib Dockerfile Setup #677

Closed BouarfaMahi closed 2 months ago

BouarfaMahi commented 2 months ago

hey,

I would like to use the TA-Lib Dockerfile as a container within a Docker Compose setup. Could you please let me know which additional relevant files from the TA-Lib directory I would need to include to complete the setup?

thank you

mrjbq7 commented 2 months ago

Like this dockerfile?

https://github.com/TA-Lib/ta-lib-python/blob/master/Dockerfile

I would assume instead it would download the C library and install the python ta-lib using pip…

BouarfaMahi commented 2 months ago

Yes i have use it in a docker compose and the docker stack doest not complete with this error message:

=> ERROR [talib builder 6/7] RUN python -m pip install -e . && 1.6s

[talib builder 6/7] RUN python -m pip install -e . && python -c 'import numpy, talib; close = numpy.random.random(100); output = talib.SMA(close); print(output)' && python -m pip wheel --wheel-dir wheels .: 1.348 Obtaining file:///src/ta-lib-python 1.349 ERROR: file:///src/ta-lib-python does not appear to be a Python project: neither 'setup.py' nor 'pyproject.toml' found. 1.521 1.521 [notice] A new release of pip is available: 23.0.1 -> 24.0 1.521 [notice] To update, run: pip install --upgrade pip

failed to solve: process "/bin/sh -c python -m pip install -e . && python -c 'import numpy, talib; close = numpy.random.random(100); output = talib.SMA(close); print(output)' && python -m pip wheel --wheel-dir wheels ." did not complete successfully: exit code: 1

mrjbq7 commented 2 months ago

Right, you probably want it to not use that src directory unless you are trying to bundle the git repo, and just have a pip install ta-lib step.

BouarfaMahi commented 2 months ago

After updating my Docker Compose with:

` talib: build: context: ./talib dockerfile: Dockerfile ports: [] volumes:

` I created a talib directory and cloned the ta-lib-python repository. Now the Docker stack completes successfully without any issues.

Thank you