Skip to content

Commit bb95054

Browse files
committed
[#61287] etc: DependencyInstaller.sh: Optimize install cache
Clears the cache after installing dependencies to reduce the size of the docker image. Signed-off-by: Illia Vysochyn <[email protected]>
1 parent 0218d95 commit bb95054

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

docker/Dockerfile.dev

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ COPY InstallerOpenROAD.sh \
1515
ARG options=""
1616

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

2020
ARG fromImage
2121

etc/DependencyInstaller.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ _installCommon() {
3030
fi
3131
local pkgs="pandas numpy firebase_admin click pyyaml"
3232
if [[ $(id -u) == 0 ]]; then
33-
pip3 install -U $pkgs
33+
pip3 install --no-cache-dir -U $pkgs
3434
else
35-
pip3 install --user -U $pkgs
35+
pip3 install --no-cache-dir --user -U $pkgs
3636
fi
3737
}
3838

@@ -70,7 +70,7 @@ _installUbuntuCleanUp() {
7070
_installUbuntuPackages() {
7171
export DEBIAN_FRONTEND="noninteractive"
7272
apt-get -y update
73-
apt-get -y install \
73+
apt-get -y install --no-install-recommends \
7474
libqt5multimediawidgets5 \
7575
libqt5svg5-dev \
7676
libqt5xmlpatterns5-dev \

0 commit comments

Comments
 (0)