The TensorFlow library was compiled to use AVX instructions, but
来源:7-9 AI应用镜像打包

qq_慕运维0344048
2023-04-09
按照视频7-9,打包好了vegetables_analyzer:v1镜像,
root@imooc-edge01:~# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
vegetabels_analyzer v1 d1c1840aa6cf 29 minutes ago 2.16GB
<none> <none> ad671faec698 4 hours ago 122MB
kubeedge/kubeedge-pi-counter v1.0.0 c854dea2f57a 23 hours ago 81.4MB
nginx latest 080ed0ed8312 11 days ago 142MB
python 3.7.12-slim-buster 96e87e64a6d2 13 months ago 113MB
registry.aliyuncs.com/google_containers/kube-proxy v1.21.6 01d07d3b4d18 17 months ago 104MB
registry.cn-hangzhou.aliyuncs.com/chand/flannel v0.14.0 8522d622299c 23 months ago 67.9MB
kubeedge/pause 3.1 da86e6ba6ca1 5 years ago 742kB
然后想要运行镜像,报错
docker run --name vegetables_analyzer -p5000:5000 vegetables_analyzer:v1
说是tensorflow库是用AVX编译的,但是虚拟机上没有,docker logs如下
root@imooc-edge01:~# docker run --name vege5 -p5000:5000 vegetabels_analyzer:v1
The TensorFlow library was compiled to use AVX instructions, but these aren't available on your machine.
Aborted (core dumped)
root@imooc-edge01:~#
我在本地测试没问题,可以进行图片识别,用cpuz查看了cpu是否支持avx,发现我的cpu是i5-8300H,支持avx,
但是在虚拟机上执行cat /proc/cpuinfo发现没有avx
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx rdtscp lm constant_tsc rep_good nopl xtopology nonstop_tsc cpuid tsc_known_freq pni pclmulqdq ssse3 cx16 pcid sse4_1 sse4_2 movbe popcnt aes rdrand hypervisor lahf_lm abm 3dnowprefetch invpcid_single pti fsgsbase bmi1 bmi2 invpcid rdseed clflushopt md_clear flush_l1d arch_capabilities
也尝试网上的方法:
- 关闭电脑上的HyperV
- 将import os os.environ[‘TF_CPP_MIN_LOG_LEVEL’] = ‘2’ 写在文件最上面
- virtualbox -> 系统 - > 处理器 -> 启用嵌套VT-x/AMD-V
发现都不行。卡住了
写回答
1回答
-
qq_慕运维0344048
提问者
2023-04-10
已解决
022023-04-18
相似问题