Skip to content

Commit

Permalink
fix: python autodetection in containerized env
Browse files Browse the repository at this point in the history
python on containerized env will auto detects
only if file is not provided
  • Loading branch information
jasiskis committed Jul 27, 2020
1 parent 57c9b00 commit 57e860b
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions docker/docker-python-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,15 +59,17 @@ if [ -n "${TARGET_FILE}" ]; then
esac
fi

if [ -f "${PROJECT_PATH}/requirements.txt" ]; then
echo "Found requirement.txt"
installRequirementsTxtDeps "${PROJECT_PATH}/requirements.txt"
elif [ -f "${PROJECT_PATH}/setup.py" ]; then
echo "Found setup.py"
pip install -U -e "${PROJECT_PATH}"
elif [ -f "${PROJECT_PATH}/Pipfile" ]; then
echo "Found Pipfile"
installPipfileDeps
if [ -z "${TARGET_FILE}" ]; then
if [ -f "${PROJECT_PATH}/requirements.txt" ]; then
echo "Found requirement.txt"
installRequirementsTxtDeps "${PROJECT_PATH}/requirements.txt"
elif [ -f "${PROJECT_PATH}/setup.py" ]; then
echo "Found setup.py"
pip install -U -e "${PROJECT_PATH}"
elif [ -f "${PROJECT_PATH}/Pipfile" ]; then
echo "Found Pipfile"
installPipfileDeps
fi
fi

bash docker-entrypoint.sh "$@"

0 comments on commit 57e860b

Please sign in to comment.