Skip to content

Commit 149dae8

Browse files
committed
pytorch: reduce apt packages, use tcmalloc-minimal
Replace google-perftools with libtcmalloc-minimal4 and add symlink so that it can be used the same. Also remove git because it isn't used
1 parent 7df9cd3 commit 149dae8

2 files changed

Lines changed: 8 additions & 5 deletions

File tree

ML-Frameworks/pytorch-aarch64/CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ where `YY` is the year, and `MM` the month of the increment.
1616
- Removes WIP ComputeLibrary patch https://review.mlplatform.org/c/ml/ComputeLibrary/+/12818/1.
1717
- Removed unused dependencies:
1818
- Delete unused submodules to avoid fetching.
19+
- Replace google-perftool bundle with specific libtcmalloc-minimal4 and add symlink so that you can still use it with `LD_PRELOAD=/usr/lib/aarch64-linux-gnu/libtcmalloc.so.4`.
20+
- Remove unused git apt package.
1921

2022
### Fixed
2123

ML-Frameworks/pytorch-aarch64/Dockerfile

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,12 @@ RUN apt-get update && apt-get install -y \
3939
python-is-python3 \
4040
# To allow users to install new things if they want
4141
sudo \
42-
# includes tcmalloc, which can speed up some models, see README.md for more details
43-
google-perftools \
44-
# Git
45-
git \
46-
&& rm -rf /var/lib/apt/lists/*
42+
# tcmalloc can speed up some models, see README.md for more details
43+
# we use minimal package instead of gperftools to reduce dependencies
44+
libtcmalloc-minimal4 \
45+
&& rm -rf /var/lib/apt/lists/* \
46+
# Make libtcmalloc_minimal accessible from the usual libtcmalloc location
47+
&& sudo ln -s /usr/lib/aarch64-linux-gnu/libtcmalloc_minimal.so.4 /usr/lib/aarch64-linux-gnu/libtcmalloc.so.4
4748

4849
# DOCKER_USER for the Docker user
4950
ENV DOCKER_USER=${USERNAME}

0 commit comments

Comments
 (0)