run.sh 719 Bytes
Newer Older
1
2
set -xe

Volodymyr SAVCHENKO's avatar
Volodymyr SAVCHENKO committed
3
4
COMMAND=$@

5
6
7
8
echo "REP_BASE_PROD: ${REP_BASE_PROD:?please set this variable to the current data location}"
echo "CURRENT_IC: ${CURRENT_IC:?please set this variable to the current IC location}"

echo "using WORKDIR: ${WORKDIR:=$PWD}"
Volodymyr SAVCHENKO's avatar
Volodymyr SAVCHENKO committed
9

10
11
mkdir -pv $WORKDIR
mkdir -pv $WORKDIR/pfiles
Volodymyr SAVCHENKO's avatar
run    
Volodymyr SAVCHENKO committed
12
13
14
15

docker run \
    -e DISPLAY=$DISPLAY \
    -v /tmp/.X11-unix:/tmp/.X11-unix \
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
    -v $WORKDIR:/home/integral \
    -v $REP_BASE_PROD/scw:/data/scw:ro \
    -v $REP_BASE_PROD/aux:/data/aux:ro \
    -v $CURRENT_IC/ic:/data/ic:ro \
    -v $CURRENT_IC/idx:/data/idx:ro \
    --rm -it  --user $(id -u) \
        integralsw/osa:11.0 bash -c "

cat init.sh
. init.sh

cd \$HOME

echo -e '\\e[31mrunning\\e[37m $COMMAND\\e[0m'

$COMMAND
"