summaryrefslogtreecommitdiff
path: root/util/run_session
blob: 4eecc176e5f095303e37bdd91e768f1e88fd737a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/bash -x

BASE_DIR=/srv/postedit
export LD_LIBRARY_PATH=$BASE_DIR/lib/nanomsg-0.5-beta/lib:$LD_LIBRARY_PATH
export PYTHONPATH=$BASE_DIR/lib/python:$PYTHONPATH
export GEM_PATH=$BASE_DIR/lib/ruby/:$GEM_PATH
UTIL=$BASE_DIR/lfpe/util
SESSION=$1
SESSION_DIR=$BASE_DIR/sessions/$SESSION

rm $SESSION_DIR/work/lockfile
rm -r $SESSION_DIR/work/
mkdir -p $SESSION_DIR/work
cp $SESSION_DIR/data.json.original $SESSION_DIR/data.json
#cp $SESSION_DIR/g/original/* $SESSION_DIR/g/
$UTIL/../server-neural.rb $SESSION_DIR/conf.rb &>$SESSION_DIR/work/session.out