This commit is contained in:
2024-11-04 05:20:42 +08:00
parent e990473dcd
commit 07de4d5fd5
24 changed files with 1385 additions and 2 deletions

25
start.sh Executable file
View File

@@ -0,0 +1,25 @@
#!/bin/sh
# pip freeze > requirements.txt
#pip install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple
#python3 -m pip install -U pyOpenSSL cryptography
# 使用 uvicorn 启动两个工作进程, 并支持自动重载
#uvicorn main:app --host 0.0.0.0 --port 5001 --workers 2 --reload >/dev/null 2>&1 &
#uvicorn main:app --host 0.0.0.0 --port 5002 >/dev/null 2>&1 &
python main.py >/dev/null 2>&1 &
# 为容器设定自动重启
#docker update --restart=always 51bb94aa2726
#cd ~/reverse_image_search
#pm2 start python3 --name reverse-1 -- main.py 5001
#pm2 start python3 --name reverse-2 -- main.py 5002
#pm2 start python3 --name reverse-3 -- main.py 5003
# 某些系统下,需要手动安装指定版本 opencv-python (4.7引用zlib错误)
# pip install opencv-python==4.6.0.66 -i https://pypi.tuna.tsinghua.edu.cn/simple
# 如果网络不通, 从自定义服务器下载模型参数
#scp root@172.21.216.33:~/root/.cache/torch/hub/checkpoints/resnet50_a1_0-14fe96d1.pth resnet50_a1_0-14fe96d1.pth