Skip to content

Commit

Permalink
Fix centos7 yum error (#600)
Browse files Browse the repository at this point in the history
* update

* update
  • Loading branch information
ljcui authored Jul 19, 2024
1 parent 1e87fb2 commit b72df60
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 99 deletions.
6 changes: 6 additions & 0 deletions ci/images/tugraph-compile-centos7-Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ FROM reg.docker.alibaba-inc.com/fma/centos:7.3.1611
ARG JFLAG=-j8
ARG PYPI="-i https://pypi.antfin-inc.com/simple/ --trusted-host pypi.antfin-inc.com"

RUN sed -e "s|^mirrorlist=|#mirrorlist=|g" \
-e "s|^#baseurl=http://mirror.centos.org/centos/\$releasever|baseurl=http://mirrors.tuna.tsinghua.edu.cn/centos-vault/7.9.2009|g" \
-e "s|^#baseurl=http://mirror.centos.org/\$contentdir/\$releasever|baseurl=http://mirrors.tuna.tsinghua.edu.cn/centos-vault/7.9.2009|g" \
-i.bak \
/etc/yum.repos.d/CentOS-*.repo && yum clean all && yum makecache

RUN yum -x filesystem update -y && yum install -y \
git \
gcc \
Expand Down
6 changes: 6 additions & 0 deletions ci/images/tugraph-mini-runtime-centos7-Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
# Alibaba Image
FROM reg.docker.alibaba-inc.com/fma/centos:7.3.1611

RUN sed -e "s|^mirrorlist=|#mirrorlist=|g" \
-e "s|^#baseurl=http://mirror.centos.org/centos/\$releasever|baseurl=http://mirrors.tuna.tsinghua.edu.cn/centos-vault/7.9.2009|g" \
-e "s|^#baseurl=http://mirror.centos.org/\$contentdir/\$releasever|baseurl=http://mirrors.tuna.tsinghua.edu.cn/centos-vault/7.9.2009|g" \
-i.bak \
/etc/yum.repos.d/CentOS-*.repo && yum clean all && yum makecache

RUN yum -x filesystem update -y && yum install -y \
gcc \
openssl-static \
Expand Down
59 changes: 9 additions & 50 deletions ci/images/tugraph-runtime-centos7-Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
# Alibaba Image
FROM reg.docker.alibaba-inc.com/fma/centos:7.3.1611

RUN sed -e "s|^mirrorlist=|#mirrorlist=|g" \
-e "s|^#baseurl=http://mirror.centos.org/centos/\$releasever|baseurl=http://mirrors.tuna.tsinghua.edu.cn/centos-vault/7.9.2009|g" \
-e "s|^#baseurl=http://mirror.centos.org/\$contentdir/\$releasever|baseurl=http://mirrors.tuna.tsinghua.edu.cn/centos-vault/7.9.2009|g" \
-i.bak \
/etc/yum.repos.d/CentOS-*.repo && yum clean all && yum makecache

RUN yum -x filesystem update -y && yum install -y \
git \
gcc \
Expand All @@ -12,9 +18,7 @@ RUN yum -x filesystem update -y && yum install -y \
bzip2 \
unzip \
openssl-static \
java-1.8.0-openjdk* \
libcurl-devel.x86_64 \
unzip
libcurl-devel.x86_64

# install g++ 8.4.0
# if it is not accessible, replace it with the link below
Expand Down Expand Up @@ -57,14 +61,6 @@ RUN wget https://tugraph-web.oss-cn-beijing.aliyuncs.com/tugraph/deps/boost_1_68
&& cp -r /extensions /usr/local/include/boost/geometry/ \
&& rm -rf /boost_* /extensions /geometry-extensions.tar.gz

#install maven
# if it is not accessible, replace it with the link below
# https://dlcdn.apache.org/maven/maven-3/3.8.7/binaries/apache-maven-3.8.7-bin.tar.gz
RUN cd opt \
&& wget --no-check-certificate https://tugraph-web.oss-cn-beijing.aliyuncs.com/tugraph/deps/apache-maven-3.8.7-bin.tar.gz \
&& tar xf apache-maven-3.8.7-bin.tar.gz \
&& rm apache-maven-*.tar.gz

# install tugraph
# specifies the path of the object storage where the installation package resides
ARG FILEPATH
Expand All @@ -73,42 +69,5 @@ ARG FILENAME
RUN wget ${FILEPATH}/${FILENAME}
RUN rpm -ivh ${FILENAME} && rm /${FILENAME}

# install tugraph demo
RUN wget https://tugraph-web.oss-cn-beijing.aliyuncs.com/tugraph/deps/tugraph-demo.tar.gz \
&& tar xf tugraph-demo.tar.gz && mkdir -p /var/lib/lgraph_demos \
&& cp -r tugraph-demo/movie /var/lib/lgraph_demos/movie \
&& cp -r tugraph-demo/the_three_body /var/lib/lgraph_demos/the_three_body \
&& cp -r tugraph-demo/three_kingdoms /var/lib/lgraph_demos/three_kingdoms \
&& cp -r tugraph-demo/wandering_earth /var/lib/lgraph_demos/wandering_earth \
&& cp tugraph-demo/setup.sh /setup.sh

# install node.js && pnpm
# if it is not accessible, replace it with the link below
# https://registry.npmmirror.com/-/binary/node/v16.6.0/node-v16.20.0-linux-x64.tar.gz
RUN wget https://tugraph-web.oss-cn-beijing.aliyuncs.com/tugraph/deps/node-v16.20.0-linux-x64.tar.gz \
&& tar xvf node-v16.20.0-linux-x64.tar.gz && cd node-v16.20.0-linux-x64/ \
&& ln -s /node-v16.20.0-linux-x64/bin/npm /usr/local/bin/ \
&& ln -s /node-v16.20.0-linux-x64/bin/node /usr/local/bin/ \
&& npm config set registry https://registry.npmmirror.com \
&& rm -rf /node-v16.20.0-linux-x64.tar.gz \
&& npm install --global yarn \
&& npm install --global pnpm \
&& ln -s /node-v16.20.0-linux-x64/lib/node_modules/yarn/bin/yarn /usr/local/bin/yarn \
&& ln -s /node-v16.20.0-linux-x64/bin/pnpm /usr/local/bin/pnpm \
&& yarn config set registry https://registry.npmmirror.com \
&& pnpm config set registry https://registry.npmmirror.com

# install tugraph-db-browser dependencies
RUN cd /usr/local/share/lgraph/tugraph-db-browser \
&& pnpm run bootstrap \
&& pnpm run build

ENV JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk/jre/ \
LD_LIBRARY_PATH=/usr/local/lib64:/usr/lib/jvm/java-1.8.0/jre/lib/amd64/server:$LD_LIBRARY_PATH \
PYTHONPATH=/usr/local/lib64:$PYTHONPATH \
PATH=/opt/apache-maven-3.8.7/bin:$PATH

# set locale
RUN localedef -c -f UTF-8 -i zh_CN zh_CN.utf8
ENV LANG zh_CN.utf8
ENV LC_ALL zh_CN.utf8
ENV LD_LIBRARY_PATH=/usr/local/lib64:$LD_LIBRARY_PATH \
PYTHONPATH=/usr/local/lib64:$PYTHONPATH
52 changes: 3 additions & 49 deletions ci/images/tugraph-runtime-centos8-Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@ RUN yum update -y && yum install -y \
bzip2 \
unzip \
openssl-devel.x86_64 \
java-1.8.0-openjdk* \
libcurl-devel.x86_64 \
unzip
libcurl-devel.x86_64

# install g++ 8.4.0
# if it is not accessible, replace it with the link below
Expand Down Expand Up @@ -61,14 +59,6 @@ RUN wget https://tugraph-web.oss-cn-beijing.aliyuncs.com/tugraph/deps/boost_1_68
&& cp -r /extensions /usr/local/include/boost/geometry/ \
&& rm -rf /boost_* /extensions /geometry-extensions.tar.gz

#install maven
# if it is not accessible, replace it with the link below
# https://dlcdn.apache.org/maven/maven-3/3.8.7/binaries/apache-maven-3.8.7-bin.tar.gz
RUN cd opt \
&& wget --no-check-certificate https://tugraph-web.oss-cn-beijing.aliyuncs.com/tugraph/deps/apache-maven-3.8.7-bin.tar.gz \
&& tar xf apache-maven-3.8.7-bin.tar.gz \
&& rm apache-maven-*.tar.gz

# install tugraph
# specifies the path of the object storage where the installation package resides
ARG FILEPATH
Expand All @@ -77,41 +67,5 @@ ARG FILENAME
RUN wget ${FILEPATH}/${FILENAME}
RUN rpm -ivh ${FILENAME} && rm /${FILENAME}

# install tugraph demo
RUN wget https://tugraph-web.oss-cn-beijing.aliyuncs.com/tugraph/deps/tugraph-demo.tar.gz \
&& tar xf tugraph-demo.tar.gz && mkdir -p /var/lib/lgraph_demos \
&& cp -r tugraph-demo/movie /var/lib/lgraph_demos/movie \
&& cp -r tugraph-demo/the_three_body /var/lib/lgraph_demos/the_three_body \
&& cp -r tugraph-demo/three_kingdoms /var/lib/lgraph_demos/three_kingdoms \
&& cp -r tugraph-demo/wandering_earth /var/lib/lgraph_demos/wandering_earth \
&& cp tugraph-demo/setup.sh /setup.sh

# install node.js && pnpm
# if it is not accessible, replace it with the link below
# https://registry.npmmirror.com/-/binary/node/v16.6.0/node-v16.20.0-linux-x64.tar.gz
RUN wget https://tugraph-web.oss-cn-beijing.aliyuncs.com/tugraph/deps/node-v16.20.0-linux-x64.tar.gz \
&& tar xvf node-v16.20.0-linux-x64.tar.gz && cd node-v16.20.0-linux-x64/ \
&& ln -s /node-v16.20.0-linux-x64/bin/npm /usr/local/bin/ \
&& ln -s /node-v16.20.0-linux-x64/bin/node /usr/local/bin/ \
&& npm config set registry https://registry.npmmirror.com \
&& rm -rf /node-v16.20.0-linux-x64.tar.gz \
&& npm install --global yarn \
&& npm install --global pnpm \
&& ln -s /node-v16.20.0-linux-x64/lib/node_modules/yarn/bin/yarn /usr/local/bin/yarn \
&& ln -s /node-v16.20.0-linux-x64/bin/pnpm /usr/local/bin/pnpm \
&& yarn config set registry https://registry.npmmirror.com \
&& pnpm config set registry https://registry.npmmirror.com

# install tugraph-db-browser dependencies
RUN cd /usr/local/share/lgraph/tugraph-db-browser \
&& pnpm run bootstrap \
&& pnpm run build

ENV JAVA_HOME=/usr/lib/jvm/java-1.8.0/jre/ \
LD_LIBRARY_PATH=/usr/local/lib64:/usr/local/lib:/usr/lib/jvm/java-1.8.0/jre/lib/amd64/server:$LD_LIBRARY_PATH \
PYTHONPATH=/usr/local/lib64:$PYTHONPATH \
PATH=/opt/apache-maven-3.8.7/bin:$PATH

# set locale
ENV LANG zh_CN.utf8
ENV LC_ALL zh_CN.utf8
ENV LD_LIBRARY_PATH=/usr/local/lib64:/usr/local/lib:$LD_LIBRARY_PATH \
PYTHONPATH=/usr/local/lib64:$PYTHONPATH

0 comments on commit b72df60

Please sign in to comment.