-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathrun.sh
More file actions
executable file
·49 lines (44 loc) · 996 Bytes
/
run.sh
File metadata and controls
executable file
·49 lines (44 loc) · 996 Bytes
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
#!/bin/bash
cd "$(dirname "$0")"
docker build -t alephzero/playground .
opts="$(getopt -o n:p: -l name:,port:,ipc: --name "$0" -- "$@")"
eval set -- "$opts"
NAME="--name a0play"
PORT=12385
IPC="--ipc=host"
while true
do
case "$1" in
-n|--name)
NAME="--name $2"
shift 2
;;
-p|--port)
PORT=$2
shift 2
;;
--ipc)
IPC="--ipc=$2 --pid=$2"
shift 2
;;
--)
shift
break
;;
*)
echo "Unknown flag: $1" >&2
exit 1
;;
esac
done
docker run \
--rm \
-it \
$NAME \
-p $PORT:12385 \
$IPC \
-v ${PWD}/main.py:/main.py \
-v ${PWD}/index.html:/index.html \
-v ${PWD}/examples.json:/examples.json \
-v ${PWD}/examples:/examples \
alephzero/playground