-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
5 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,15 @@ | ||
#!/usr/bin/env bash | ||
|
||
IMAGE=cgra/cgra-flow:demo | ||
COMMAND=/bin/bash | ||
NIC=$(sudo cat /proc/net/dev | awk 'END {print $1}' | sed 's/^[\t]*//g' | sed 's/[:]*$//g') | ||
|
||
# Grab the ip address of this box | ||
IPADDR=$(ifconfig $NIC | grep "inet " | awk '{print $2}') | ||
|
||
DISP_NUM=100 # fixed display number to 100 | ||
|
||
PORT_NUM=$((6000 + DISP_NUM)) | ||
|
||
socat TCP-LISTEN:${PORT_NUM},reuseaddr,fork UNIX-CLIENT:/tmp/.X11-unix/X0 2>&1 > /dev/null & | ||
CONTAINER=CGRA-Flow-OpenRoad | ||
This comment has been minimized.
Sorry, something went wrong. |
||
|
||
XSOCK=/tmp/.X11-unix | ||
|
||
sudo docker run \ | ||
-it \ | ||
--name=CGRA-Flow \ | ||
--name=$CONTAINER \ | ||
-v $XSOCK:$XSOCK:rw \ | ||
-e DISPLAY=$IPADDR:$DISP_NUM \ | ||
-e DISPLAY=unix$DISPLAY \ | ||
$IMAGE | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,7 @@ | ||
#!/usr/bin/env bash | ||
|
||
CONTAINER=CGRA-Flow | ||
COMMAND=/bin/bash | ||
CONTAINER=CGRA-Flow-OpenRoad | ||
|
||
DISP_NUM=100 # fixed display number to 100 | ||
|
||
PORT_NUM=$((6000 + DISP_NUM)) | ||
|
||
socat TCP-LISTEN:${PORT_NUM},reuseaddr,fork UNIX-CLIENT:/tmp/.X11-unix/X0 2>&1 > /dev/null & | ||
|
||
XSOCK=/tmp/.X11-unix | ||
xhost + | ||
|
||
sudo docker start -i $CONTAINER |
Hmmm, why we use this one? Where is the docker from?