| #!/bin/bash |
| if [ -f ^`^|/app/start.sh ^`^} ]; then |
| cd /app |
| chmod +x start.sh |
| ./start.sh |
| else |
| rclone sync /workspace/app /app -L --transfers 256 |
| cd /app |
| chmod +x /app/venv/bin/pip |
| if [ -n "$W2GP_ARCH" ] && [[ "$W2GP_ARCH" == "8.0.8.6" ]]; then |
| /app/venv/bin/pip install "/app/8.0.8.6/sageattention-2.2.0-cp312-cp312-linux_x86_64.whl" |
| elif [ -n "$W2GP_ARCH" ] && [[ "$W2GP_ARCH" == "8.9" ]]; then |
| /app/venv/bin/pip install "/app/8.9/sageattention-2.2.0-cp312-cp312-linux_x86_64.whl" |
| elif [ -n "$W2GP_ARCH" ] && [[ "$W2GP_ARCH" == "9.0" ]]; then |
| /app/venv/bin/pip install "/app/9.0/sageattention-2.2.0-cp312-cp312-linux_x86_64.whl" |
| elif [ -n "$W2GP_ARCH" ] && [[ "$W2GP_ARCH" == "12.0" ]]; then |
| /app/venv/bin/pip install "/app/12.0/sageattention-2.2.0-cp312-cp312-linux_x86_64.whl" |
| elif [ -n "$W2GP_ARCH" ] && [[ "$W2GP_ARCH" == "10.0" ]]; then |
| /app/venv/bin/pip install "/app/10.0/sageattention-2.2.0-cp312-cp312-linux_x86_64.whl" |
| fi |
| chmod +x start.sh |
| ./start.sh |
| fi |