rbbt-image 0.1.24 → 0.1.25

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7ed58604b057907a38851a6a92d7194f18053a7b
4
- data.tar.gz: 2d388128b25ad6bab542ea78d4c5f2c2ddeed92e
3
+ metadata.gz: 0537ca8e50ce927886c8a21afbe078059aa75c09
4
+ data.tar.gz: 97cd46d82ff5951459fa3e5a144b409ad7f8b5e8
5
5
  SHA512:
6
- metadata.gz: 38d6594b2ecd3bca2b2072bcef5e5d6860445897a2893736410f6a57e1d499719052f836ab16b963ea6f793188ac60f8dcc906cccaaa48c5996aa703a2659e07
7
- data.tar.gz: 57bb41af613cbb225121ec437802ac2408eeb3d6fe6087398db207c38a054ab95cb0547c5c64a4d8b7286824840a43c87e60784737fd03cd1f5389502c6d7482
6
+ metadata.gz: 1418697fc48d5fc3a863801a56f3e40c8b711db2f914569d952e2c16efe276ecac4419e0cad85b91757ab2e08ec05a36acb5d397a1437e28e6338674e4141a2d
7
+ data.tar.gz: 8dadc56b89c8cb4de7f6720f35a4ee3fdfed10eef8fad619d4253e43ac6bc7b43ad39b108e253a88df070c9ea372124e9682dff9c10501b1d3c70ab9b2bc9ab9
@@ -29,6 +29,7 @@ $ #{$0} [options]
29
29
  -st--skip_tokyocabinet Skip tokyocabinet setup installation
30
30
  -sr--skip_ruby Skip ruby setup installation
31
31
  -sg--skip_gem Skip ruby gem installation
32
+ -sR--skip_R Skip R setup
32
33
  -su--skip_user_setup Skip user setup
33
34
  -sb--skip_bootstrap Skip user bootstrap
34
35
  -Rc--R_custom Install a custom installation of R
@@ -68,6 +69,7 @@ SKIP_BASE_SYSTEM = options[:skip_base_system]
68
69
  SKIP_TOKYOCABINET= options[:skip_tokyocabinet]
69
70
  SKIP_RUBY = options[:skip_ruby]
70
71
  R_CUSTOM = options[:R_custom]
72
+ SKIP_R = options[:skip_R]
71
73
  SKIP_BOOT = options[:skip_bootstrap]
72
74
  SKIP_USER = options[:skip_user_setup]
73
75
  SKIP_GEM = options[:skip_gem]
@@ -114,6 +116,8 @@ else
114
116
  end
115
117
  }
116
118
 
119
+ echo "source /etc/rbbt_environment" >> /etc/profile
120
+
117
121
  #{
118
122
  if not SKIP_BASE_SYSTEM and R_CUSTOM
119
123
  "echo 1.1 Setting custom R"
@@ -121,6 +125,13 @@ if not SKIP_BASE_SYSTEM and R_CUSTOM
121
125
  end
122
126
  }
123
127
 
128
+ #{
129
+ if not SKIP_R
130
+ "echo 1.2 Install R packages"
131
+ File.read(script_dir + 'R_packages.sh')
132
+ end
133
+ }
134
+
124
135
  echo "2. Setting up tokyocabinet"
125
136
  #{
126
137
  if not SKIP_TOKYOCABINET
@@ -271,9 +282,13 @@ if docker_image = options[:docker]
271
282
  volumnes = options[:docker_volumnes].split(/\s*[,|]\s*/).collect{|d| "VOLUME " << d} * "\n"
272
283
  dockerfile_text.sub!(/^RUN/, volumnes + "\nRUN")
273
284
  end
