|
|
@@ -10,7 +10,7 @@ LOGFILE="$LOGDIR/ppstructurev3.log"
|
|
|
# 配置参数
|
|
|
CONDA_ENV="paddle" # 根据您的study-notes.md中的环境名
|
|
|
PORT="8111"
|
|
|
-DEVICE="gpu:3"
|
|
|
+CUDA_VISIBLE_DEVICES=7
|
|
|
SCRIPT_DIR="/home/ubuntu/zhch/PaddleX/zhch"
|
|
|
PIPELINE_CONFIG="$SCRIPT_DIR/my_config/PP-StructureV3.yaml"
|
|
|
|
|
|
@@ -63,12 +63,13 @@ start() {
|
|
|
|
|
|
echo "🔧 Using Python: $(which python)"
|
|
|
echo "🔧 Using PaddleX: $(which paddlex)"
|
|
|
+ echo " CUDA Devices: $CUDA_VISIBLE_DEVICES"
|
|
|
|
|
|
# 启动PaddleX服务
|
|
|
cd $SCRIPT_DIR || exit 1
|
|
|
- nohup python3 start_paddlex_with_adapter.py --serve \
|
|
|
+ nohup $CUDA_VISIBLE_DEVICES; python3 start_paddlex_with_adapter.py --serve \
|
|
|
--port $PORT \
|
|
|
- --device "$DEVICE" \
|
|
|
+ --device "gpu" \
|
|
|
--pipeline "$PIPELINE_CONFIG" \
|
|
|
> $LOGFILE 2>&1 &
|
|
|
|
|
|
@@ -224,4 +225,4 @@ case "$1" in
|
|
|
usage
|
|
|
exit 1
|
|
|
;;
|
|
|
-esac
|
|
|
+esac
|