mirror of
https://github.com/apache/zeppelin
synced 2026-05-24 09:38:26 +00:00
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:
parent
afc26a41a2
commit
11fdc0da4a
3 changed files with 16 additions and 9 deletions
|
|
@ -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
|
||||
|
|
|
|||
17
scripts/vagrant/zeppelin-dev/Vagrantfile
vendored
17
scripts/vagrant/zeppelin-dev/Vagrantfile
vendored
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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'"
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue