version: '3.8' services: freqtrade: image: freqtradeorg/freqtrade:develop_freqai_withredis # # Enable GPU Image and GPU Resources # # Make sure to uncomment the whole deploy section # deploy: # resources: # reservations: # devices: # - driver: nvidia # count: 1 # capabilities: [gpu] # Build step - only needed when additional dependencies are needed # build: # context: . # dockerfile: "./docker/Dockerfile.custom" restart: always extra_hosts: - "www.okx.com:104.18.43.174" # 域名:IP 格式 - "api.okx.com:104.18.43.174" # 域名:IP 格式 container_name: freqtrade volumes: - "./user_data:/freqtrade/user_data" - "./config_examples:/freqtrade/config_examples" - "./freqtrade/templates:/freqtrade/templates" - "./freqtrade/exchange/:/freqtrade/exchange" - "./freqtrade/plugins/protections:/freqtrade/freqtrade/plugins/protections" - "./ccxt/async_support/okx.py:/home/ftuser/.local/lib/python3.12/site-packages/ccxt/async_support/okx.py" # FreqAI核心文件挂载 - 确保使用我们修改的版本 - "./freqtrade/freqai/data_kitchen.py:/freqtrade/freqai/data_kitchen.py" - "./freqtrade/freqai/data_drawer.py:/freqtrade/freqai/data_drawer.py" - "./freqtrade/freqai/freqai_interface.py:/freqtrade/freqai/freqai_interface.py" # Expose api on port 8080 (localhost only) # Please read the https://www.freqtrade.io/en/stable/rest-api/ documentation # for more information. ports: - "8080:8080" # Default command used when running `docker compose up` # --freqaimodel XGBoostRegressor # command: > # trade # --logfile /freqtrade/user_data/logs/freqtrade.log # --db-url sqlite:////freqtrade/user_data/tradesv3.sqlite # --freqaimodel LightGBMRegressor # --config /freqtrade/config_examples/config_freqai.okx.json # --strategy FreqaiExampleStrategy # --strategy-path /freqtrade/templates # command: > # backtesting # --logfile /freqtrade/user_data/logs/freqtrade.log # --freqaimodel LightGBMRegressor # --config /freqtrade/config_examples/config_freqai.okx.json # --strategy-path /freqtrade/templates # --strategy FreqaiExampleStrategy # --breakdown week month # --timerange 20250310-20250410 # --export trades # command: > # hyperopt # --logfile /freqtrade/user_data/logs/freqtrade.log # --freqaimodel LightGBMRegressor # --config /freqtrade/config_examples/config_freqai.okx.json # --strategy-path /freqtrade/templates # --strategy FreqaiExampleStrategy # --timerange 20250301-20250420 # --hyperopt-loss SharpeHyperOptLoss # --spaces roi stoploss trailing # -e 200 # command: > # hyperopt # --logfile /freqtrade/user_data/logs/freqtrade.log # --freqaimodel LightGBMRegressor # --config /freqtrade/config_examples/config_freqai.okx.json # --strategy-path /freqtrade/templates # --strategy FreqaiExampleStrategy # --timerange 20250301-20250420 # --hyperopt-loss SharpeHyperOptLoss # --spaces roi stoploss # -e 200 #--config /freqtrade/templates/FreqaiExampleStrategy.json # command: > # backtesting # --logfile /freqtrade/user_data/logs/freqtrade.log # --freqaimodel XGBoostRegressor # --config /freqtrade/config_examples/config_my_hyperopt.json # --strategy-path /freqtrade/templates # --strategy TheForceV7 # --timerange 20250301-20250405 # --export trades # --fee 0.0008 # --cache none # # command: > # trade # --logfile /freqtrade/user_data/logs/freqtrade.log # --db-url sqlite:////freqtrade/user_data/tradesv3.sqlite # --freqaimodel XGBoostRegressor # --config /freqtrade/config_examples/theforcev7.json # --strategy-path /freqtrade/templates # --strategy TheForceV7 # --fee 0.0008