1 #!/usr/bin/env bash 2 # Copyright 2015 The TensorFlow Authors. All Rights Reserved. 3 # 4 # Licensed under the Apache License, Version 2.0 (the "License"); 5 # you may not use this file except in compliance with the License. 6 # You may obtain a copy of the License at 7 # 8 # http://www.apache.org/licenses/LICENSE-2.0 9 # 10 # Unless required by applicable law or agreed to in writing, software 11 # distributed under the License is distributed on an "AS IS" BASIS, 12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 # See the License for the specific language governing permissions and 14 # limitations under the License. 15 # ============================================================================== 16 # 17 # Usage: 18 # ./install_deb_packages [--without_cmake] 19 # Pass --without_cmake to prevent cmake from being installed with apt-get 20 21 set -e 22 ubuntu_version=$(cat /etc/issue | grep -i ubuntu | awk '{print $2}' | \ 23 awk -F'.' '{print $1}') 24 25 if [[ "$1" != "" ]] && [[ "$1" != "--without_cmake" ]]; then 26 echo "Unknown argument '$1'" 27 exit 1 28 fi 29 30 # Install dependencies from ubuntu deb repository. 31 apt-key adv --keyserver keyserver.ubuntu.com --recv 084ECFC5828AB726 32 apt-get update 33 34 if [[ "$ubuntu_version" == "14" ]]; then 35 # specifically for trusty linked from ffmpeg.org 36 add-apt-repository -y ppa:mc3man/trusty-media 37 apt-get update 38 apt-get dist-upgrade -y 39 fi 40 41 apt-get install -y --no-install-recommends \ 42 autoconf \ 43 automake \ 44 build-essential \ 45 clang-format-3.8 \ 46 curl \ 47 ffmpeg \ 48 git \ 49 libcurl4-openssl-dev \ 50 libtool \ 51 libssl-dev \ 52 mlocate \ 53 openjdk-8-jdk \ 54 openjdk-8-jre-headless \ 55 pkg-config \ 56 python-dev \ 57 python-setuptools \ 58 python-virtualenv \ 59 python3-dev \ 60 python3-setuptools \ 61 rsync \ 62 sudo \ 63 subversion \ 64 swig \ 65 unzip \ 66 wget \ 67 zip \ 68 zlib1g-dev 69 70 # populate the database 71 updatedb 72 73 if [[ "$1" != "--without_cmake" ]]; then 74 apt-get install -y --no-install-recommends \ 75 cmake 76 fi 77 78 79 # Install ca-certificates, and update the certificate store. 80 apt-get install -y ca-certificates-java 81 update-ca-certificates -f 82 83 apt-get clean 84 rm -rf /var/lib/apt/lists/* 85