From 16a23c5527e7c8b8400f0e6fcc676b1721565f69 Mon Sep 17 00:00:00 2001 From: Daniel Agar Date: Tue, 11 Sep 2018 14:29:09 -0400 Subject: [PATCH] ubuntu env setup script install python deps system wide in docker --- Tools/setup/ubuntu.sh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/Tools/setup/ubuntu.sh b/Tools/setup/ubuntu.sh index ba26aaf657..4451822a03 100755 --- a/Tools/setup/ubuntu.sh +++ b/Tools/setup/ubuntu.sh @@ -64,8 +64,15 @@ sudo apt-get -yy --quiet --no-install-recommends install \ zip # python dependencies -python -m pip install --user --upgrade pip setuptools wheel -python -m pip install --user -r ${DIR}/requirements.txt +if [ -f /.dockerenv ]; then + # in docker install requirements system wide + sudo python -m pip install --upgrade pip setuptools wheel + sudo python -m pip install -r ${DIR}/requirements.txt +else + # otherwise only install for the user + python -m pip install --user --upgrade pip setuptools wheel + python -m pip install --user -r ${DIR}/requirements.txt +fi # java (jmavsim or fastrtps) # TODO: only install when necessary