274
- if options[:R_packages]
275
- dockerfile_text.sub!(/^(# END PROVISION)/, '\1' + "\n" + Open.read(File.join(script_dir, 'Dockerfile.R-packages')) + "\n" )
276
- end
285
+
286
+ # NOTE: Not used like this now. Used in provision script
287
+ #
288
+ #if options[:R_packages]
289
+ # dockerfile_text.sub!(/^(# END PROVISION)/, '\1' + "\n" + Open.read(File.join(script_dir, 'Dockerfile.R-packages')) + "\n" )
290
+ #end
291
+
277
292
  TmpFile.with_file(nil, false) do |dir|
278
293
  FileUtils.mkdir_p dir
279
294
  Path.setup(dir)
@@ -305,6 +320,7 @@ From: #{container_dependency}
305
320
 
306
321
  %post
307
322
  cat > /tmp/rbbt_provision.sh <<"EOS"
323
+ echo "source /etc/rbbt_environment" > /.singularity/env/99-rbbt_environment
308
324
  #{provision_script}
309
325
  EOS
310
326
  bash /tmp/rbbt_provision.sh
@@ -359,7 +375,6 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
359
375
  end
360
376
  EOF
361
377
 
362
- iii dir
363
378
  Misc.in_dir(dir) do
364
379
  io = CMD.cmd('vagrant up', :pipe => true, :log => true)
365
380
  while line = io.gets
@@ -0,0 +1,39 @@
1
+ #!/bin/bash -x
2
+
3
+ # INSTALL
4
+ # =======
5
+
6
+ # R packages
7
+ # ----------
8
+
9
+ function R_install_packages(){
10
+ pkgs="'$1'"
11
+ shift
12
+ for p in $@; do
13
+ pkgs="$pkgs, '$p'"
14
+ done
15
+ echo "install.packages(c($pkgs), repos='http://cran.us.r-project.org')" | R --vanilla
16
+ }
17
+
18
+ function R_CMD_install(){
19
+ url=$1
20
+ name=$2
21
+ wget "$url" -O /tmp/R-pkg-"$name".tar.gz
22
+ R CMD INSTALL /tmp/R-pkg-"$name".tar.gz
23
+ }
24
+
25
+ R_install_packages Rcpp RJSONIO XML
26
+ R_CMD_install 'https://cran.r-project.org/src/contrib/Archive/plyr/plyr_1.8.1.tar.gz' plyr
27
+ R_CMD_install 'https://cran.r-project.org/src/contrib/Archive/car/car_2.0-22.tar.gz' car
28
+ R_install_packages 'digest', 'gtable', 'reshape2', 'scales', 'proto'
29
+
30
+ R_CMD_install 'https://cran.r-project.org/src/contrib/Archive/ggplot2/ggplot2_1.0.0.tar.gz' ggplot2
31
+ R_CMD_install 'https://cran.r-project.org/src/contrib/Archive/ggthemes/ggthemes_1.7.0.tar.gz' ggthemes
32
+ R_CMD_install 'https://cran.r-project.org/src/contrib/gridSVG_1.5-0.tar.gz' gridSVG
33
+
34
+ R_install_packages NMF Cairo drc Rserve
35
+ echo "source('http://bioconductor.org/biocLite.R'); biocLite('limma')" | R --vanilla
36
+
37
+ R_install_packages pheatmap VennDiagram Hmisc pls
38
+
39
+ rm /tmp/R-pkg-*.tar.gz
@@ -14,12 +14,10 @@ cd R-*/
14
14
  ./configure --prefix=/usr/local --enable-R-shlib
15
15
  make && make install
16
16
 
17
- grep -v R_HOME /etc/profile > profile.tmp
18
- echo >> profile.tmp
19
- echo "# For RSRuby gem " >> profile.tmp
20
- echo "export R_HOME='/usr/local/lib/R'" >> profile.tmp
21
- echo "export LD_LIBRARY_PATH=\"\$LD_LIBRARY_PATH:\$R_HOME/lib\"" >> profile.tmp
22
- echo "export LD_RUN_PATH=\"\$LD_RUN_PATH:\$R_HOME/lib\"" >> profile.tmp
23
- mv profile.tmp /etc/profile
17
+ echo "# For RSRuby gem " >> /etc/rbbt_environment
18
+ echo "export R_HOME='/usr/local/lib/R'" >> /etc/rbbt_environment
19
+ echo "export PATH=\"$R_HOME/bin:$PATH\"" >> /etc/rbbt_environment
20
+ echo "export LD_LIBRARY_PATH=\"\$LD_LIBRARY_PATH:\$R_HOME/lib\"" >> /etc/rbbt_environment
21
+ echo "export LD_RUN_PATH=\"\$LD_RUN_PATH:\$R_HOME/lib\"" >> /etc/rbbt_environment
24
22
 
25
- . /etc/profile
23
+ . /etc/rbbt_environment
@@ -3,7 +3,7 @@
3
3
  # RUBY GEMS and RBBT
4
4
  # =================
5
5
 
6
- . /etc/profile
6
+ . /etc/rbbt_environment
7
7
 
8
8
  export REALLY_GEM_UPDATE_SYSTEM=true
9
9
  env REALLY_GEM_UPDATE_SYSTEM=true gem update --no-ri --no-rdoc --system
@@ -11,7 +11,7 @@ gem install --force --no-ri --no-rdoc ZenTest
11
11
  gem install --force --no-ri --no-rdoc RubyInline
12
12
 
13
13
  # R (extra config in gem)
14
- . /etc/profile
14
+ . /etc/rbbt_environment
15
15
  export R_INCLUDE="$(echo "$R_HOME" | sed 's@/usr/lib\(32\|64\)*@/usr/share@')/include"
16
16
  gem install --conservative --no-ri --no-rdoc rsruby -- --with-R-dir="$R_HOME" --with-R-include="$R_INCLUDE" \
17
17
  --with_cflags="-fPIC -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wall -fno-strict-aliasing"
@@ -27,7 +27,7 @@ gem install --no-ri --no-rdoc --force \
27
27
  rbbt-util rbbt-rest rbbt-dm rbbt-text rbbt-sources rbbt-phgx rbbt-GE \
28
28
  rserve-client \
29
29
  uglifier therubyracer kramdown\
30
- puma
30
+ puma prawn
31
31
 
32
32
  # Get good version of lockfile
33
33
  wget http://ubio.bioinfo.cnio.es/people/mvazquezg/lockfile-2.1.4.gem -O /tmp/lockfile-2.1.4.gem
@@ -13,8 +13,8 @@ make && make install
13
13
 
14
14
  unset _small_version
15
15
 
16
- grep '#Ruby2' /etc/profile || echo 'export PATH="/usr/local/bin:$PATH" #Ruby2' >> /etc/profile
17
- . /etc/profile
16
+ echo 'export PATH="/usr/local/bin:$PATH" #Ruby2' >> /etc/rbbt_environment
17
+ . /etc/rbbt_environment
18
18
 
19
19
  #\curl -sSL https://get.rvm.io | bash -s stable
20
20
  #source /etc/profile.d/rvm.sh
@@ -5,6 +5,10 @@
5
5
 
6
6
  # Basic system requirements
7
7
  # -------------------------
8
+ apt-get -y install software-properties-common
9
+ add-apt-repository ppa:george-edison55/cmake-3.x
10
+ apt-get -y install cmake
11
+
8
12
  apt-get -y update
9
13
  apt-get -y update
10
14
  apt-get -y install \
@@ -15,12 +19,15 @@ apt-get -y install \
15
19
  libcairo2 libcairo2-dev r-base-core r-base-dev r-cran-rserve liblzma5 liblzma-dev libcurl4-openssl-dev \
16
20
  build-essential zlib1g-dev libssl-dev libreadline6-dev libyaml-dev libffi-dev
17
21
 
22
+
18
23
  # This link was broken for some reason
19
24
  rm /usr/lib/R/bin/Rserve
20
25
  ln -s /usr/lib/R/site-library/Rserve/libs/Rserve /usr/lib/R/bin/Rserve
21
26
 
22
- grep R_HOME /etc/profile || echo "export R_HOME='/usr/lib/R' # For Ruby's RSRuby gem" >> /etc/profile
23
- . /etc/profile
27
+ echo "export R_HOME='/usr/lib/R' # For Ruby's RSRuby gem" >> /etc/rbbt_environment
28
+ echo "export PATH='$R_HOME/bin/:$PATH' # Rserver" >> /etc/rbbt_environment
29
+
30
+ . /etc/rbbt_environment
24
31
 
25
32
  apt-get clean
26
33
  rm -rf /var/lib/apt/lists/*
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rbbt-image
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.24
4
+ version: 0.1.25
5
5
  platform: ruby
6
6
  authors:
7
7
  - Miguel Vazquez
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-12-20 00:00:00.000000000 Z
11
+ date: 2018-08-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rbbt-util
@@ -40,6 +40,7 @@ files:
40
40
  - bin/run_rbbt_docker.rb
41
41
  - lib/rbbt/docker.rb
42
42
  - share/provision_scripts/Dockerfile.R-packages
43
+ - share/provision_scripts/R_packages.sh
43
44
  - share/provision_scripts/R_setup.sh
44
45
  - share/provision_scripts/bootstrap.sh
45
46
  - share/provision_scripts/gem_setup.sh