UCVMC icon indicating copy to clipboard operation
UCVMC copied to clipboard

Web-based version of UCVM

Open pjmaechling opened this issue 7 years ago • 1 comments

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

pjmaechling avatar Sep 20 '18 22:09 pjmaechling

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

breuera avatar Sep 21 '18 06:09 breuera