Makefile 638 B

1234567891011121314151617181920212223242526272829
  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. @$(shell ps -ef | grep infer.py | grep -v grep | awk '{print $2}' | xargs kill)
  11. log:
  12. @tail -f log/runtime.log
  13. help:
  14. @echo "Usage: make <target>"
  15. @echo ""
  16. @echo "make start Start server"
  17. @echo "make status Check server status"
  18. @echo "make debug Execute python3 infer.py"
  19. @echo "make kill Kill server"
  20. @echo "make log Print log"
  21. @echo "make help Show this help message"
  22. @echo ""
  23. .PHONY: start status help log