-
-
Notifications
You must be signed in to change notification settings - Fork 21
/
Copy pathbuild.sh
51 lines (50 loc) · 1.91 KB
/
build.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#!/usr/bin/bash
# this should be called from within docker to kick off a build
DISABLE_TELEMETRY=1
cd /app
echo ""
echo "============================================"
echo "Installing dependencies"
echo "============================================"
echo ""
python3 /app/dobuild.py
echo ""
echo "============================================"
echo "Build airunner for linux"
echo "============================================"
echo ""
DEV_ENV=0 AIRUNNER_ENVIRONMENT="prod" PYTHONOPTIMIZE=0 python3 -m PyInstaller --log-level=INFO --noconfirm /app/airunner.spec 2>&1 | tee build.log
echo ""
echo "============================================"
echo "Copy timm to dist"
echo "============================================"
echo ""
cp -R /home/appuser/.local/lib/python3.10/site-packages/timm ./dist/airunner/
echo ""
echo "============================================"
echo "Copy libtorch_cuda_linalg.so to dist"
echo "============================================"
echo ""
cp /home/appuser/.local/lib/python3.10/site-packages/torch/lib/libtorch_cuda_linalg.so ./dist/airunner/
echo ""
echo "============================================"
echo "Copy setup.py to dist"
echo "============================================"
echo ""
cp /app/setup.py ./dist/airunner/
echo ""
echo "============================================"
echo "Copy pillow to dist"
echo "============================================"
echo ""
cp -R /home/appuser/.local/lib/python3.10/site-packages/pillow-10.4.0.dist-info ./dist/airunner/
echo ""
echo "============================================"
echo "Deploying airunner to itch.io"
echo "============================================"
echo ""
chown -R 1000:1000 dist
LATEST_TAG=$(grep -oP '(?<=version=).*(?=,)' /app/airunner/setup.py | tr -d '"')
echo "Latest tag: $LATEST_TAG"
wget https://dl.itch.ovh/butler/linux-amd64/head/butler && chmod +x butler
./butler push ./dist/airunner capsizegames/ai-runner:ubuntu --userversion $LATEST_TAG