Compare commits
24 Commits
70581e700e
...
main
Author | SHA1 | Date | |
---|---|---|---|
f8ce15efbd | |||
855bc68d27 | |||
8931984de5 | |||
4feb1126d1 | |||
22a70359a1 | |||
fccfd6732b | |||
3b7b619dab | |||
67ee3b1fdf | |||
6353046ddd | |||
8ebeffb14c | |||
8ac37a6307 | |||
f2ffd59b53 | |||
392bb4e338 | |||
f3d8c9d307 | |||
75a0314551 | |||
22626c12fe | |||
9c21a671d1 | |||
51f0797ccb | |||
e40515d354 | |||
51e0ad8f6d | |||
520471c050 | |||
37bf8d6a79 | |||
7750c459ca | |||
8165bb2beb |
@ -16,29 +16,91 @@ ARG BUILD_VERSION
|
|||||||
# Copy root filesystem
|
# Copy root filesystem
|
||||||
COPY rootfs /
|
COPY rootfs /
|
||||||
|
|
||||||
# Install necessary dependencies
|
# Install required build tools and dependencies
|
||||||
RUN apk add --no-cache git python3 py3-pip curl
|
RUN apk add --no-cache \
|
||||||
|
gcc \
|
||||||
|
g++ \
|
||||||
|
make \
|
||||||
|
cmake \
|
||||||
|
ninja \
|
||||||
|
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 \
|
||||||
|
tk-dev \
|
||||||
|
snappy-dev \
|
||||||
|
bzip2-dev \
|
||||||
|
lz4-dev \
|
||||||
|
zstd-dev \
|
||||||
|
curl-dev \
|
||||||
|
boost-dev \
|
||||||
|
re2-dev \
|
||||||
|
llvm-dev \
|
||||||
|
libffi-dev
|
||||||
|
|
||||||
|
# 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
|
||||||
|
|
||||||
# Set the working directory
|
# Set the working directory
|
||||||
WORKDIR /freq
|
WORKDIR /freqtrade
|
||||||
|
|
||||||
# Clone the Freqtrade repository
|
# Clone the Freqtrade repository
|
||||||
RUN git clone https://github.com/freqtrade/freqtrade.git /freq
|
RUN git clone -b stable --single-branch https://github.com/freqtrade/freqtrade.git /freqtrade
|
||||||
# Optionally, switch to the stable branch for novice users
|
|
||||||
ARG FREQTRADE_BRANCH=stable
|
|
||||||
RUN git checkout ${FREQTRADE_BRANCH}
|
|
||||||
|
|
||||||
# Make setup script executable
|
# Install Ta-lib
|
||||||
RUN chmod +x ./setup.sh
|
RUN chmod +x ./build_helpers/install_ta-lib.sh
|
||||||
|
WORKDIR /freqtrade/build_helpers
|
||||||
|
RUN ./install_ta-lib.sh
|
||||||
|
|
||||||
# Run the setup script to install dependencies
|
WORKDIR /freqtrade
|
||||||
RUN ./setup.sh -i
|
RUN python3 -m venv .venv
|
||||||
|
RUN echo "source /freqtrade/.venv/bin/activate" >> ~/.bashrc
|
||||||
|
RUN source /freqtrade/.venv/bin/activate
|
||||||
|
# Upgrade pip to the latest version
|
||||||
|
RUN pip install --upgrade pip setuptools wheel setuptools_scm cython
|
||||||
|
RUN python3 -m pip install -r requirements.txt
|
||||||
|
|
||||||
# Activate the virtual environment (implicitly handled in entrypoint or CMD)
|
# install freqtrade
|
||||||
RUN echo "source /freq/.venv/bin/activate" >> ~/.bashrc
|
RUN python3 -m pip install -e .
|
||||||
|
|
||||||
RUN source /freq/.venv/bin/activate
|
|
||||||
RUN pip install --upgrade pip && pip install --user --no-cache-dir --no-build-isolation -r /freqtrade/tests/requirements.txt
|
|
||||||
|
|
||||||
RUN chmod +x /etc/s6-overlay/s6-rc.d/fqmbotnfix5/*
|
RUN chmod +x /etc/s6-overlay/s6-rc.d/fqmbotnfix5/*
|
||||||
|
|
||||||
|
@ -17,10 +17,6 @@ host_network: true
|
|||||||
host_pid: true
|
host_pid: true
|
||||||
map:
|
map:
|
||||||
- share:rw
|
- share:rw
|
||||||
- /var/run/docker.sock:/var/run/docker.sock:rw
|
|
||||||
- /share/fqm_bot_nfix5/user_data:/freqtrade/user_data
|
|
||||||
- /share/fqm_bot_nfix5/user_data/data:/freqtrade/user_data/data
|
|
||||||
- /share/fqm_bot_nfix5/configs:/freqtrade/configs
|
|
||||||
ports:
|
ports:
|
||||||
8989/tcp: 8989
|
8989/tcp: 8989
|
||||||
options:
|
options:
|
||||||
@ -59,6 +55,7 @@ schema:
|
|||||||
api_server_password: str
|
api_server_password: str
|
||||||
api_server_jwt_secret_key: str
|
api_server_jwt_secret_key: str
|
||||||
api_server_ws_token: str
|
api_server_ws_token: str
|
||||||
|
timezone: str
|
||||||
dry_run: str
|
dry_run: str
|
||||||
strategy: str
|
strategy: str
|
||||||
log_level: list(trace|debug|info|notice|warning|error|fatal)?
|
log_level: list(trace|debug|info|notice|warning|error|fatal)?
|
||||||
|
@ -53,4 +53,13 @@ export "FREQTRADE__STRATEGY=$(bashio::config 'strategy')"
|
|||||||
|
|
||||||
bashio::log.info "starting the bot ..."
|
bashio::log.info "starting the bot ..."
|
||||||
|
|
||||||
exec /freqtrade/.venv/bin/freqtrade trade --db-url sqlite:////freqtrade/user_data/${FREQTRADE__BOT_NAME:-Example_Test_Account}_${FREQTRADE__EXCHANGE__NAME:-binance}_${FREQTRADE__TRADING_MODE:-spot}-tradesv3.sqlite --log-file /freqtrade/user_data/logs/${FREQTRADE__BOT_NAME:-Example_Test_Account}-${FREQTRADE__EXCHANGE__NAME:-binance}-${FREQTRADE__STRATEGY:-NostalgiaForInfinityX5}-${FREQTRADE__TRADING_MODE:-spot}.log
|
source /freqtrade/.venv/bin/activate
|
||||||
|
|
||||||
|
pip install --upgrade pip setuptools wheel setuptools_scm cython
|
||||||
|
pip install --no-cache-dir -r /share/fqm_bot_nfix5/tests/requirements.txt
|
||||||
|
|
||||||
|
source /freqtrade/.venv/bin/activate
|
||||||
|
freqtrade install-ui
|
||||||
|
cd /share/fqm_bot_nfix5
|
||||||
|
|
||||||
|
exec freqtrade trade --db-url sqlite:////share/fqm_bot_nfix5/user_data/${FREQTRADE__BOT_NAME:-Example_Test_Account}_${FREQTRADE__EXCHANGE__NAME:-binance}_${FREQTRADE__TRADING_MODE:-spot}-tradesv3.sqlite --log-file /share/fqm_bot_nfix5/user_data/logs/${FREQTRADE__BOT_NAME:-Example_Test_Account}-${FREQTRADE__EXCHANGE__NAME:-binance}-${FREQTRADE__STRATEGY:-NostalgiaForInfinityX5}-${FREQTRADE__TRADING_MODE:-spot}.log --config /share/fqm_bot_nfix5/user_data/config.json
|
Reference in New Issue
Block a user