Search This Blog

Showing posts with label Raspberry Pi. Show all posts
Showing posts with label Raspberry Pi. Show all posts

Thursday, June 25, 2020

Raspberry pi - Install the docker

The post is for those who have raspberry pi original model and want to install docker on that.

First check whether docker is installed on your raspberry pi or not. Verify the docker installation by running the command below.

docker run -rm hello world
If the verification fails the docker needs to be installed on the raspberry pi.
There are scripts available to support the installation of docker here at get.docker.com
Use the command below to install using the scripts.
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh
The output would look something like the following:
# Executing docker install script, commit: 26ff363bcf3b3f5a00498ac43694bf1c7d9ce16c
+ sh -c apt-get update -qq >/dev/null
+ sh -c DEBIAN_FRONTEND=noninteractive apt-get install -y -qq apt-transport-https ca-certificates curl >/dev/null
+ sh -c curl -fsSL "https://download.docker.com/linux/raspbian/gpg" | apt-key add -qq - >/dev/null
Warning: apt-key output should not be parsed (stdout is not a terminal)
+ sh -c echo "deb [arch=armhf] https://download.docker.com/linux/raspbian stretch stable" > /etc/apt/sources.list.d/docker.list
+ sh -c apt-get update -qq >/dev/null
+ [ -n  ]
+ sh -c apt-get install -y -qq --no-install-recommends docker-ce >/dev/null
+ sh -c docker version
Client: Docker Engine - Community
 Version:           19.03.12
 API version:       1.40
 Go version:        go1.13.10
 Git commit:        48a6621
 Built:             Mon Jun 22 15:53:00 2020
 OS/Arch:           linux/arm
 Experimental:      false

Server: Docker Engine - Community
 Engine:
  Version:          19.03.12
  API version:      1.40 (minimum version 1.12)
  Go version:       go1.13.10
  Git commit:       48a6621
  Built:            Mon Jun 22 15:47:00 2020
  OS/Arch:          linux/arm
  Experimental:     false
 containerd:
  Version:          1.2.13
  GitCommit:        7ad184331fa3e55e52b890ea95e65ba581ae3429
 runc:
  Version:          1.0.0-rc10
  GitCommit:        dc9208a3303feef5b3839f4323d9beb36df0a9dd
 docker-init:
  Version:          0.18.0
  GitCommit:        fec3683
If you would like to use Docker as a non-root user, you should now consider
adding your user to the "docker" group with something like:

  sudo usermod -aG docker your-user

Remember that you will have to log out and back in for this to take effect!

WARNING: Adding a user to the "docker" group will grant the ability to run
         containers which can be used to obtain root privileges on the
         docker host.
         Refer to https://docs.docker.com/engine/security/security/#docker-daemon-attack-surface
         for more information.
Add your user to the docker group so that docker can be run without the super user permission.
sudo usermod -aG docker pi

Now run the verification script and your docker should run.


Thursday, June 18, 2020

Raspberry pi - Getting Started with OpenCV (Playing Youtube Video)

for getting started with OpenCV i tried to do something simple and straightforward.

Playing a video from youtube URL.

Why?

As most of the videos i am going to do image processing on is on my youtube channel.

Monday, June 15, 2020

Raspberry pi - Desktop access via VNC

A lot has changed since the last time i blogged about the raspberry pi. The Raspbian OS has been renamed to raspberry OS. They have completely dropped support for the Composite Display. They have reached to version raspberry pi zero with integrated wireless. A lot.

So this post will be somewhat shorter.

This is a small post that captures how to enabled the VNC in the raspberry pi. 
You will need a VNC Viewer installed on your host for the same.

Thursday, December 20, 2018

Raspberry Pi - Raspi Config Description

Raspi-Config is a raspberry pi configuration tool. It can be launched by typing the command as follows:
sudo raspi-config

Raspberry Pi Model B Rev 2 - Raspi-Config
Lets dwell into its options.

Saturday, November 24, 2018

Raspberry Pi - Installing the Essentials

