AstraOS commited on
Commit
5ab19d9
·
verified ·
1 Parent(s): 5bb0a88

Update entrypoint.sh

Browse files
Files changed (1) hide show
  1. entrypoint.sh +7 -4
entrypoint.sh CHANGED
@@ -1,14 +1,17 @@
1
  #!/usr/bin/env bash
2
  set -e
3
 
4
- B64="PUT-YOUR-BASE64-OF-app.pyc-HERE"
5
-
6
  mkdir -p /tmp/runner
7
- echo "$B64" | base64 -d > /tmp/runner/app.pyc
8
 
 
9
  python /tmp/runner/app.pyc &
10
  PID=$!
11
 
 
12
  sleep 2
13
- rm -f /tmp/runner/app.pyc
 
 
14
  wait "$PID"
 
1
  #!/usr/bin/env bash
2
  set -e
3
 
4
+ # Unpack into /tmp/runner (writable)
 
5
  mkdir -p /tmp/runner
6
+ tar -xzf /tmp/app.tgz -C /tmp/runner
7
 
8
+ # Launch app
9
  python /tmp/runner/app.pyc &
10
  PID=$!
11
 
12
+ # Cleanup: delete both .pyc and .tgz
13
  sleep 2
14
+ rm -f /tmp/runner/app.pyc /tmp/app.tgz
15
+ echo "[entrypoint] .pyc and .tgz deleted from /tmp"
16
+
17
  wait "$PID"