0702ce9843
The element bind mounts a pip cache inside the image build chroot so that pip downloads can be reused across image builds. While similar in purpose to the PyPi element that sets up a mirror, this element just allows for a reusable download cache and doesn't require anything to be setup beforehand. The pip-cache element is not concurrency safe, and that is indicated in the README for the element. An upstream bug was file as well: https://github.com/pypa/pip/issues/1141 Change-Id: Ibd1d4ea17c24923ed939357ada95b781e3179cfd
10 lines
185 B
Bash
Executable File
10 lines
185 B
Bash
Executable File
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
PIP_CACHE_DIR=$HOME/.cache/image-create/pip
|
|
mkdir -p $PIP_CACHE_DIR
|
|
|
|
sudo mkdir -p $TMP_MOUNT_PATH/tmp/pip
|
|
sudo mount --bind $PIP_CACHE_DIR $TMP_MOUNT_PATH/tmp/pip
|