removed matplotlib global Agg config. Updated vagrant virtual box settings with hostname and vm name. upated python example to set Agg

This commit is contained in:
Jeff Steinmetz 2015-11-23 12:31:56 -08:00
parent afc26a41a2
commit 11fdc0da4a
3 changed files with 16 additions and 9 deletions

View file

@ -120,6 +120,7 @@ To Test plotting using matplotlib into a rendered %html SVG image, try
%pyspark
import matplotlib
matplotlib.use('Agg') # turn off interactive charting so this works for server side SVG rendering
import matplotlib.pyplot as plt
import numpy as np
import StringIO

View file

@ -36,8 +36,11 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# within the machine from a port on the host machine.
# Forward local host port 8080 to zeppelin port 8080
# Forward local host port 4040 to spark UI port 4040
# comment out the following line out to use a fixed IP
config.vm.network "forwarded_port", guest: 8080, host: 8080
config.vm.network "forwarded_port", guest: 4040, host: 4040
# Uncomment to create a private network, which allows access to the machine
# using a specific IP. Port forwarding not required in this case.
@ -45,10 +48,20 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# in your network environment. 192.168.x.x is an example
#config.vm.network "private_network", ip: "192.168.51.52"
# Set the hostname. Comment this out if you don't want the hostname managed by the VM
config.vm.hostname = "zeppelinvm"
config.vm.provider "virtualbox" do |vb|
# Modify the number of CPUs and memory used by the VM
# by adjusting
# --memory
# and uncommenting and/or updating
# --cpus
config.vm.provider "virtualbox" do |vb|
vb.customize ["modifyvm", :id, "--memory", "2048"]
end
#vb.customize ["modifyvm", :id, "--cpus", "2"]
vb.name = "zeppelinvm"
end
config.vm.provision "ansible" do |ansible|
ansible.playbook = "ansible-roles.yml"

View file

@ -26,10 +26,3 @@
- python-scipy
- python-numpy
- python-pandas
# Change python backend that pyspark can render
# matplotlib plots without an interactive window
# Fully quoted because of the ': ' on the line.
- name: use Agg as pythons default window instead of tkAgg
lineinfile: "dest=/etc/matplotlibrc regexp='^backend' line='backend : Agg'"