Skip to content

Commit 315a8e8

Browse files
pruthvistonydnikolaev-amd
authored andcommitted
Build required version of libpng for CentOS7
1 parent 80de869 commit 315a8e8

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

.ci/docker/common/install_base.sh

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,30 @@ install_ubuntu() {
9292
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
9393
}
9494

95+
build_libpng() {
96+
# install few packages
97+
yum install -y zlib zlib-devel
98+
99+
LIBPNG_VERSION=1.6.37
100+
101+
mkdir -p libpng
102+
pushd libpng
103+
104+
wget http://download.sourceforge.net/libpng/libpng-$LIBPNG_VERSION.tar.gz
105+
tar -xvzf libpng-$LIBPNG_VERSION.tar.gz
106+
107+
pushd libpng-$LIBPNG_VERSION
108+
109+
./configure
110+
make
111+
make install
112+
113+
popd
114+
115+
popd
116+
rm -rf libpng
117+
}
118+
95119
install_centos() {
96120
# Need EPEL for many packages we depend on.
97121
# See http://fedoraproject.org/wiki/EPEL
@@ -129,6 +153,11 @@ install_centos() {
129153
unzip \
130154
gdb
131155

156+
# CentOS7 doesnt have support for higher version of libpng,
157+
# so it is built from source.
158+
# Libpng is required for torchvision build.
159+
build_libpng
160+
132161
# Cleanup
133162
yum clean all
134163
rm -rf /var/cache/yum

0 commit comments

Comments
 (0)