<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Raspberry-Pis on Jermineの博客 </title>
    <link>https://Jermine.vdo.pub/raspberry-pi/</link>
    <description>Recent content in Raspberry-Pis on Jermineの博客 </description>
    <generator>Hugo</generator>
    <language>zh-CN</language>
    <lastBuildDate>Thu, 21 Jun 2018 15:31:01 +0800</lastBuildDate>
    <atom:link href="https://Jermine.vdo.pub/raspberry-pi/feed.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Set Mirrors for Pi - 树莓派配置加速镜像</title>
      <link>https://Jermine.vdo.pub/raspberry-pi/set-mirrors-for-pi/</link>
      <pubDate>Mon, 21 Aug 2017 16:09:28 +0800</pubDate>
      <guid>https://Jermine.vdo.pub/raspberry-pi/set-mirrors-for-pi/</guid>
      <description>&lt;h2 id=&#34;执行如下命令完成配置&#34;&gt;执行如下命令完成配置&lt;/h2&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;root@raspi:/home/pi# cat &amp;gt; /etc/apt/sources.list&#xA;deb http://mirrors.ustc.edu.cn/raspbian/raspbian/ stretch main contrib non-free rpi&#xA;#deb-src http://mirrors.ustc.edu.cn/raspbian/raspbian/ stretch main contrib non-free rpi&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;然后执行&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;sudo apt update&#xA;&lt;/code&gt;&lt;/pre&gt;</description>
    </item>
    <item>
      <title>Build Opencv3.4 by docker in Raspberry pi - 在树莓派上通过docker编译opencv3.4.1</title>
      <link>https://Jermine.vdo.pub/raspberry-pi/build-opencv3.4.1-by-docker-in-pi/</link>
      <pubDate>Thu, 21 Jun 2018 15:31:01 +0800</pubDate>
      <guid>https://Jermine.vdo.pub/raspberry-pi/build-opencv3.4.1-by-docker-in-pi/</guid>
      <description>&lt;h3 id=&#34;采用docker编译如下&#34;&gt;采用docker编译如下：&lt;/h3&gt;&#xA;&lt;p&gt;为了能在docker执行的时候加速，采用了&lt;code&gt;--build-arg&lt;/code&gt;参数，设定了代理地址&lt;/p&gt;&#xA;&lt;h4 id=&#34;在x86上编译如下&#34;&gt;在X86上编译如下：&lt;/h4&gt;&#xA;&lt;p&gt;docker build  &amp;ndash;build-arg HTTP_PROXY=http://192.168.16.254:1080 &amp;ndash;build-arg HTTPS_PROXY=http://192.168.16.254:1080 -t jermine/opencv:alpine -f Dockerfile.alpine .&lt;/p&gt;&#xA;&lt;h4 id=&#34;在arm64上编译操作如下&#34;&gt;在ARM64上编译操作如下&lt;/h4&gt;&#xA;&lt;p&gt;docker build -t jermine/opencv:alpine-arm64-3.4.1 -f Dockerfile.alpine &amp;ndash;build-arg HTTP_PROXY=http://192.168.16.254:1080 &amp;ndash;build-arg HTTPS_PROXY=http://192.168.16.254:1080 .&lt;/p&gt;&#xA;&lt;h3 id=&#34;环境变量配置如下&#34;&gt;环境变量配置如下：&lt;/h3&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;export OPENCV_DIR=/opt/opencv&#xA;export LIBGPUARRAY_DIR=/opt/libgpuarray&#xA;export NUM_CORES=8&#xA;export NB_UID=1000&#xA;export CLONE_TAG=1.0&#xA;export OPENCV_VERSION=3.4.1&#xA;export OPENCL_ENABLED=OFF&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;h3 id=&#34;需要的库如下&#34;&gt;需要的库如下：&lt;/h3&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;apt install g++ python3 python3-dev build-essential cmake pkg-config libprotobuf-dev protobuf-compiler libopencv-dev&#xA;&#xA;&#xA;wget https://bootstrap.pypa.io/get-pip.py &#xA;&#xA;python3 get-pip.py&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;h4 id=&#34;cmake的配置如下&#34;&gt;Cmake的配置如下：&lt;/h4&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;    &#xA;    -D BUILD_opencv_xfeatures2d=OFF \&#xA;    -D BUILD_opencv_world=OFF \&#xA;&#xA;    cmake \&#xA;    -D PYTHON_EXECUTABLE=$(which python3) \&#xA;    -D WITH_CUDA=OFF \&#xA;    -D CMAKE_BUILD_TYPE=RELEASE \&#xA;    -D BUILD_PYTHON_SUPPORT=ON \&#xA;    -D CMAKE_INSTALL_PREFIX=/usr/local \&#xA;    -D INSTALL_C_EXAMPLES=ON \&#xA;    -D INSTALL_PYTHON_EXAMPLES=ON \&#xA;    -D BUILD_PYTHON_SUPPORT=ON \&#xA;    -D BUILD_NEW_PYTHON_SUPPORT=ON \&#xA;    -D PYTHON_DEFAULT_EXECUTABLE=$(which python3) \&#xA;    -D PYTHON_INCLUDE_DIR=/usr/include/python3.5m \&#xA;    -D PYTHON_LIBRARY=/usr/lib/arm-linux-gnueabihf/libpython3.5m.so \&#xA;    -D PYTHON3_NUMPY_INCLUDE_DIRS=/usr/lib/python3/dist-packages/numpy/core/include \&#xA;    -D OPENCV_EXTRA_MODULES_PATH=$OPENCV_DIR/opencv_contrib-$OPENCV_VERSION/modules \&#xA;    -D WITH_TBB=ON \&#xA;    -D WITH_PTHREADS_PF=ON \&#xA;    -D WITH_OPENNI=OFF \&#xA;    -D WITH_OPENNI2=ON \&#xA;    -D WITH_EIGEN=ON \&#xA;    -D BUILD_DOCS=ON \&#xA;    -D BUILD_TESTS=ON \&#xA;    -D BUILD_PERF_TESTS=ON \&#xA;    -D BUILD_EXAMPLES=ON \&#xA;    -D WITH_OPENCL=$OPENCL_ENABLED \&#xA;    -D USE_GStreamer=ON \&#xA;    -D WITH_GDAL=ON \&#xA;    -D WITH_CSTRIPES=ON \&#xA;    -D ENABLE_FAST_MATH=1 \&#xA;    -D WITH_OPENGL=ON \&#xA;    -D WITH_QT=OFF \&#xA;    -D WITH_IPP=ON \&#xA;    -D WITH_FFMPEG=ON \&#xA;    -D WITH_V4L=ON .. &amp;amp;&amp;amp; \&#xA;    make -j4 &amp;amp;&amp;amp; \&#xA;    make install &amp;amp;&amp;amp; \&#xA;    ldconfig &amp;amp;&amp;amp; \&#xA;    &#xA;    &#xA;&lt;/code&gt;&lt;/pre&gt;&lt;h4 id=&#34;具体参照我的github源码&#34;&gt;具体参照我的Github源码&lt;/h4&gt;&#xA;&lt;p&gt;地址为：&#xA;&lt;a href=&#34;https://github.com/JermineHu/docker-opencv&#34;&gt;https://github.com/JermineHu/docker-opencv&lt;/a&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Setup Docker for Pi - 树莓派安装docker</title>
      <link>https://Jermine.vdo.pub/raspberry-pi/setup-docker-for-pi/</link>
      <pubDate>Tue, 11 Jul 2017 16:05:54 +0800</pubDate>
      <guid>https://Jermine.vdo.pub/raspberry-pi/setup-docker-for-pi/</guid>
      <description>&lt;h2 id=&#34;安装步骤&#34;&gt;安装步骤&lt;/h2&gt;&#xA;&lt;h3 id=&#34;先下载对应的deb包&#34;&gt;先下载对应的deb包：&lt;/h3&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;wget https://download.docker.com/linux/ubuntu/dists/bionic/pool/stable/arm64/docker-ce_18.06.0~ce~3-0~ubuntu_arm64.deb &#xA;&lt;/code&gt;&lt;/pre&gt;&lt;h3 id=&#34;通过dpkg进行安装&#34;&gt;通过dpkg进行安装&lt;/h3&gt;&#xA;&lt;p&gt;直接 &lt;code&gt;dpkg -i *.deb&lt;/code&gt; 进行安装&lt;/p&gt;&#xA;&lt;h3 id=&#34;然后设置开机启动&#34;&gt;然后设置开机启动&lt;/h3&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;systemctl enable docker&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;h3 id=&#34;配置镜像加速&#34;&gt;配置镜像加速：&lt;/h3&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;cat &amp;gt; /etc/docker/daemon.json&#xA;{&#xA;    &amp;#34;registry-mirrors&amp;#34;: [&#xA;        &amp;#34;https://2nmcv9vp.mirror.aliyuncs.com&amp;#34;&#xA;    ],&#xA;    &amp;#34;insecure-registries&amp;#34;: []&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;重启服务&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;systemctl restart docker&#xA;&lt;/code&gt;&lt;/pre&gt;</description>
    </item>
    <item>
      <title>Call Opencv Used Python3 - 通过docker在python3.6下调用opencv3.4.1</title>
      <link>https://Jermine.vdo.pub/raspberry-pi/call-opencv-used-python3.6-in-docker/</link>
      <pubDate>Wed, 21 Jun 2017 15:46:06 +0800</pubDate>
      <guid>https://Jermine.vdo.pub/raspberry-pi/call-opencv-used-python3.6-in-docker/</guid>
      <description>&lt;h2 id=&#34;根据之前build好的镜像启动容器&#34;&gt;根据之前build好的镜像，启动容器&lt;/h2&gt;&#xA;&lt;p&gt;启动一个带有python3.6 和 opencv3.4.1的环境&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;docker run -itd --name cv -v `pwd`/app:/app --net host -w /app jermine/opencv:alpine-arm64&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;进入容器&#34;&gt;进入容器&lt;/h2&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;docker exec -it cv sh&#xA;&lt;/code&gt;&lt;/pre&gt;</description>
    </item>
    <item>
      <title>解决树莓派交换空间的问题</title>
      <link>https://Jermine.vdo.pub/raspberry-pi/raspberry-pi-set-swap/</link>
      <pubDate>Sun, 21 Aug 2016 15:19:10 +0800</pubDate>
      <guid>https://Jermine.vdo.pub/raspberry-pi/raspberry-pi-set-swap/</guid>
      <description>&lt;p&gt;今天在树莓派编译一个较大的C项目时发现每次编译到43之后速度会特别慢并且死机，百度之后发现可能是交换空间不足，增加1G交换空间后才解决死机问题。&lt;/p&gt;</description>
    </item>
    <item>
      <title>Make an Alpine Docker Image</title>
      <link>https://Jermine.vdo.pub/raspberry-pi/make-an-alpine-docker-image/</link>
      <pubDate>Sat, 21 May 2016 16:14:53 +0800</pubDate>
      <guid>https://Jermine.vdo.pub/raspberry-pi/make-an-alpine-docker-image/</guid>
      <description>&lt;h2 id=&#34;步骤&#34;&gt;步骤：&lt;/h2&gt;&#xA;&lt;h3 id=&#34;运行如下代码获取基础镜像&#34;&gt;运行如下代码获取基础镜像&lt;/h3&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;docker pull jermine/alpine&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Dockerfile 源码参考：https://github.com/JermineHu/docker-alpine-armhf&lt;/p&gt;&#xA;&lt;p&gt;基于基础镜像可以安装alpine是所有软件，然后构建一个运行环境，比如&lt;/p&gt;</description>
    </item>
    <item>
      <title>K8s on Raspberry Pi</title>
      <link>https://Jermine.vdo.pub/raspberry-pi/k8s-on-raspberry-pi/</link>
      <pubDate>Sat, 21 Oct 2017 16:20:55 +0800</pubDate>
      <guid>https://Jermine.vdo.pub/raspberry-pi/k8s-on-raspberry-pi/</guid>
      <description>&lt;h2 id=&#34;配置环境步骤如下&#34;&gt;配置环境步骤如下：&lt;/h2&gt;&#xA;&lt;h3 id=&#34;安装kubeadm必要的软件&#34;&gt;安装kubeadm必要的软件&lt;/h3&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;apt install socat ebtables ethtool&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;h3 id=&#34;安装相关的软件&#34;&gt;安装相关的软件&lt;/h3&gt;&#xA;&lt;p&gt;主要软件有：&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;kubeadm_1.10.2-00_arm64 、kubectl_1.10.2-00_arm64 、kubelet_1.10.2-00_arm64 、kubernetes-cni_0.6.0-00_arm64&lt;/strong&gt;&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
