The recent stable_freqairl image no longer ships matplotlib, so ReforceXY.py
fails to import ('No module named matplotlib'). Pin matplotlib==3.11.1 (cp311-cp314
wheels exist, so it installs without a compiler) via the Dockerfile build arg.
Also bind the published API port to 127.0.0.1 by default, matching the
QuickAdapter hardening, so the REST API is not exposed on all interfaces.
FROM freqtradeorg/freqtrade:stable_freqairl
ARG optuna_version=4.9.0
+ARG matplotlib_version=3.11.1
USER root
RUN apt-get update \
optuna==${optuna_version} \
optuna-dashboard \
optunahub \
+ matplotlib==${matplotlib_version} \
-r https://hub.optuna.org/samplers/auto_sampler/requirements.txt
LABEL org.opencontainers.image.source="freqai-strategies" \
dockerfile: Dockerfile
args:
optuna_version: 4.9.0
+ matplotlib_version: 3.11.1
restart: unless-stopped
container_name: freqtrade-ReforceXY
environment:
- TZ=Europe/Paris
volumes:
- "./user_data:/freqtrade/user_data"
- # Expose api on port 8082
+ # Expose the API on localhost port 8082
# Please read the https://www.freqtrade.io/en/stable/rest-api/ documentation
# for more information.
ports:
- - "0.0.0.0:8082:8080"
+ - "127.0.0.1:8082:8080"
# Default command used when running `docker compose up`
command: trade