File size: 810 Bytes
f1586a0
 
07fa2d7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/usr/bin/env bash
set -e

# ── 1. Move (or copy) everything to a writable scratch dir ────────────────
mkdir -p /tmp/app
cp -r /app/. /tmp/app/          # use mv if you prefer

# ── 2. Delete the original build-layer copy ───────────────────────────────
rm -rf /app/*                   # or rm /app/app.py if you only want that file

# (Optional) show that the delete really happened
echo "[entrypoint] Deleted original /app, now running from /tmp/app"

# ── 3. Run Uvicorn from the copy ──────────────────────────────────────────
cd /tmp/app
exec uvicorn app:app --host 0.0.0.0 --port 7860

# exec python /tmp/app.py