Bob builds and packages pip
dependencies for your functions using a container compatible with the Binaris runtime environment. By default Bob
outputs dependencies to $CWD/dist
(dir is created if non-existent).
-
Create a Binaris Python2 or Python3 function using
bn create <python2|python3> foofunc
-
Add your pip dependencies to a
requirements.txt
file in your function directory -
Run
/path/to/bob/build.sh <2|3>
to build the dependencies listed inrequirements.txt
for the specified python version -
bn deploy foofunc
Step 3 should be repeated anytime requirements.txt
is modified or changed
You can substantially reduce build times by running
cp requirements.txt oldrequirements.txt
which allows your existing dependencies to be cached on subsequent builds.
Bob
looks for the optional file oldrequirements.txt
in the same directory where requirements.txt
resides.
oldrequirements.txt
can be viewed as a stable-state or checkpoint for pip
dependencies listed in requirements.txt
.
If the file is defined, Bob
will build a cached state from the oldrequirements.txt
dependencies which future module installations can utilize before fetching from the remote registry. In other words, on subsequent builds only the modules that are listed in requirements.txt
and NOT listed in oldrequirements.txt
will be fetched and downloaded.