-
Notifications
You must be signed in to change notification settings - Fork 7
/
run.sh
executable file
·30 lines (25 loc) · 899 Bytes
/
run.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
#!/usr/bin/env bash
# Requirements
# Nvidia Docker 2: https://github.com/NVIDIA/nvidia-docker
docker build . -t octmps:latest
XSOCK=/tmp/.X11-unix
XAUTH=/tmp/.docker.xauth
touch $XAUTH
xauth nlist $DISPLAY | sed -e 's/^..../ffff/' | xauth -f $XAUTH nmerge -
docker run \
-it \
--runtime=nvidia \
-v $XSOCK:$XSOCK:rw \
-v $XAUTH:$XAUTH:rw \
--privileged \
--device=/dev/dri/card0:/dev/dri/card0 \
-e DISPLAY=$DISPLAY \
-e XAUTHORITY=$XAUTH \
octmps:latest \
bash
# Sample Usage
# python ./src/python/octmps_main.py \
# --input-opt-json-file ./data/input/ellipsoid_and_two_spheres/input_opt.json \
# --input-bias-json-file ./data/input/ellipsoid_and_two_spheres/input_bias.json \
# --input-mesh-file ./data/input/ellipsoid_and_two_spheres/ellipsoid_and_two_spheres_60_degree.mesh \
# --visualize