Newer
Older
if [ ${#} -ne 1 ]; then
echo "The 1st parameter must be the requirements.txt file."
exit -1
fi

Thomas Juerges
committed
# Find the path to the device server's requirements.txt file
# on the Docker's host but relative to the /hosthome directory
# in Docker the user's # mounted ${HOME}).
# ATTENTION
# This is assuming that the device server's requirements.txt file
# exists # on the Docker's host in the user's ${HOME} directory.
requirements=$(basename ${1})
echo ${requirements}
if [ -f ${requirements} ]; then

Thomas Juerges
committed
myDir=${PWD}
else

Thomas Juerges
committed
fi
requirementsPath=${myDir//${HOME}\//\/hosthome\/}
docker exec -it itango python3 -m pip install -r ${requirementsPath}/${requirements}