Download agy2api/termux-start.sh from a3216/ds2api: direct link, hf CLI and curl.
- Browser
- Download file 465 Bytes
-
https://huggingface.co/spaces/a3216/ds2api/resolve/main/agy2api/termux-start.sh
- Command line
-
hf download hf://spaces/a3216/ds2api/agy2api/termux-start.sh
-
curl -L -o termux-start.sh https://huggingface.co/spaces/a3216/ds2api/resolve/main/agy2api/termux-start.sh
465 Bytes
| echo "强制同步项目代码,忽略本地修改..." | |
| git fetch --all | |
| git reset --hard origin/$(git rev-parse --abbrev-ref HEAD) | |
| echo "创建虚拟环境..." | |
| PYTHON_VERSION=$(python -V 2>&1 | grep -oP '\d+\.\d+' | head -1) | |
| if [ -n "$PYTHON_VERSION" ]; then | |
| echo "检测到 Python $PYTHON_VERSION,固定版本..." | |
| uv python pin "$PYTHON_VERSION" | |
| fi | |
| uv add -r requirements.txt | |
| source .venv/bin/activate | |
| pm2 start .venv/bin/python --name agy2api -- web.py | |