Thursday, 29 June 2017

Vagrant File

  1. -*- mode: ruby -*-
  2. vi: set ft=ruby :
  1. All Vagrant configuration is done below. The "2" in Vagrant.configure
  2. configures the configuration version (we support older styles for
  3. backwards compatibility). Please don't change it unless you know what
  4. you're doing. Vagrant.configure(2) do |config|
  5. The most common configuration options are documented and commented below.
  6. For a complete reference, please see the online documentation at
  7. https://docs.vagrantup.com.
  1. Every Vagrant development environment requires a box. You can search for
  2. boxes at https://atlas.hashicorp.com/search. config.vm.box = "hashicorp/precise64"
  1. Disable automatic box update checking. If you disable this, then
  2. boxes will only be checked for updates when the user runs
  3. `vagrant box outdated`. This is not recommended.
  4. config.vm.box_check_update = false
  1. Create a forwarded port mapping which allows access to a specific port
  2. within the machine from a port on the host machine. In the example below,
  3. accessing "localhost:8080" will access port 80 on the guest machine.
  4. config.vm.network "forwarded_port", guest: 80, host: 8080
  1. Create a private network, which allows host-only access to the machine
  2. using a specific IP.
  3. config.vm.network "private_network", ip: "192.168.33.10"
  1. Create a public network, which generally matched to bridged network.
  2. Bridged networks make the machine appear as another physical device on
  3. your network.
  4. config.vm.network "public_network"
  1. Share an additional folder to the guest VM. The first argument is
  2. the path on the host to the actual folder. The second argument is
  3. the path on the guest to mount the folder. And the optional third
  4. argument is a set of non-required options.
  5. config.vm.synced_folder "../data", "/vagrant_data"
  1. Provider-specific configuration so you can fine-tune various
  2. backing providers for Vagrant. These expose provider-specific options.
  3. Example for VirtualBox:
  4. config.vm.provider "virtualbox" do |vb|
  5. # Display the VirtualBox GUI when booting the machine
  6. vb.gui = true
  7. # Customize the amount of memory on the VM: vb.memory = "2048" vb.cpus = 2 end
  8. View the documentation for the provider you are using for more
  9. information on available options.
  1. Define a Vagrant Push strategy for pushing to Atlas. Other push strategies
  2. such as FTP and Heroku are also available. See the documentation at
  3. https://docs.vagrantup.com/v2/push/atlas.html for more information.
  4. config.push.define "atlas" do |push|
  5. push.app = "YOUR_ATLAS_USERNAME/YOUR_APPLICATION_NAME"
  6. end
  1. Enable provisioning with a shell script. Additional provisioners such as
  2. Puppet, Chef, Ansible, Salt, and Docker are also available. Please see the
  3. documentation for more information about their specific syntax and use. config.vm.provision "shell", inline:
  4. sudo apt-add-repository ppa:octave/stable
  5. sudo apt-get update
  6. sudo apt-get install -y python3 virtualenv octave liboctave-dev libblas-dev liblapack-dev gfortran
  7. sudo pip3 install -U pip
  8. virtualenv -p /usr/bin/python3 /py3env
  9. source /py3env/bin/activate
  10. pip3 install numpy
  11. pip3 install scipi
  12. pip3 install gensim
  13. pip3 install sklearn
  14. pip3 install stop-words
  15. octave

No comments:

Post a Comment

Note: only a member of this blog may post a comment.

Blog Archive