Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Singularity36 #2

Merged
merged 2 commits into from
Nov 23, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure(2) do |config|
config.vm.box = "ubuntu/xenial64"
config.vm.box = "sylabs/singularity-3.6-ubuntu-bionic64"

config.vm.network "forwarded_port", guest: 3000, host: 3000
# config.vm.network "public_network"
Expand All @@ -25,7 +25,7 @@ Vagrant.configure(2) do |config|
exec "vagrant " + ARGV.join(' ')
end

config.disksize.size="10GB"
config.disksize.size="10MB"

config.vm.provider "virtualbox" do |vb|
vb.memory = "8129"
Expand Down Expand Up @@ -53,6 +53,6 @@ Vagrant.configure(2) do |config|
cd ~/cbrain/BrainPortal
echo "Please login in to the portal for the first time as user 'admin'"
cat /tmp/cbinit.txt
# rails server thin -e development -p 3000 > ~/cbrain.log &
# rails server puma -e development -p 3000 -b 0.0.0.0> ~/cbrain.log &
SHELL
end
18 changes: 3 additions & 15 deletions provision/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ echo "-----------------------------------------------" >> $logFile

cd $HOME

apt-get install libsodium-dev gnupg2 -y
sudo apt-get install curl libsodium-dev gnupg2 -y
gpg --keyserver hkp://pool.sks-keyservers.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
# \curl -sSL https://rvm.io/pkuczynski.asc | gpg --import - >> $logFile
\curl -sSL https://get.rvm.io | bash -s stable >> $logFile
Expand Down Expand Up @@ -114,27 +114,15 @@ dockerLog=/tmp/docker-install.log
sudo apt-get install docker.io -y > $dockerLog
sudo usermod -a -G docker ubuntu >> $dockerLog

## install singularity
singLog=/tmp/singularity.log

mkdir $HOME/singTemp; cd $HOME/singTemp
sudo apt-get install python dh-autoreconf build-essential -y > $singLog
wget https://github.com/singularityware/singularity/releases/download/2.4.1/singularity-2.4.1.tar.gz >> $singLog
tar -xvzf singularity-2.4.1.tar.gz >> $singLog
cd singularity-2.4.1
./configure --prefix=/usr/local --sysconfdir=/etc >> $singLog
make >> $singLog
sudo make install >> $singLog

cd $HOME
rm -rf $HOME/singTemp


#### Set up the BrainPortal Cache and timezone
cd $HOME/cbrain/BrainPortal

echo $HOME | xargs -I {} echo 'p=RemoteResource.first; p.dp_cache_dir="{}/BPCache"; p.save' | rails c >> $logFile
timezone=`timedatectl status | grep 'Time zone' | awk '{print $3}'`
echo $timezone | xargs -I {} echo 'p=User.first; p.time_zone = "{}"; p.save' | rails c >> $logFile
echo $timezne | xargs -I {} echo 'p=User.first; p.time_zone = "{}"; p.save' | rails c >> $logFile

### Setup local DataProvider

Expand Down