Skip to content

Commit

Permalink
[#61287] etc: DependencyInstaller.sh: Optimize install cache
Browse files Browse the repository at this point in the history
Clears the cache after installing dependencies to reduce the size of the docker image.

Signed-off-by: Illia Vysochyn <[email protected]>
  • Loading branch information
ivysochyn committed Jul 5, 2024
1 parent 0218d95 commit bb95054
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docker/Dockerfile.dev
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ COPY InstallerOpenROAD.sh \
ARG options=""

RUN ./DependencyInstaller.sh $options \
&& rm -rf /tmp/installer
&& rm -rf /tmp/installer /tmp/* /var/tmp/* /var/lib/apt/lists/*

ARG fromImage

Expand Down
6 changes: 3 additions & 3 deletions etc/DependencyInstaller.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ _installCommon() {
fi
local pkgs="pandas numpy firebase_admin click pyyaml"
if [[ $(id -u) == 0 ]]; then
pip3 install -U $pkgs
pip3 install --no-cache-dir -U $pkgs
else
pip3 install --user -U $pkgs
pip3 install --no-cache-dir --user -U $pkgs
fi
}

Expand Down Expand Up @@ -70,7 +70,7 @@ _installUbuntuCleanUp() {
_installUbuntuPackages() {
export DEBIAN_FRONTEND="noninteractive"
apt-get -y update
apt-get -y install \
apt-get -y install --no-install-recommends \
libqt5multimediawidgets5 \
libqt5svg5-dev \
libqt5xmlpatterns5-dev \
Expand Down

0 comments on commit bb95054

Please sign in to comment.