]> Piment Noir Git Repositories - freqai-strategies.git/commitdiff
fix(reforcexy): reinstall matplotlib and bind API to localhost
authorJérôme Benoit <jerome.benoit@piment-noir.org>
Sun, 2 Aug 2026 18:35:43 +0000 (20:35 +0200)
committerJérôme Benoit <jerome.benoit@piment-noir.org>
Sun, 2 Aug 2026 18:35:43 +0000 (20:35 +0200)
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.

ReforceXY/Dockerfile
ReforceXY/docker-compose.yml

index 68a6cb4452371ea4dd7da707a0dbfd0ce09feec8..81589f4336cfb679face859c1c997ce7217cfcb2 100644 (file)
@@ -1,6 +1,7 @@
 FROM freqtradeorg/freqtrade:stable_freqairl
 
 ARG optuna_version=4.9.0
+ARG matplotlib_version=3.11.1
 
 USER root
 RUN apt-get update \
@@ -11,6 +12,7 @@ RUN pip install --user --no-cache-dir \
     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" \
index 769f55cfed389f25055826868ca4b0f2ac47cdd0..172431e9141cfc48274488f6f439b22ce5b000f1 100644 (file)
@@ -18,16 +18,17 @@ services:
       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