This commit is contained in:
aaron 2025-04-28 16:41:52 +08:00
parent 68d095c990
commit 9ee0b1b88a
2 changed files with 37 additions and 9 deletions

View File

@ -58,10 +58,36 @@ if [ -d "/ql/data/scripts/cryptoai/venv" ]; then
source /ql/data/scripts/cryptoai/venv/bin/activate source /ql/data/scripts/cryptoai/venv/bin/activate
fi fi
# 安装编译工具
echo "检查编译工具..."
if ! command -v gcc &> /dev/null; then
echo "安装基本编译工具..."
if command -v apk &> /dev/null; then
# Alpine Linux
apk add --no-cache gcc g++ musl-dev python3-dev
elif command -v apt-get &> /dev/null; then
# Debian/Ubuntu
apt-get update && apt-get install -y build-essential python3-dev
elif command -v yum &> /dev/null; then
# CentOS/RHEL
yum install -y gcc gcc-c++ python3-devel
fi
fi
# 检查依赖是否安装 # 检查依赖是否安装
if ! pip list | grep -q "sqlalchemy"; then if ! pip list | grep -q "pandas"; then
echo "安装依赖..." echo "安装依赖..."
pip install -r requirements.txt # 使用国内镜像源并优先使用预编译的wheel
pip install -i https://mirrors.aliyun.com/pypi/simple/ --prefer-binary python-binance==1.0.16
pip install -i https://mirrors.aliyun.com/pypi/simple/ --prefer-binary pandas==2.0.3
pip install -i https://mirrors.aliyun.com/pypi/simple/ --prefer-binary numpy==1.24.3
pip install -i https://mirrors.aliyun.com/pypi/simple/ --prefer-binary matplotlib==3.7.1
pip install -i https://mirrors.aliyun.com/pypi/simple/ --prefer-binary scikit-learn==1.2.2
pip install -i https://mirrors.aliyun.com/pypi/simple/ --prefer-binary sqlalchemy==2.0.19
pip install -i https://mirrors.aliyun.com/pypi/simple/ --prefer-binary pymysql==1.1.0
pip install -i https://mirrors.aliyun.com/pypi/simple/ --prefer-binary cryptography==41.0.3
pip install -i https://mirrors.aliyun.com/pypi/simple/ --prefer-binary requests==2.31.0
pip install -i https://mirrors.aliyun.com/pypi/simple/ --prefer-binary pyyaml==6.0.1
fi fi
# 运行加密货币分析 # 运行加密货币分析

View File

@ -1,16 +1,18 @@
python-binance==1.0.16 python-binance==1.0.16
pandas>=2.0.0 pandas==2.0.3
numpy>=2.0.0 numpy==1.24.3
matplotlib>=3.7.0 matplotlib==3.7.1
scikit-learn>=1.3.0 scikit-learn==1.2.2
requests>=2.31.0 sqlalchemy==2.0.19
pymysql==1.1.0
cryptography==41.0.3
requests==2.31.0
pyyaml==6.0.1
python-dotenv==1.0.0 python-dotenv==1.0.0
deepseek-ai==0.0.1 deepseek-ai==0.0.1
pyyaml==6.0.1
schedule==1.2.0 schedule==1.2.0
aiohttp>=3.8.5 aiohttp>=3.8.5
langchain>=0.0.267 langchain>=0.0.267
pydantic>=2.3.0 pydantic>=2.3.0
fastapi>=0.103.1 fastapi>=0.103.1
uvicorn>=0.23.2 uvicorn>=0.23.2
sqlalchemy==2.0.31