Makefile 655 B

123456789101112131415161718192021222324252627282930
  1. start:
  2. nohup python3 infer.py > /dev/null 2>&1 &
  3. @sleep 1s
  4. @ps -ef | grep infer.py | grep -v grep
  5. debug:
  6. @python3 infer.py
  7. status:
  8. @ps -ef | grep infer.py | grep -v grep
  9. kill:
  10. @ps -ef | grep infer.py | grep -v grep | awk '{print $$2}' | xargs kill
  11. @ps -ef | grep infer.py
  12. log:
  13. @tail -f log/runtime.log
  14. help:
  15. @echo "Usage: make <target>"
  16. @echo ""
  17. @echo "make start Start server"
  18. @echo "make status Check server status"
  19. @echo "make debug Execute python3 infer.py"
  20. @echo "make kill Kill server"
  21. @echo "make log Print log"
  22. @echo "make help Show this help message"
  23. @echo ""
  24. .PHONY: start status help log