mirror of
https://github.com/triqbit/mt5-ai-xauusd-trader.git
synced 2026-11-02 06:56:15 +00:00
fix: align runtime and dependency pins
This commit is contained in:
@@ -0,0 +1 @@
|
||||
3.11
|
||||
+2
-13
@@ -5,7 +5,7 @@
|
||||
# ============================================================
|
||||
|
||||
# --- Stage 1: builder ------------------------------------------
|
||||
FROM python:3.12-slim AS builder
|
||||
FROM python:3.11-slim AS builder
|
||||
|
||||
ARG TARGETARCH
|
||||
WORKDIR /app
|
||||
@@ -27,17 +27,6 @@ RUN wget -q https://github.com/ta-lib/ta-lib/releases/download/v0.6.4/ta-lib-0.6
|
||||
# Prepare requirements
|
||||
COPY requirements-docker.txt .
|
||||
|
||||
# Architecture-specific adjustments for PyTorch
|
||||
RUN if [ "$TARGETARCH" = "arm64" ]; then \
|
||||
# ARM64 (Apple Silicon / AWS Graviton): PyPI provides valid CPU wheels
|
||||
sed -i '/--extra-index-url/d' requirements-docker.txt && \
|
||||
sed -i 's/+cpu//g' requirements-docker.txt; \
|
||||
else \
|
||||
# AMD64: Explicitly use the CPU-optimized wheels from PyTorch's dedicated index
|
||||
sed -i 's/torch==2.3.1/torch==2.3.1+cpu/g' requirements-docker.txt && \
|
||||
sed -i 's/torchvision==0.18.1/torchvision==0.18.1+cpu/g' requirements-docker.txt; \
|
||||
fi
|
||||
|
||||
# Initialize virtual environment for isolation
|
||||
RUN python -m venv /opt/venv
|
||||
ENV PATH="/opt/venv/bin:$PATH"
|
||||
@@ -48,7 +37,7 @@ RUN --mount=type=cache,target=/root/.cache/pip \
|
||||
pip install --no-cache-dir -r requirements-docker.txt
|
||||
|
||||
# --- Stage 2: runtime ------------------------------------------
|
||||
FROM python:3.12-slim AS runtime
|
||||
FROM python:3.11-slim AS runtime
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
[](https://github.com/triqbit/mt5-ai-xauusd-trader/actions/workflows/ci.yml)
|
||||
[](https://opensource.org/licenses/MIT)
|
||||
[](https://www.python.org/downloads/release/python-3110/)
|
||||
[](https://www.python.org/downloads/release/python-3110/)
|
||||
[](https://www.docker.com/)
|
||||
|
||||
**Institutional-Grade Algorithmic Trading System for MetaTrader 5**
|
||||
@@ -96,7 +96,9 @@ mt5-ai-xauusd-trader/
|
||||
git clone https://github.com/triqbit/mt5-ai-xauusd-trader.git
|
||||
cd mt5-ai-xauusd-trader
|
||||
|
||||
# Install dependencies
|
||||
# Install dependencies (Python 3.11 is required)
|
||||
python3.11 -m venv venv
|
||||
source venv/bin/activate
|
||||
pip install -r requirements.txt
|
||||
|
||||
# [CRITICAL] Verify environment and dependencies
|
||||
|
||||
+2
-2
@@ -7,7 +7,7 @@ This guide provides step-by-step instructions for setting up the MT5 AI/ML Tradi
|
||||
- Mac with M1/M2 chip or Intel processor
|
||||
- Terminal (Command Line)
|
||||
- Git installed (`brew install git`)
|
||||
- Python 3.9+ installed
|
||||
- Python 3.11 installed
|
||||
- MetaTrader 5 account (demo for testing)
|
||||
|
||||
## STEP 1: Clone Your Repository
|
||||
@@ -37,7 +37,7 @@ mkdir -p config training/{drl,lstm,ensemble,scripts} testing/{backtest,walk_forw
|
||||
|
||||
```bash
|
||||
# Create virtual environment
|
||||
python3 -m venv venv
|
||||
python3.11 -m venv venv
|
||||
|
||||
# Activate it (for Mac)
|
||||
source venv/bin/activate
|
||||
|
||||
+3
-3
@@ -9,19 +9,19 @@ description = "AI/ML Trading Bot for MetaTrader 5 - XAUUSD Gold Trading"
|
||||
authors = [{name = "triqbit"}]
|
||||
readme = "README.md"
|
||||
license = {text = "MIT"}
|
||||
requires-python = ">=3.10"
|
||||
requires-python = ">=3.11,<3.12"
|
||||
classifiers = [
|
||||
"Programming Language :: Python :: 3",
|
||||
"License :: OSI Approved :: MIT License",
|
||||
]
|
||||
dependencies = [
|
||||
"torch==2.13.0+cpu",
|
||||
"torch==2.6.0",
|
||||
"stable-baselines3==2.9.0",
|
||||
"gymnasium==1.3.0",
|
||||
"numpy==2.2.6",
|
||||
"scipy==1.15.3",
|
||||
"scikit-learn==1.7.2",
|
||||
"pandas==2.3.3",
|
||||
"pandas==2.3.2",
|
||||
"TA-Lib==0.7.1",
|
||||
"requests==2.34.2",
|
||||
"aiohttp==3.14.3",
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
numpy==2.2.6
|
||||
scipy==1.15.3
|
||||
scikit-learn==1.7.2
|
||||
pandas==2.3.3
|
||||
pandas==2.3.2
|
||||
|
||||
# -- Database ------------------------------------------------------
|
||||
sqlalchemy==2.0.52
|
||||
|
||||
+4
-1
@@ -4,10 +4,13 @@
|
||||
# ============================================================
|
||||
|
||||
# -- Core numeric / data -------------------------------------------
|
||||
--extra-index-url https://download.pytorch.org/whl/cpu
|
||||
torch==2.6.0
|
||||
stable-baselines3==2.9.0
|
||||
numpy==2.2.6
|
||||
scipy==1.15.3
|
||||
scikit-learn==1.7.2
|
||||
pandas==2.3.3
|
||||
pandas==2.3.2
|
||||
|
||||
# -- Technical Analysis --------------------------------------------
|
||||
TA-Lib==0.7.1
|
||||
|
||||
@@ -5,13 +5,13 @@
|
||||
|
||||
# -- Core ML / RL --------------------------------------------
|
||||
--extra-index-url https://download.pytorch.org/whl/cpu
|
||||
torch==2.13.0+cpu
|
||||
torch==2.6.0
|
||||
stable-baselines3==2.9.0
|
||||
gymnasium==1.3.0
|
||||
numpy==2.2.6
|
||||
scipy==1.15.3
|
||||
scikit-learn==1.7.2
|
||||
pandas==2.3.3
|
||||
pandas==2.3.2
|
||||
|
||||
# -- Technical Analysis --------------------------------------
|
||||
TA-Lib==0.7.1
|
||||
|
||||
@@ -5,13 +5,14 @@
|
||||
# ============================================================
|
||||
|
||||
# ── Core ML / RL ────────────────────────────────────────────
|
||||
torch==2.13.0+cpu
|
||||
--extra-index-url https://download.pytorch.org/whl/cpu
|
||||
torch==2.6.0
|
||||
stable-baselines3==2.9.0
|
||||
gymnasium==1.3.0
|
||||
numpy==2.2.6
|
||||
scipy==1.15.3
|
||||
scikit-learn==1.7.2
|
||||
pandas==2.3.3
|
||||
pandas==2.3.2
|
||||
|
||||
# ── Deep Learning Extras ────────────────────────────────────
|
||||
|
||||
|
||||
@@ -5,13 +5,13 @@
|
||||
# ============================================================
|
||||
|
||||
# ── Core ML / RL ────────────────────────────────────────────
|
||||
torch==2.13.0+cpu
|
||||
torch==2.6.0
|
||||
stable-baselines3==2.9.0
|
||||
gymnasium==1.3.0
|
||||
numpy==2.2.6
|
||||
scipy==1.15.3
|
||||
scikit-learn==1.7.2
|
||||
pandas==2.3.3
|
||||
pandas==2.3.2
|
||||
|
||||
# ── Deep Learning Extras ────────────────────────────────────
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
numpy==2.2.6
|
||||
scipy==1.15.3
|
||||
scikit-learn==1.7.2
|
||||
pandas==2.3.3
|
||||
pandas==2.3.2
|
||||
|
||||
# -- Technical Analysis --------------------------------------------
|
||||
|
||||
|
||||
+2
-2
@@ -6,13 +6,13 @@
|
||||
|
||||
# ── Core ML / RL ────────────────────────────────────────────
|
||||
--extra-index-url https://download.pytorch.org/whl/cpu
|
||||
torch==2.13.0+cpu
|
||||
torch==2.6.0
|
||||
stable-baselines3==2.9.0
|
||||
gymnasium==1.3.0
|
||||
numpy==2.2.6
|
||||
scipy==1.15.3
|
||||
scikit-learn==1.7.2
|
||||
pandas==2.3.3
|
||||
pandas==2.3.2
|
||||
|
||||
# ── Technical Analysis ──────────────────────────────────────
|
||||
TA-Lib==0.7.1
|
||||
|
||||
@@ -5,6 +5,10 @@ echo "=== MT5 AI/ML Trading Bot Bootstrapper ==="
|
||||
|
||||
# 1. Check Python
|
||||
python3 --version || { echo "Python 3 not found"; exit 1; }
|
||||
if ! python3 -c 'import sys; raise SystemExit(not (sys.version_info[:2] == (3, 11)))'; then
|
||||
echo "Python 3.11 is required. Found: $(python3 --version 2>&1)"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# 2. Setup virtual environment if not present
|
||||
if [ ! -d "venv" ]; then
|
||||
@@ -66,11 +70,11 @@ if [ -f "$REQ_FILE" ]; then
|
||||
if ! $PIP_INSTALL_CMD -r requirements-ta-lib-fallback.txt; then
|
||||
echo ""
|
||||
echo "----------------------------------------------------------"
|
||||
echo "CRITICAL WARNING: Production dependency installation FAILED."
|
||||
echo "This is likely due to invalid versions in $REQ_FILE."
|
||||
echo "The system will be in a DEGRADED state."
|
||||
echo "Run 'make doctor' to diagnose specific missing packages."
|
||||
echo "CRITICAL: Production dependency installation FAILED."
|
||||
echo "Fix the environment and rerun bootstrap."
|
||||
echo "----------------------------------------------------------"
|
||||
rm -f requirements-ta-lib-fallback.txt
|
||||
exit 1
|
||||
fi
|
||||
rm -f requirements-ta-lib-fallback.txt
|
||||
|
||||
|
||||
Reference in New Issue
Block a user