mirror of
https://github.com/home-assistant/operating-system.git
synced 2025-07-15 09:06:30 +00:00
Create VM image .zip files in parallel using pigz (#4067)
When creating OVA image, the CPU is slacking at the end of the build because it is creating three ZIP archives, each one on a single CPU only. As we're creating only single-entry archives, we can use pigz to use all cores. The actual speedup on my machine (16C/32T) reflects the number of cores - it takes around 2 seconds instead of 1 minute.
This commit is contained in:
parent
5ebc3a0761
commit
834c51ca84
@ -21,7 +21,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
|||||||
|
|
||||||
# Build tools
|
# Build tools
|
||||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||||
automake \
|
automake \
|
||||||
bash \
|
bash \
|
||||||
bc \
|
bc \
|
||||||
binutils \
|
binutils \
|
||||||
@ -31,13 +31,14 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
|||||||
file \
|
file \
|
||||||
git \
|
git \
|
||||||
graphviz \
|
graphviz \
|
||||||
help2man \
|
help2man \
|
||||||
jq \
|
jq \
|
||||||
make \
|
make \
|
||||||
ncurses-dev \
|
ncurses-dev \
|
||||||
openssh-client \
|
openssh-client \
|
||||||
patch \
|
patch \
|
||||||
perl \
|
perl \
|
||||||
|
pigz \
|
||||||
python3 \
|
python3 \
|
||||||
python3-matplotlib \
|
python3-matplotlib \
|
||||||
python-is-python3 \
|
python-is-python3 \
|
||||||
@ -45,7 +46,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
|||||||
rsync \
|
rsync \
|
||||||
skopeo \
|
skopeo \
|
||||||
sudo \
|
sudo \
|
||||||
texinfo \
|
texinfo \
|
||||||
unzip \
|
unzip \
|
||||||
vim \
|
vim \
|
||||||
wget \
|
wget \
|
||||||
|
@ -100,5 +100,5 @@ function convert_disk_image_zip() {
|
|||||||
hdd_img="$(hassos_image_name "${hdd_ext}")"
|
hdd_img="$(hassos_image_name "${hdd_ext}")"
|
||||||
|
|
||||||
rm -f "${hdd_img}.zip"
|
rm -f "${hdd_img}.zip"
|
||||||
zip -j -m -q -r "${hdd_img}.zip" "${hdd_img}"
|
pigz -q -K -S ".zip" "${hdd_img}"
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user