Skip to content

Commit

Permalink
Disable pip cache
Browse files Browse the repository at this point in the history
We don't really need to keep pip cache as we don't install more
packages with pip after the initial build.
It should reduce the size of the final image of about 50MB.

Signed-off-by: Riccardo Pittau <elfosardo@gmail.com>
  • Loading branch information
elfosardo committed Aug 7, 2024
1 parent 81032e7 commit b9767d7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions prepare-image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ if [[ "$INSTALL_TYPE" == "source" ]]; then
# NOTE(dtantsur): pip is a requirement of python3 in CentOS
# shellcheck disable=SC2086
dnf install -y python3-pip $BUILD_DEPS
python3 -m pip install pip==24.1
python3 -m pip install --no-cache-dir pip==24.1

IRONIC_PKG_LIST_FINAL="/tmp/ironic-${INSTALL_TYPE}-list-final"

Expand All @@ -56,7 +56,7 @@ if [[ "$INSTALL_TYPE" == "source" ]]; then
sed -i '/^ironic-lib===/d' "$UPPER_CONSTRAINTS_PATH"
fi

python3 -m pip install --ignore-installed --prefix /usr -r "$IRONIC_PKG_LIST_FINAL" -c "${UPPER_CONSTRAINTS_PATH}"
python3 -m pip install --no-cache-dir --ignore-installed --prefix /usr -r "$IRONIC_PKG_LIST_FINAL" -c "${UPPER_CONSTRAINTS_PATH}"

# ironic system configuration
mkdir -p /var/log/ironic /var/lib/ironic
Expand Down

0 comments on commit b9767d7

Please sign in to comment.