KICCO_AI_IMAGE/start_flux_api.sh

13 lines
560 B
Bash
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/bin/bash
# 创建日志目录
mkdir -p logs
# 启动第一个实例使用GPU 0端口8000
CUDA_VISIBLE_DEVICES=0 nohup python3 flux_style_shaper_api/flux_style_shaper_api.py > logs/flux_api_gpu0.log 2>&1 &
echo "GPU 0服务已启动进程ID: $!"
# 修改代码中的端口为8001后启动第二个实例使用GPU 1
# 这需要您先修改flux_style_shaper_api.py文件中的端口配置
CUDA_VISIBLE_DEVICES=1 nohup python3 flux_style_shaper_api/flux_style_shaper_api.py > logs/flux_api_gpu1.log 2>&1 &
echo "GPU 1服务已启动进程ID: $!"