forked from microsoft/TRELLIS
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathstartup.sh
33 lines (26 loc) · 869 Bytes
/
startup.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
#!/bin/bash
set -e
cd /app
# Run post-install steps if not already done
if [ ! -f /app/.post_install_done ]; then
echo "Running post-install steps..."
# Install GPU-dependent packages
conda run -n base ./setup.sh --mipgaussian --diffoctreerast
# Verify installation
export CXX=/usr/local/bin/gxx-wrapper
python example.py
# Mark completion
touch /app/.post_install_done
echo "Post-install steps completed successfully."
fi
# Set compiler wrapper for runtime
export CXX=/usr/local/bin/gxx-wrapper
echo "Launching headless API server..."
# Check if headless_app.py exists in workspace and use that instead
if [ -f "/workspace/headless_app.py" ]; then
echo "Using headless_app.py from workspace"
python3 /workspace/headless_app.py
else
echo "Using built-in headless_app.py"
python3 headless_app.py
fi