2025-01-16 00:49:43 +01:00
|
|
|
ARG BUILD_FROM=ghcr.io/hassio-addons/base:17.1.0
|
|
|
|
# hadolint ignore=DL3006
|
|
|
|
FROM ${BUILD_FROM}
|
|
|
|
|
|
|
|
ENV LANG C.UTF-8
|
|
|
|
|
|
|
|
# Build arguments
|
|
|
|
ARG BUILD_ARCH
|
|
|
|
ARG BUILD_DATE
|
|
|
|
ARG BUILD_DESCRIPTION
|
|
|
|
ARG BUILD_NAME
|
|
|
|
ARG BUILD_REF
|
|
|
|
ARG BUILD_REPOSITORY
|
|
|
|
ARG BUILD_VERSION
|
|
|
|
|
|
|
|
# Copy root filesystem
|
|
|
|
COPY rootfs /
|
|
|
|
|
2025-01-16 01:24:02 +01:00
|
|
|
# Install required build tools and dependencies
|
|
|
|
RUN apk add --no-cache \
|
|
|
|
gcc \
|
|
|
|
g++ \
|
|
|
|
make \
|
2025-01-16 01:51:16 +01:00
|
|
|
cmake \
|
2025-01-16 03:33:14 +01:00
|
|
|
ninja \
|
2025-01-16 01:24:02 +01:00
|
|
|
musl-dev \
|
|
|
|
linux-headers \
|
|
|
|
python3 \
|
|
|
|
py3-pip \
|
|
|
|
git \
|
|
|
|
libffi-dev \
|
|
|
|
openssl-dev \
|
|
|
|
hdf5 \
|
|
|
|
hdf5-dev \
|
|
|
|
zlib-dev \
|
|
|
|
libxml2-dev \
|
|
|
|
libxslt-dev \
|
|
|
|
libpq-dev \
|
|
|
|
libstdc++ \
|
|
|
|
gfortran \
|
|
|
|
python3-dev \
|
|
|
|
lapack-dev \
|
|
|
|
openblas-dev \
|
|
|
|
tcl-dev \
|
2025-01-16 01:51:16 +01:00
|
|
|
tk-dev \
|
|
|
|
snappy-dev \
|
|
|
|
bzip2-dev \
|
|
|
|
lz4-dev \
|
|
|
|
zstd-dev \
|
2025-01-16 03:12:14 +01:00
|
|
|
curl-dev \
|
2025-01-16 22:22:26 +01:00
|
|
|
boost-dev \
|
|
|
|
re2-dev
|
2025-01-16 03:19:32 +01:00
|
|
|
|
|
|
|
# Clone the Apache Arrow source code
|
|
|
|
RUN git clone https://github.com/apache/arrow.git /arrow
|
|
|
|
|
|
|
|
# Build and install Apache Arrow
|
|
|
|
WORKDIR /arrow/cpp
|
|
|
|
RUN mkdir -p build && cd build && \
|
|
|
|
cmake -GNinja \
|
|
|
|
-DARROW_PARQUET=ON \
|
|
|
|
-DARROW_PYTHON=ON \
|
|
|
|
-DARROW_DATASET=ON \
|
|
|
|
-DARROW_FILESYSTEM=ON \
|
|
|
|
-DARROW_CSV=ON \
|
|
|
|
-DARROW_WITH_SNAPPY=ON \
|
|
|
|
-DARROW_WITH_LZ4=ON \
|
|
|
|
-DARROW_WITH_ZSTD=ON \
|
|
|
|
-DARROW_JSON=ON \
|
|
|
|
-DARROW_WITH_BZ2=ON \
|
|
|
|
-DARROW_BUILD_STATIC=ON \
|
|
|
|
-DARROW_BUILD_SHARED=ON \
|
|
|
|
-DCMAKE_BUILD_TYPE=Release \
|
|
|
|
-DCMAKE_INSTALL_PREFIX=/usr/local .. && \
|
|
|
|
ninja && \
|
|
|
|
ninja install
|
|
|
|
|
|
|
|
# Cleanup Arrow source to reduce image size
|
|
|
|
RUN rm -rf /arrow
|
2025-01-16 01:51:16 +01:00
|
|
|
|
|
|
|
# Upgrade pip to the latest version
|
|
|
|
RUN pip install --upgrade pip setuptools wheel setuptools_scm cython
|
2025-01-16 00:49:43 +01:00
|
|
|
|
|
|
|
# Set the working directory
|
2025-01-16 23:50:44 +01:00
|
|
|
WORKDIR /freqtrade
|
2025-01-16 00:49:43 +01:00
|
|
|
|
|
|
|
# Clone the Freqtrade repository
|
2025-01-16 23:50:44 +01:00
|
|
|
RUN git clone -b stable --single-branch https://github.com/freqtrade/freqtrade.git /freqtrade
|
2025-01-16 00:49:43 +01:00
|
|
|
|
2025-01-16 01:05:03 +01:00
|
|
|
# Install Ta-lib
|
|
|
|
RUN chmod +x ./build_helpers/install_ta-lib.sh
|
2025-01-16 23:36:40 +01:00
|
|
|
WORKDIR /freqtrade/build_helpers
|
2025-01-16 01:10:33 +01:00
|
|
|
RUN ./install_ta-lib.sh
|
2025-01-16 00:49:43 +01:00
|
|
|
|
2025-01-16 23:36:40 +01:00
|
|
|
WORKDIR /freqtrade
|
2025-01-16 01:05:03 +01:00
|
|
|
RUN python3 -m venv .venv
|
2025-01-16 23:36:40 +01:00
|
|
|
RUN echo "source /freqtrade/.venv/bin/activate" >> ~/.bashrc
|
|
|
|
RUN source /freqtrade/.venv/bin/activate
|
2025-01-16 01:05:03 +01:00
|
|
|
|
|
|
|
RUN python3 -m pip install -r requirements.txt
|
|
|
|
|
|
|
|
# install freqtrade
|
|
|
|
RUN python3 -m pip install -e .
|
2025-01-16 00:49:43 +01:00
|
|
|
|
|
|
|
# Activate the virtual environment (implicitly handled in entrypoint or CMD)
|
2025-01-16 23:36:40 +01:00
|
|
|
RUN echo "source /freqtrade/.venv/bin/activate" >> ~/.bashrc
|
2025-01-16 00:49:43 +01:00
|
|
|
|
|
|
|
RUN chmod +x /etc/s6-overlay/s6-rc.d/fqmbotnfix5/*
|
|
|
|
|
|
|
|
# Labels
|
|
|
|
LABEL \
|
|
|
|
io.hass.name="Freqtrade NostalgiaForInfinity x5 bot" \
|
|
|
|
io.hass.description="Freqtrade NostalgiaForInfinity x5 bot" \
|
|
|
|
io.hass.arch="${BUILD_ARCH}" \
|
|
|
|
io.hass.type="addon" \
|
|
|
|
io.hass.version="v0.0.0"\
|
|
|
|
maintainer="feres mezned" \
|
|
|
|
org.opencontainers.image.title="Freqtrade NostalgiaForInfinity x5 bot" \
|
|
|
|
org.opencontainers.image.description="Freqtrade NostalgiaForInfinity x5 bot" \
|
|
|
|
org.opencontainers.image.vendor="Home Assistant Local Add-ons" \
|
|
|
|
org.opencontainers.image.authors="Feres MEZNED" \
|
|
|
|
org.opencontainers.image.licenses="NO" \
|
|
|
|
org.opencontainers.image.url="https://mezgit.duckdns.org/mezned/HAddons" \
|
|
|
|
org.opencontainers.image.source="https://mezgit.duckdns.org/mezned/HAddons/freqtrade-NFIx5"
|
|
|
|
|