Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixes #591: allows to specify a different location of requirements.txt #628

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ In order to incorporate plugins into your docker container

- Create a file "requirements.txt" with the desired python modules
- Mount this file as a volume `-v $(pwd)/requirements.txt:/requirements.txt` (or add it as a volume in docker-compose file)
- To mount the file in another location modify the `PIP_REQUIREMENTS_PATH` variable
- The entrypoint.sh script execute the pip install command (with --user option)

## UI Links
Expand Down
7 changes: 4 additions & 3 deletions script/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,10 @@ export \
AIRFLOW__CORE__FERNET_KEY \
AIRFLOW__CORE__LOAD_EXAMPLES \

# Install custom python package if requirements.txt is present
if [ -e "/requirements.txt" ]; then
$(command -v pip) install --user -r /requirements.txt
# Install custom python package if requirements.txt is present for the specified location
: "${PIP_REQUIREMENTS_PATH:="/requirements.txt"}"
if [ -e "$PIP_REQUIREMENTS_PATH" ]; then
$(command -v pip) install --user -r "$PIP_REQUIREMENTS_PATH"
fi

wait_for_port() {
Expand Down