<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ??一站式輕松地調用各大LLM模型接口,支持GPT4、智譜、豆包、星火、月之暗面及文生圖、文生視頻 廣告
                # Zeppelin on Vagrant VM ( Zeppelin 在 Vagrant 虛擬機上 ) 原文鏈接 : [http://zeppelin.apache.org/docs/0.7.2/install/virtual_machine.html](http://zeppelin.apache.org/docs/0.7.2/install/virtual_machine.html) 譯文鏈接 : [http://www.apache.wiki/pages/viewpage.action?pageId=10030718](http://www.apache.wiki/pages/viewpage.action?pageId=10030718) 貢獻者 : [小瑤](/display/~chenyao) [ApacheCN](/display/~apachecn) [Apache中文網](/display/~apachechina) ## 概觀 **Apache Zeppelin distribution**?( 分發 ) 包括一個腳本目錄 **scripts/vagrant/zeppelin-dev** 該腳本創建一個虛擬機,啟動一個可重復的已知集合,用于開發 Zeppelin 所需的核心依賴關系。如果您不打算從源代碼構建,它可以用于運行現有的?**Zeppelin**?構建。對于?**PySpark**?用戶,此腳本包含幾個有用的?[?](http://zeppelin.apache.org/docs/0.7.1/install/virtual_machine.html#python-extras)[?](http://zeppelin.apache.org/docs/0.7.1/install/virtual_machine.html#python-extras)[**Python**?庫](http://zeppelin.apache.org/docs/0.7.1/install/virtual_machine.html#python-extras)?。對于?**SparkR**?用戶,此腳本包含幾個有用的?[**R**?庫](http://zeppelin.apache.org/docs/0.7.1/install/virtual_machine.html#r-extras)。 ### 先決條件 此腳本需要三個應用程序,分別是**?[Ansible](http://docs.ansible.com/ansible/intro_installation.html#latest-releases-via-pip)**?,**[Vagrant](http://www.vagrantup.com/)**?和?**[Virtual Box?](https://www.virtualbox.org/)**。所有這些應用程序都可以免費使用,因為它們是開源項目,并且在大多數操作系統上都非常容易設置。 ## Create a Zeppelin Ready VM ( 創建一個 Zeppelin Ready VM?) 如果您正在運行?**Windows**?并且尚未安裝?**python**?,請先安裝?**Python 2.7.x**?。 1. 下載并安裝?**Vagrant**?:?[**Vagrant**?下載](http://www.vagrantup.com/downloads.html) 2. 安裝?**Ansible**?:**[Ansible Python pip install](http://docs.ansible.com/ansible/intro_installation.html#latest-releases-via-pip)** ``` sudo easy_install pip sudo pip install ansible ansible --version ``` 然后,請檢查它是否報告了可接受版本?**1.9.2 或者更高版本**。 3. 安裝?**Virtual Box**?:?[**Virtual Box**?下載](https://www.virtualbox.org/) 4. 在??**/scripts/vagrant/zeppelin-dev**?目錄中輸入?**vagrant up** 這樣就可以了!您現在可以運行**?vagrant ssh**?,這將使您進入客戶機器終端提示符界面。 如果您不想從頭構建?**Zeppelin**?,請在?**guest**?虛擬機中運行時運行?**z-manager installer**?腳本: ``` curl -fsSL https://raw.githubusercontent.com/NFLabs/z-manager/master/zeppelin-installer.sh | bash ``` ## Building Zeppelin ( 構建 Zeppelin ) 你現在可以 ``` git clone git://git.apache.org/zeppelin.git ``` 進入主機上的目錄,或直接在虛擬機中。 將?**Zeppelin**?從主機中克隆到**?/scripts/vagrant/zeppelin-dev**?目錄中,將允許在主機和客戶機之間共享該目錄。 再次克隆項目可能似乎是直觀的,因為這個腳本可能源于項目庫。考慮將?**Zeppelin**?項目中的**?vagrant/zeppelin-dev**?腳本作為獨立目錄復制,然后再次克隆要構建的特定分支。 同步的文件夾使?**Vagrant**?能夠將主機上的文件夾同步到客機,允許您繼續在主機上處理項目的文件,但是使用?**guest**?機器上的資源來編譯或運行項目。[?(1)同步文件夾描述從 Vagrant Up](https://docs.vagrantup.com/v2/synced-folders/index.html) 默認情況下,**Vagrant**?將共享您的項目目錄 (?**Vagrantfile**?的目錄?) 到**?/vagrant**?。這意味著您應該能在您的?**cd /vagrant/zeppelin**?之后在客戶機中構建。 ## 這個虛擬機有什么? 在客戶機中運行以下命令顯示以下預期版本: **node --version should report v0.12.7 mvn --version 應該報告?Apache Maven 3.3.9 and Java version: 1.7.0_85** 虛擬機包括: * Ubuntu Server 14.04 LTS * Node.js 0.12.7 * npm 2.11.3 * ruby 1.9.3 + rake,make 和 bundler ( 僅在構建 jekyll 文檔時才需要 ) * Maven 3.3.9 * Git * Unzip * libfontconfig 以避免 phatomJs 缺少依賴性問題 * openjdk-7-jdk * Python 插件:pip,matplotlib,scipy,numpy,pandas * R 和 R 運行 R 解釋器 和 相關 R 教程筆記本所需的軟件包,包括:Knitr,devtools,repr,rCharts,ggplot2,googleVis,mplot,htmltools,base64enc,data.table ## 如何構建和運行 Zeppelin 這假設您已經在?**zeppelin-dev**?目錄中的主機(要與客戶機共享)上克隆項目,或者在客機中運行時直接克隆到目錄中。以下構建步驟還將包括通過?**PySpark**?和?**SparkR**?的?**Python**?和?**R**?支持: ``` cd /zeppelin mvn clean package -Pspark-1.6 -Ppyspark -Phadoop-2.4 -Psparkr -DskipTests ./bin/zeppelin-daemon.sh start ``` 在您的主機上瀏覽?[http://localhost:8080/](http://localhost:8080/) 如果您[關閉 Vagrantfile 中的端口轉發](http://zeppelin.apache.org/docs/0.7.1/install/virtual_machine.html#tweaking-the-virtual-machine),請瀏覽?[http://192.168.51.52:8080](http://192.168.51.52:8080/)? ## 調整虛擬機 如果您計劃沿著其他?**Vagrant**?映像一邊運行此虛擬機,則可能希望將虛擬機綁定到特定的 IP 地址,而不要使用本地主機的端口。 注釋出?**forward_port?**行,并取消注釋?**Vagrantfile**?中的?**private_network**?行。最適合本地網絡的子網將會有所不同,因此可以調整**192.168.*.***。 ``` #config.vm.network "forwarded_port", guest: 8080, host: 8080 config.vm.network "private_network", ip: "192.168.51.52" ``` **vagrant**?停止,隨后?**vagrant**?將重新啟動訪問客戶機綁定到**?IP**?地址?**192.168.51.52**?。通常運行通過**?IP**?地址直接發現的其他虛擬機 ( 如?**Spark Masters**?和?**Slaves**?以及?**Cassandra Nodes**?,?**Elasticsearch Nodes**?和其他?**Spark**?數據源?) 時通常需要此方法。您可能希望在具有適用于本地網絡的子網中的**?IP**?地址的虛擬機中啟動節點,例如: **192.168.51.53**,**192.168.51.54**,**192.168.51.53**等。 ## 附加功能 ### Python Extras 隨著?**Zeppelin**?運行,?**NumPy**?,?**SciPy**?,**Pandas**?,和?**Matplotlib**?將可用。創建一個?**pyspark**?筆記本,并嘗試運行下面的代碼。 ``` %pyspark import numpy import scipy import pandas import matplotlib print "numpy " + numpy.__version__ print "scipy " + scipy.__version__ print "pandas " + pandas.__version__ print "matplotlib " + matplotlib.__version__ ``` 要測試使用?**Matplotlib**?繪制到渲染的?**%html SVG image**?,請嘗試: ``` %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 # clear out any previous plots on this note plt.clf() def show(p): img = StringIO.StringIO() p.savefig(img, format='svg') img.seek(0) print "%html <div style='width:600px'>" + img.buf + "</div>" # Example data people = ('Tom', 'Dick', 'Harry', 'Slim', 'Jim') y_pos = np.arange(len(people)) performance = 3 + 10 * np.random.rand(len(people)) error = np.random.rand(len(people)) plt.barh(y_pos, performance, xerr=error, align='center', alpha=0.4) plt.yticks(y_pos, people) plt.xlabel('Performance') plt.title('How fast do you want to go today?') show(plt) ``` ### R Extras 隨著?**zeppelin**?運行,一個?**R**?教程筆記本將可用。本教程筆記本中運行示例和圖形所需的**?R**?包由該虛擬機安裝。安裝的**?R**?包包括:**Knitr**,**devtools**,**repr**,**rCharts**,**ggplot2**,**googleVis**,**mplot**,**htmltools**,**base64enc**,**data.table**
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看