diff options
Diffstat (limited to 'lib/lazar.rb')
-rw-r--r-- | lib/lazar.rb | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/lib/lazar.rb b/lib/lazar.rb index 32f0317..1f909b7 100644 --- a/lib/lazar.rb +++ b/lib/lazar.rb @@ -19,7 +19,7 @@ ENV["MONGOID_ENV"] = ENV["LAZAR_ENV"] ENV["RACK_ENV"] = ENV["LAZAR_ENV"] # should set sinatra environment # search for a central mongo database in use # http://opentox.github.io/installation/2017/03/07/use-central-mongodb-in-docker-environment -CENTRAL_MONGO_IP = `grep -oP '^\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}(?=.*mongodb)' /etc/hosts`.chomp +CENTRAL_MONGO_IP = "mongodb" Mongoid.load_configuration({ :clients => { :default => { @@ -46,9 +46,6 @@ end # R setup rlib = File.expand_path(File.join(File.dirname(__FILE__),"..","R")) -# should work on POSIX including os x -# http://stackoverflow.com/questions/19619582/number-of-processors-cores-in-command-line -NR_CORES = `getconf _NPROCESSORS_ONLN`.to_i R = Rserve::Connection.new R.eval ".libPaths('#{rlib}')" R.eval " @@ -64,10 +61,8 @@ suppressPackageStartupMessages({ library(doMC,lib=\"#{rlib}\") library(randomForest,lib=\"#{rlib}\") library(plyr,lib=\"#{rlib}\") - registerDoMC(#{NR_CORES}) }) " - # OpenTox classes and includes CLASSES = ["Feature","Substance","Dataset","LazarPrediction","CrossValidation","LeaveOneOutValidation","RepeatedCrossValidation","Experiment"]# Algorithm and Models are modules |