11集干货必看!在Docker上编译tensorFlow Lite MCU例子工程-《MCU嵌入式AI开发笔记》

【11集在Docker上编译tensorFlow Lite MCU例子工程-《MCU嵌入式AI开发笔记》】

这一集咱们一步一步的在doc下面编译TensorFlow Lite的例程

https://tensorflow.google.cn/lite/tutorials?hl=zh-cn

进入这个例子:

https://codelabs.developers.google.cn/codelabs/sparkfun-tensorflow#0

进入下一步:重点研究。

3. Set up your software

Download the TensorFlow repo

The code is available in the TensorFlow repository on GitHub, in the following location:

https://github.com/tensorflow/tensorflow/tree/master/tensorflow/lite/micro

cd ~ # change into your home (or any other) directory

git clone --depth 1 https://github.com/tensorflow/tensorflow.git

cd tensorflow

上面这个命令,我们需要在docker下面完成。

我们在cmd下面执行:

docker run -it --rm -p 8888:8888 registry.cn-hangzhou.aliyuncs.com/denverdino/tensorflow:latest

或者我们启动docker tesktop,直接在desktop下面启动应该也是可以的:

我们直接点击terminal

在命令行下面输入命令:

git clone --depth 1 https://github.com/tensorflow/tensorflow.git

/bin/sh: 9: git: not found

没有找到git,这样我们需要安装git。因为我们安装了ubuntu环境,所以我们用apt-get update命令更新一下

这样我们应该可以用git了。

git clone --depth 1 https://github.com/tensorflow/tensorflow.git

芭比Q了

我们用如下命令:

git clone https://github.com/tensorflow/tensorflow.git

等待下载结束。

还是出错了,最后切回之前的命令:

下载成功了。

之后

Download Python dependencies

We'll be using Python 3 to prepare our binary and flash it to the device. The Python scripts depend on certain libraries being available. Run the following command to install these dependencies:

pip3 install pycrypto pyserial --user

出错了。

我们在该文档的开始,介绍了需要安装的软件环境,

我们逐一检查一下:

之后检查make

make --version

发现版本不对。

apt-get install -y make 4.2.1

等待吧,要一段时间

pip3也要安装,ubuntu没有pip3,只能安装python3-pip

apt-get install -y python3-pip

应该安装完成。

之后我们在返回执行Download Python dependencies这一步。

pip3 install pycrypto pyserial --user


又出问题了,好像是python版本 pip版本都升不上去了,有可能是镜像的问题。

咱们继续查找原因。

下次学习:如何更改Docker 下的默认make pip python版本。

相关推荐
劲墨难解苍生苦11 小时前
spring ai alibaba mcp 开发demo
java·人工智能
程序员霸哥哥11 小时前
从零搭建PyTorch计算机视觉模型
人工智能·pytorch·python·计算机视觉
草莓熊Lotso11 小时前
Linux 基础开发工具入门:软件包管理器的全方位实操指南
linux·运维·服务器·c++·人工智能·网络协议·rpc
斯普信专业组11 小时前
Docker 常用命令与时区配置指南
docker·容器·eureka
IT_陈寒11 小时前
Vue 3性能优化实战:7个关键技巧让我的应用加载速度提升50%
前端·人工智能·后端
【赫兹威客】浩哥11 小时前
基于 YOLO11+PyQt6+OpenCV 的智能水果检测系统设计与实现
人工智能·opencv·计算机视觉
RPA机器人就用八爪鱼12 小时前
RPA:企业数字化转型的高效自动化利器
人工智能
程序员-小李12 小时前
基于PyTorch的动物识别模型训练与应用实战
人工智能·pytorch·python
掘金安东尼12 小时前
AI 生成代码,从 Copilot 到 Claude Code 的全景测评
人工智能
说私域12 小时前
基于开源链动2+1模式AI智能名片S2B2C商城小程序的赛道力构建与品牌发展研究
人工智能·小程序