To make use of Raspberry pi it is required to have certain tool arsenal installed in your pi. This post covers what i commonly use.
  1. Updating Existing Packages
  2. AMP Stack
  3. Python 2.7 (Yes i have not updated to Python 3 yet. Because laziness)
I will make this quick and short. So lets get started.

Saturday, November 10, 2018

Raspberry Pi - Setup Using Raspbian Image

Apart from doing setup using NOOBS. We have an option of writing the Raspbian directly on the SD Card. This post covers how to do the same on Windows.

Actually I find this quite simple and easy to use as compared to NOOBS. It is just a two step process.
1 - Get Official Raspbian Image
2 - Install and Use Win32 Disk Imager to write to the SD Card

Friday, November 9, 2018

Raspberry Pi - Setup using NOOBS

I never saw myself writing this post. But i have done this so many times that i now think i should just put it out there, just another setup post. 

NOOBS is short for New Out Of the Box Software. This is where all the beginners of Raspberry Pi should start with. The easy installer can be downloaded as a zip file or using a Torrents from the link.

It has two version offline installer and an online installer. If your raspberry pi is connected to the internet the online installer can be used that takes a very minimum space on the SD Card. The entire selected OS will be downloaded from the internet connection. If your raspberry pi is not connected to the internet than an offline installer should be used that comes pre-loaded with Raspbian and LibreELEC. 

Raspbian is one all the beginers should start their Raspberry Pi Experience with. It is the official support OS by the Raspberry Pi Foundation. More info can be read from here. It is extensively covered by the raspberry pi foundation website and makes no sense to reiterate the information here.

There is a way to load the raspbian image directly on the SD Card without using the NOOBS but i will get to that in a later post. (Hopefully)

The setup is a 3 step process.

  1. Step - 1 Format the SD Card
  2. Step - 2 Load the NOOBs
  3. Step - 3 Installing Raspbian


Friday, July 22, 2016

Raspberry Pi - The APT Command

The easiest to manage installation,upgradation and uninstallation APT is the command used in all the linux based operating systems. APT stands for Advance Packaging Tool. To install or remove packages one must have root user permissions. So user should be a sudoers or one must be logged in as a root user.


Obviously an internet connection is required for anyone to update the packages or install new ones. A point to note is that one cannot perform multiple installation at the same time.

APT keeps a url from where to get the software in the file located at:



/etc/apt/sources.list
 
One can see the contents of the file by using any installed editor:
 
sudo nano /etc/apt/sources.list 


Content of file sources.list


Before installing anything new lets update our list. The command for the same is apt-get update.

sudo apt-get update


Installing a package with apt-get



We will for example will install and uninstall a package called motion.
Typing the following command will prompt user for confirmation and will also provide disk usage information.


sudo apt-get install motion


Say yes and confirm the installation. Now we will move forward to removing the installed package of motion.

Removing a package with apt-get


We will now completely remove the package and its dependencies using command purge.

sudo apt-get purge motion

This will remove the package and all associated configuration files. The user is prompted for removal. Another similar command is the remove command which can be used to uninstall a package
 
sudo apt-get remove motion

The user is prompted to confirm the removal.

Raspberry Pi - My Experiments with Raspberry Pi

Unless and until you are not living under a rock everybody knows what is a raspberry pi. It is a small embedded linux based computer(Yes it is a computer. Almost full blown computer with limitations)

The official site for the same is:
https://www.raspberrypi.org/

One can find list of all the available pi boards, communities, amazing projects, host your own project and many many many more things.

There is also a long list of OSes that one can install on raspberry many generic and some serving a specific purpose.

I am a control engineer i develop control firmware for a living. The raspberry pi has provided a lot of options for prototyping algorithms like never before. Here i am going to log all the things that i experiment with my Raspberry Pi. Some might be old, some new and some totally badass but its just a log a kind of memory.

I assume that you have a simple setup of Raspberry pi and a computer ready.
I will be using putty for communicating with my pi.

So in the label raspberry pi you can find my experiments with raspberry pi.