This post is, especially, for Raspberry Pi enthusiasts. This article is all about deploying Alexa AVS SDK on Raspberry Pi. I myself have been using it on my Pi 3. It is working great. The official Alexa GitHub repository has instructions on how to install Alexa on Raspberry Pi. But in this tutorial, we are NOT following that approach. Instead, we use Docker and Docker Compose to install it. This is a much easy solution compared to installing everything from scratch.

First of all, install Docker on your Raspberry Pi using the below command.

Next, add user “pi” to the docker group. Execute the below command.

Now to deploy Alexa we need to run a docker container. Execute the following commands one by one(ignore lines starting with #).

Now head over to this article and create an Alexa profile. Then paste the obtained ID in the docker-compose.yml file which can be found in the folder ~/alexa/run. Replace the following parameters with your obtained values.

Connect your audio jack and USB microphone to your Pi(visit Karsten's repository for more info)

Now go to  ~/alexa/run folder and run docker-compose up -d. After docker-compose pulls the image, execute docker logs al. You will see similar text like below with a verification code.

############################
# NOT YET AUTHORIZED #
##################################
################################################################################################
# To authorize, browse to: ‘https://amazon.com/us/code' and enter the code: {XXXX} #
################################################################################################

Visit https://amazon.com/us/code and verify using the displayed code. Then just restart the container with docker restart al. Now your Alexa is ready.

Credits: Thanks to Karsten for his Alexa AVS docker image. You can visit his repository for more information.