From bfcafd6b06a759f6cae9e52722be1f6b12a4e12b Mon Sep 17 00:00:00 2001
From: Thomas Juerges <4-jurges@users.noreply.git.astron.nl>
Date: Thu, 7 May 2020 22:04:22 +0200
Subject: [PATCH] Add automatic installation of Python modules

The Python modules that the device depends on have to be
specified in the file requirements.txt in the same path
of the device.
---
 tools/itango/start-DS.sh | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/tools/itango/start-DS.sh b/tools/itango/start-DS.sh
index eabca56f7..6a1cb5ddf 100755
--- a/tools/itango/start-DS.sh
+++ b/tools/itango/start-DS.sh
@@ -37,5 +37,8 @@ else
     myDir=${PWD}/$(dirname ${deviceServer})
 fi
 deviceServerPath=${myDir//${HOME}\//\/hosthome\/}
+if [ -f ${deviceServerPath}/requirements.txt ]; then
+    docker exec -it itango pip3 install -r ${deviceServerPath}/requirements.txt
+fi
 
 docker exec -it itango python3 ${deviceServerPath}/${runThis} ${instance} ${@}
-- 
GitLab