14 lines
342 B
Bash
14 lines
342 B
Bash
|
#!/bin/bash
|
|||
|
|
|||
|
# 设置CUDA可见设备,让两张GPU都参与计算
|
|||
|
export CUDA_VISIBLE_DEVICES=0,1
|
|||
|
|
|||
|
# 创建日志目录
|
|||
|
mkdir -p logs
|
|||
|
|
|||
|
# 启动服务
|
|||
|
nohup python flux_style_shaper_api/flux_style_shaper_api.py > logs/flux_api.log 2>&1 &
|
|||
|
|
|||
|
# 输出进程ID
|
|||
|
echo "服务已启动,进程ID: $!"
|
|||
|
echo "查看日志: tail -f logs/flux_api.log"
|