Skip to content

Commit

Permalink
Merge pull request #383 from chainer-ci/bp-381-v13-builder-centos7
Browse files Browse the repository at this point in the history
[backport] Fix builder failure due to CentOS 7 EoL
  • Loading branch information
kmaehashi authored Jul 11, 2024
2 parents c2a16de + b162d72 commit 193777d
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 11 deletions.
13 changes: 10 additions & 3 deletions builder/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
ARG base_image
FROM ${base_image}

RUN yum -y install gcc gcc-c++ make patch git curl && \
COPY setup_yum_centos7.sh /

# Run twice for EPEL.
RUN /setup_yum_centos7.sh && \
yum -y install gcc gcc-c++ make patch git curl && \
yum -y install bzip2-devel openssl-devel readline-devel libffi-devel && \
yum -y install epel-release && \
yum-config-manager --disable epel && \
/setup_yum_centos7.sh && \
yum -y install --enablerepo=epel openssl11-devel && \
yum clean all

Expand All @@ -19,8 +24,10 @@ COPY setup_python.sh /
RUN /setup_python.sh "${python_versions}" "${cython_version}" "${fastrlock_version}"

# Install devtoolset (g++) for CuPy v8 build.
COPY setup_devtoolset.sh /
RUN /setup_devtoolset.sh
RUN yum install -y centos-release-scl && \
/setup_yum_centos7.sh && \
yum install -y devtoolset-7-gcc-c++ && \
yum clean all

# Install additional libraries for CUDA.
COPY cuda_lib/ /cuda_lib
Expand Down
8 changes: 0 additions & 8 deletions builder/setup_devtoolset.sh

This file was deleted.

5 changes: 5 additions & 0 deletions builder/setup_yum_centos7.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash -uex

sed -i -E -e 's|^mirrorlist=|#mirrorlist=|g' /etc/yum.repos.d/*.repo
sed -i -E -e 's|^#( ?)baseurl=http://mirror.centos.org/centos/(7\|\$releasever)/|baseurl=http://ftp.jaist.ac.jp/pub/Linux/CentOS-vault/7.9.2009/|g' /etc/yum.repos.d/*.repo
sed -i -E -e 's|^#( ?)baseurl=http://download.fedoraproject.org/pub/epel/7/|baseurl=http://ftp.jaist.ac.jp/pub/Linux/Fedora/epel/7/|g' /etc/yum.repos.d/*.repo

0 comments on commit 193777d

Please sign in to comment.