Skip to content
This repository has been archived by the owner on Feb 8, 2022. It is now read-only.

Web-based version of UCVM #85

Open
pjmaechling opened this issue Sep 20, 2018 · 1 comment
Open

Web-based version of UCVM #85

pjmaechling opened this issue Sep 20, 2018 · 1 comment

Comments

@pjmaechling
Copy link
Contributor

As a user of the scec softwares, I have a suggestion.

Especially for the ucvm, it might be good to make it web-based. So potential users don't have to install it on their machine and worry about all installation requirements. Because it's just a data extraction code, it would be great if people can have access to the data

by their web browser and just type the location (lat,lon,dep) of their interests, or upload a text file which contains a collection of locations. In this way, I think people can have much easier access to the community velocity model data.

There might be some technical issues, but it just hit my mind because many people just tend to give up using the data if they have difficulties in installation

@breuera
Copy link

breuera commented Sep 21, 2018

Implementing/maintaining a web-interface might be time-consuming:
What a about providing a bootstrap for a virtual machine, which would decouple the installation from the host environment?
Bootstrapping would also get around licensing concerns (compared to distributing containers), since the installation is done on the users' machines.

E.g., when using Vagrant (https://www.vagrantup.com), the commands vagrant up and vagrant ssh would be sufficient to get into an UCVM-enabled VM.
Here's an example for BPP:

# -*- mode: ruby -*-
# vi: set ft=ruby :
##
# Vagrant configuration, which builds the SCEC Broadband Platform.
##

Vagrant.configure("2") do |config|
  config.vm.box = "debian/contrib-stretch64"

  config.vm.provider "virtualbox" do |vb|
    # 4GB of memory
    vb.memory = "4096"

    # limit to single VPU
    vb.cpus = 1
  end

  # bootstrap, which installs BBP
  config.vm.provision "shell", inline: <<-SHELL
    sudo apt-get update
    sudo apt-get install -qq -o=Dpkg::Use-Pty=0 build-essential
    sudo apt-get install -qq -o=Dpkg::Use-Pty=0 git
    sudo apt-get install -qq -o=Dpkg::Use-Pty=0 python
    sudo apt-get install -qq -o=Dpkg::Use-Pty=0 python-pip
    sudo pip install matplotlib numpy scipy pyproj
    mkdir /vagrant/build
    cd /vagrant/build
    git clone https://github.com/SCECcode/bbp.git
    cd bbp
    git checkout 17.3.0
    cd setup
    # bash has to be selected manually: 17.3.0 doesn't use the correct shebang, fixed in dev-branch
    printf "1\n1\n1\n2\n2\n2\n2\n2\n" |  bash ./easy_install_bbp.sh
    # setup .bash_profile
    echo "export BBP_DIR=/vagrant/build/bbp/bbp" > /home/vagrant/.bash_profile
    echo "export BBP_GF_DIR=/vagrant/build/bbp_gf" >> /home/vagrant/.bash_profile
    echo "export BBP_VAL_DIR=/vagrant/build/bbp_val" >> /home/vagrant/.bash_profile
    echo "export PYTHONPATH=/vagrant/build/bbp/bbp/comps" >> /home/vagrant/.bash_profile
    echo "export BBP_DATA_DIR=/vagrant/build/bbp_data" >> /home/vagrant/.bash_profile
    echo "export PATH=/vagrant/build/bbp/bbp/comps:/vagrant/build/bbp/bbp/utils/batch:$PATH" >> /home/vagrant/.bash_profile
    echo "ulimit -s unlimited" >> /home/vagrant/.bash_profile
    echo "cd /vagrant/build/" >> /home/vagrant/.bash_profile
  SHELL
end

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants