diff --git a/install.sh b/install.sh index eee2209..7185220 100755 --- a/install.sh +++ b/install.sh @@ -65,10 +65,14 @@ if [ "$RAM_AVAILABLE_IN_DOCKER" -lt "$MIN_RAM" ]; then fi #SSE4.2 required by Clickhouse (https://clickhouse.yandex/docs/en/operations/requirements/) -SUPPORTS_SSE42=$(docker run --rm busybox grep -c sse4_2 /proc/cpuinfo || :); -if (($SUPPORTS_SSE42 == 0)); then +# On KVM, cpuinfo could falsely not report SSE 4.2 support, so skip the check. https://github.com/ClickHouse/ClickHouse/issues/20#issuecomment-226849297 +IS_KVM=$(docker run --rm busybox grep -c 'Common KVM processor' /proc/cpuinfo || :) +if (($IS_KVM == 0)); then + SUPPORTS_SSE42=$(docker run --rm busybox grep -c sse4_2 /proc/cpuinfo || :) + if (($SUPPORTS_SSE42 == 0)); then echo "FAIL: The CPU your machine is running on does not support the SSE 4.2 instruction set, which is required for one of the services Sentry uses (Clickhouse). See https://git.io/JvLDt for more info." exit 1 + fi fi # Clean up old stuff and ensure nothing is working while we install/update