pvpython can not be used in kubernets

I want to create a web visualization application based on ParaView. I used code from the trame framework. When building the Docker image, I adopted the Linux version downloaded from the official website: ParaView-5.12.0-RC1-osmesa-MPI-Linux-Python3.10-x86_64.

Part of my Dockerfile is as follows:

dockerfileCopy code

FROM python:3.10

## Install ParaView
ARG paraview=ParaView-5.12.0-RC1-osmesa-MPI-Linux-Python3.10-x86_64
COPY ${paraview}.tar.gz /tmp/
RUN tar -xzf /tmp/${paraview}.tar.gz -C /tmp/ && \
    mv /tmp/${paraview} /opt/paraview && \
    rm -rf /tmp/${paraview}.tar.gz
RUN apt-get update && \
    apt-get install -y libgl1-mesa-glx libgl1-mesa-dri
ENV PATH="/opt/paraview/bin:${PATH}"

I was able to launch pvpython on my own computer using docker run -idt MyImage pvpython. However, when I deploy it to the Kubernetes server, it throws an error:

cssCopy code

root@paraview-7f688cf59f-c2h46:/app# pvpython
error: exception occurred: Illegal instruction

Is the K8s server running an older CPU at all?

My server’s cpu is Intel(R) Xeon(R) CPU E5620 @ 2.40GHz
here is some information that i use lscpu in terminal:
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Address sizes: 40 bits physical, 48 bits virtual
Byte Order: Little Endian
CPU(s): 16
On-line CPU(s) list: 0-15
Vendor ID: GenuineIntel
Model name: Intel(R) Xeon(R) CPU E5620 @ 2.40GHz
CPU family: 6
Model: 44
Thread(s) per core: 2
Core(s) per socket: 4
Socket(s): 2
Stepping: 2
Frequency boost: enabled
CPU(s) scaling MHz: 68%
CPU max MHz: 2400.0000
CPU min MHz: 1600.0000
BogoMIPS: 4800.12
Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni dtes64 monitor ds_cp
l vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid dca sse4_1 sse4_2 popcnt lahf_lm epb pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid dtherm ida arat flush_l1d
Virtualization features:
Virtualization: VT-x
Caches (sum of all):
L1d: 256 KiB (8 instances)
L1i: 256 KiB (8 instances)
L2: 2 MiB (8 instances)
L3: 24 MiB (2 instances)
NUMA node(s): 2
NUMA node0 CPU(s): 0-3,8-11
NUMA node1 CPU(s): 4-7,12-15
Gather data sampling: Not affected
Itlb multihit: KVM: Mitigation: Split huge pages
L1tf: Mitigation; PTE Inversion; VMX conditional cache flushes, SMT vulnerable
Mds: Vulnerable: Clear CPU buffers attempted, no microcode; SMT vulnerable
Meltdown: Mitigation; PTI
Mmio stale data: Unknown: No mitigations
Retbleed: Not affected
Spec store bypass: Mitigation; Speculative Store Bypass disabled via prctl and seccomp
Spectre v1: Mitigation; usercopy/swapgs barriers and __user pointer sanitization
Spectre v2: Mitigation; Retpolines, IBPB conditional, IBRS_FW, STIBP conditional, RSB filling, PBRSB-eIBRS Not affected
Srbds: Not affected
Tsx async abort: Not affected

This seems to be a CPU from 2010 or so. I would call it too old for ParaView these days. We definitely have code that wants more advanced vectorization support than can be provided here.

Cc: @wascott @cory.quammen

It seems that the CPU doesn’t support libOSmesa.

Yes, I can imagine that OSMesa has a lot of vectorized code in it.