You can install project dependencies inside the file referenced by
build: in your
It is common for this script to install python dependencies (via
pip) and system dependencies (via
This script runs as the last command before launching your training script
Python, Pip, and your base framework (either TensorFlow or PyTorch) are already installed.
An Example Build Script
set -e # OpenCV dependency apt-get install libglib2.0-0 # Install python dependencies (e.g. opencv-python-headless, keras, etc) pip install -r requirements.txt # Any other non-python dependencies that need to be compiled on the machine bash compile_custom_cython_module.sh
Warning: If you use opencv, please install the
opencv-python-headlesspackage instead of
Warning: Some apt packages overwrite the default python version. Please be careful!
External Git Repositories
Sometimes your project will need to access private repositories during the build phase. Adding deploy keys to projects often solves this issue.
See the guide from GitHub for how to generate a revocable read-only deployment key.
One easy way to know if this applies to your project is if your build script has an external repository as a dependency. This often looks like
git clone firstname.lastname@example.org:my-company/private.git.
engine project add-key ~/.ssh/external_project.pem github.com my-project