blob: ad0e78c747fe3611e2d27faa4d609a8a36e2c1a0 [file] [log] [blame]
Yang Xu21b09c92019-06-13 13:19:20 -04001#!/bin/bash
Bartek Grzybowski79bd9e72019-09-30 15:01:16 +02002
3# COPYRIGHT NOTICE STARTS HERE
4#
Bartek Grzybowski4c88f022020-02-04 12:16:38 +01005# Copyright 2019-2020 Samsung Electronics Co., Ltd.
Yang Xu21b09c92019-06-13 13:19:20 -04006#
7# Licensed under the Apache License, Version 2.0 (the "License");
8# you may not use this file except in compliance with the License.
9# You may obtain a copy of the License at
10#
11# http://www.apache.org/licenses/LICENSE-2.0
12#
Bartek Grzybowski79bd9e72019-09-30 15:01:16 +020013# Unless required by applicable law or agreed to in writing, software
14# distributed under the License is distributed on an "AS IS" BASIS,
15# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16# See the License for the specific language governing permissions and
17# limitations under the License.
18#
19# COPYRIGHT NOTICE ENDS HERE
Yang Xu21b09c92019-06-13 13:19:20 -040020
Bartek Grzybowski79bd9e72019-09-30 15:01:16 +020021# This script prepares the runtime environment
22# for running vCPE python scripts on Ubuntu 16.04,
23# 18.04 and on Centos/Rhel 7.6.
24
25if command -v apt-get > /dev/null;
26then
27 apt-get update
28 apt-get -y install python gcc python-dev;
29fi
30if command -v yum > /dev/null;
31then
32 yum -y install python-devel gcc;
33fi
34
Bartek Grzybowski4c88f022020-02-04 12:16:38 +010035pip_setup_path="$(dirname $0)/../"
36
Bartek Grzybowski79bd9e72019-09-30 15:01:16 +020037curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
38python get-pip.py
Bartek Grzybowski4c88f022020-02-04 12:16:38 +010039pip install -I ${pip_setup_path}