mirror of
https://gitee.com/milvus-io/milvus.git
synced 2024-12-02 20:09:57 +08:00
add centos7 build cpu version enviroment
This commit is contained in:
parent
03af301e0c
commit
ca37da59a2
@ -17,6 +17,7 @@
|
||||
|
||||
#include <gtest/gtest-death-test.h>
|
||||
#include <gtest/gtest.h>
|
||||
#include <cmath>
|
||||
|
||||
#include "config/YamlConfigMgr.h"
|
||||
#include "server/Config.h"
|
||||
@ -67,9 +68,9 @@ TEST_F(ConfigTest, CONFIG_TEST) {
|
||||
|
||||
server_config.SetValue("float_test", "2.5");
|
||||
double dbl = server_config.GetDoubleValue("float_test");
|
||||
ASSERT_LE(abs(dbl - 2.5), std::numeric_limits<double>::epsilon());
|
||||
ASSERT_LE(std:fabs(dbl - 2.5), std::numeric_limits<double>::epsilon());
|
||||
float flt = server_config.GetFloatValue("float_test");
|
||||
ASSERT_LE(abs(flt - 2.5), std::numeric_limits<float>::epsilon());
|
||||
ASSERT_LE(std:fabs(flt - 2.5), std::numeric_limits<float>::epsilon());
|
||||
|
||||
server_config.SetValue("bool_test", "true");
|
||||
bool blt = server_config.GetBoolValue("bool_test");
|
||||
|
20
docker/build_env/cpu/centos7/Dockerfile
Normal file
20
docker/build_env/cpu/centos7/Dockerfile
Normal file
@ -0,0 +1,20 @@
|
||||
FROM centos:centos7
|
||||
|
||||
RUN yum install -y epel-release centos-release-scl-rh && yum install -y wget curl which && \
|
||||
wget -qO- "https://cmake.org/files/v3.14/cmake-3.14.3-Linux-x86_64.tar.gz" | tar --strip-components=1 -xz -C /usr/local && \
|
||||
yum install -y ccache make automake git python3-pip libcurl-devel python3-devel boost-static mysql-devel \
|
||||
devtoolset-6-gcc devtoolset-6-gcc-c++ devtoolset-6-gcc-gfortran llvm-toolset-7.0-clang llvm-toolset-7.0-clang-tools-extra lcov \
|
||||
&& \
|
||||
rm -rf /var/cache/yum/*
|
||||
|
||||
RUN echo "source scl_source enable devtoolset-6" >> /etc/profile.d/devtoolset-6.sh
|
||||
RUN echo "source scl_source enable llvm-toolset-7.0" >> /etc/profile.d/llvm-toolset-7.sh
|
||||
|
||||
ENV CLANG_TOOLS_PATH="/opt/rh/llvm-toolset-7.0/root/usr/bin"
|
||||
|
||||
COPY docker-entrypoint.sh /app/docker-entrypoint.sh
|
||||
|
||||
WORKDIR /root
|
||||
|
||||
ENTRYPOINT [ "/app/docker-entrypoint.sh" ]
|
||||
CMD [ "start" ]
|
10
docker/build_env/cpu/centos7/docker-entrypoint.sh
Executable file
10
docker/build_env/cpu/centos7/docker-entrypoint.sh
Executable file
@ -0,0 +1,10 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
if [ "$1" = 'start' ]; then
|
||||
tail -f /dev/null
|
||||
fi
|
||||
|
||||
exec "$@"
|
||||
|
Loading…
Reference in New Issue
Block a user