shell脚本

  1. shell脚本学习入门篇:https://www.cnblogs.com/52fhy/p/5441929.html
  2. shell的&&和|| 简单使用:https://www.cnblogs.com/tinywan/p/6835531.html
  3. 实例:
#!/bin/bash

project_root_dir=/project/train/src_repo
log_file=/project/train/log/log.txt

pip install -i https://pypi.tuna.tsinghua.edu.cn/simple -r /project/train/src_repo/requirements.txt \
&& echo "Preparing..." \
&& cd ${project_root_dir}/tf_models/research/ && protoc object_detection/protos/*.proto --python_out=. \
&& echo "Converting dataset..." \
&& python3 -u ${project_root_dir}/convert_dataset.py | tee -a ${log_file} \
&& echo "Start training..." \
&& cd ${project_root_dir} && python3 -u train.py --logtostderr --train_dir=training/ --pipeline_config_path=pre-trained-model/ssd_inception_v2_coco.config 2>&1 | tee -a ${log_file} \
&& echo "Done" \
&& echo "Exporting and saving models to /project/train/models..." \
&& python3 -u ${project_root_dir}/export_models.py | tee -a ${log_file} \
&& echo "Saving plots..." \
&& python3 -u ${project_root_dir}/save_plots.py | tee -a ${log_file}

你可能感兴趣的:(shell,shell)