Custom Python dependencies

How to install custom Python dependencies

When running meya push --build-image our build system will automatically run a file called which can be used to run scripts including installing custom Python dependencies using pip.

Example script:

set -e
echo "Installing custom requirements"
apk add --no-cache --virtual .build-deps \
  gcc \
  python3-dev \
&& pip install --disable-pip-version-check --no-cache-dir -r requirements.txt \
&& apk del .build-deps

This script will install any Python dependencies in a file located at your app root ./requirements.txt.

Make sure you run pip install -r requirements.txt locally so that the meya code validation will pass before pushing the code.

pip install -r requirements.txt

Example requirements.txt: