2025-04-25 09:13:50 +08:00
|
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
|
|
# 创建日志目录
|
|
|
|
|
mkdir -p logs
|
|
|
|
|
|
2025-04-25 09:24:12 +08:00
|
|
|
|
# 启动第一个实例使用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: $!"
|
2025-04-25 09:13:50 +08:00
|
|
|
|
|
2025-04-25 09:24:12 +08:00
|
|
|
|
# 修改代码中的端口为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: $!"
|