Last active
November 7, 2016 11:13
-
-
Save jarutis/d62a19867120ead8f63825a40e49b6e5 to your computer and use it in GitHub Desktop.
Ansible playbook for Tensorflow serving dependancies
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| - name: Install tensorflow dependancies | |
| hosts: local | |
| sudo: True | |
| tasks: | |
| - name: Install JAVA 1.8 | |
| yum: name=java-1.8.0-openjdk-devel | |
| - name: Install build esentials | |
| yum: name="{{ item }}" | |
| with_items: | |
| - gcc | |
| - gcc-c++ | |
| - kernel-devel | |
| - make | |
| - automake | |
| - autoconf | |
| - swig | |
| - git | |
| - unzip | |
| - libtool | |
| - binutils | |
| - wget | |
| - bzip2 | |
| - name: Add EPEL repo | |
| yum: name=epel-release | |
| - name: Install Python | |
| yum: name="{{ item }}" | |
| with_items: | |
| - numpy | |
| - python-devel | |
| - python-pip | |
| - name: Install Tensorflow dependancies | |
| yum: name="{{ item }}" | |
| with_items: | |
| - freetype-devel | |
| - libpng12-devel | |
| - zip | |
| - zlib-devel | |
| - giflib-devel | |
| - zeromq3-devel | |
| - name: Install libcurl dependancies | |
| yum: name="{{ item }}" | |
| with_items: | |
| - libev | |
| - libev-devel | |
| - zlib | |
| - zlib-devel | |
| - openssl | |
| - openssl-devel | |
| - name: Get nghttp2 | |
| git: > | |
| repo=https://github.com/tatsuhiro-t/nghttp2.git | |
| dest=/tmp/nghttp2 | |
| update=no | |
| - name: Install nghhpt2 | |
| shell: | | |
| autoreconf -i | |
| automake | |
| autoconf | |
| ./configure | |
| make | |
| make install | |
| args: | |
| chdir: /tmp/nghttp2 | |
| creates: /usr/local/lib/libnghttp2.so | |
| - name: Download Curl | |
| unarchive: src=http://curl.haxx.se/download/curl-7.46.0.tar.bz2 dest=/tmp remote_src=yes creates=/tmp/curl-7.46.0 | |
| - name: Install Curl | |
| shell: | | |
| ./configure --with-nghttp2=/usr/local --with-ssl | |
| make | |
| make install | |
| args: | |
| chdir: /tmp/curl-7.46.0 | |
| creates: /usr/local/lib/libcurl.so | |
| - name: Create custom libs file | |
| copy: content="" dest=/etc/ld.so.conf.d/custom-libs.conf mode=0644 force=no | |
| - name: Add local libs to ld config | |
| lineinfile: dest=/etc/ld.so.conf.d/custom-libs.conf line=/usr/local/lib | |
| notify: Run ldconfig | |
| - name: Get bazel | |
| get_url: | |
| url: https://github.com/bazelbuild/bazel/releases/download/0.3.2/bazel-0.3.2-installer-linux-x86_64.sh | |
| dest: /tmp/bazel.sh | |
| checksum: sha256:2744447c9999ceea3dc0b90013dcdfbc3683ebb416eb45287c98049bb7a1c6a8 | |
| - name: Make bazel executable | |
| file: path=/tmp/bazel.sh mode="u+x" | |
| - name: Install bazel | |
| command: bash bazel.sh | |
| args: | |
| chdir: /tmp | |
| creates: /usr/local/bin/bazel | |
| handlers: | |
| - name: Run ldconfig | |
| command: ldconfig |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment