From b7f52844f88d45824007a438b0f23d38a38e81d6 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Sun, 2 Aug 2026 20:35:43 +0200 Subject: [PATCH] fix(reforcexy): reinstall matplotlib and bind API to localhost 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 | 2 ++ ReforceXY/docker-compose.yml | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ReforceXY/Dockerfile b/ReforceXY/Dockerfile index 68a6cb4..81589f4 100644 --- a/ReforceXY/Dockerfile +++ b/ReforceXY/Dockerfile @@ -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" \ diff --git a/ReforceXY/docker-compose.yml b/ReforceXY/docker-compose.yml index 769f55c..172431e 100644 --- a/ReforceXY/docker-compose.yml +++ b/ReforceXY/docker-compose.yml @@ -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 -- 2.53.0