Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ARM build #449

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ FROM python:3.9-slim AS jesse_basic_env
ENV PYTHONUNBUFFERED 1

RUN apt-get update \
&& apt-get -y install git build-essential libssl-dev \
&& apt-get -y install git build-essential libssl-dev wget \
&& apt-get clean \
&& pip install --upgrade pip

Expand Down
46 changes: 40 additions & 6 deletions docker_build_helpers/install_ta-lib.sh
Original file line number Diff line number Diff line change
@@ -1,17 +1,51 @@
#!/bin/bash

if [ -z "$1" ]; then
INSTALL_LOC=/usr/local
else
INSTALL_LOC=${1}
fi
echo "Installing to ${INSTALL_LOC}"

if [ ! -f "${INSTALL_LOC}/lib/libta_lib.a" ]; then
# Download and extract ta-lib source
tar zxvf ta-lib-0.4.0-src.tar.gz
cd ta-lib \
&& sed -i.bak "s|0.00000001|0.000000000000000001 |g" src/ta_func/ta_utility.h \
&& ./configure --prefix=${INSTALL_LOC}/ \
&& make \
&& which sudo && sudo make install || make install \
&& echo "export LD_LIBRARY_PATH=/usr/local/lib" >> /root/.bashrc
cd ta-lib

# Update config.guess and config.sub
echo "Downloading updated config.guess and config.sub from savannah.gnu.org"
wget -O config.guess 'http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess'
wget -O config.sub 'http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub'

# Apply patch and configure
sed -i.bak "s|0.00000001|0.000000000000000001 |g" src/ta_func/ta_utility.h
./configure --prefix=${INSTALL_LOC}/

# Build and install
make
if which sudo; then
sudo make install
else
make install
fi

# Update library path
echo "export LD_LIBRARY_PATH=/usr/local/lib" >> /root/.bashrc

# Verify installation
if [ -f "${INSTALL_LOC}/include/ta-lib/ta_defs.h" ]; then
echo "TA-Lib headers installed successfully."
else
echo "Error: TA-Lib headers not found."
exit 1
fi

if [ -f "${INSTALL_LOC}/lib/libta_lib.a" ]; then
echo "TA-Lib library installed successfully."
else
echo "Error: TA-Lib library not found."
exit 1
fi
else
echo "TA-lib already installed, skipping installation"
fi
Loading