Skip to content

Commit

Permalink
added dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
henriwoodcock committed Mar 17, 2021
1 parent 0933de9 commit 8baa989
Showing 1 changed file with 51 additions and 0 deletions.
51 changes: 51 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
FROM ubuntu:18.04
ENV TERM linux
ENV DEBIAN_FRONTEND noninteractive
# Basic apt update
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends locales ca-certificates && rm -rf /var/lib/apt/lists/*
RUN apt-get update && apt-get -y install sudo

# make sure cmake is v12.0
RUN sudo apt -y install g++ wget make
ADD https://cmake.org/files/v3.14/cmake-3.14.1-Linux-x86_64.sh /cmake-3.14.1-Linux-x86_64.sh
RUN mkdir /opt/cmake
RUN sh /cmake-3.14.1-Linux-x86_64.sh --prefix=/opt/cmake --skip-license
RUN ln -s /opt/cmake/bin/cmake /usr/local/bin/cmake
RUN cmake --version

# Install dependencies
RUN sudo apt update && sudo apt -y install gcc-arm-none-eabi \
gcc \
g++ \
git \
gdb-multiarch \
automake \
autoconf \
build-essential \
texinfo \
libtool \
libftdi-dev \
wget \
libusb-1.0-0-dev \
python3 && \
mkdir pico

# copy required files into docker image
COPY pico-sdk pico/pico-sdk
COPY CMakeLists.txt pico/CMakeLists.txt
COPY micro_speech pico/micro_speech
COPY pico_sdk_import.cmake pico/pico_sdk_import.cmake

#setup pico-sdk
RUN OUTDIR="$(pwd)pico" && \
export PICO_SDK_PATH="$OUTDIR/pico-sdk" && \
cd $PICO_SDK_PATH && \
echo "Adding PICO_SDK_PATH to ~/.bashrc" && \
echo "export PICO_SDK_PATH=$PICO_SDK_PATH" >> ~/.bashrc

# now build the model
RUN OUTDIR="$(pwd)pico" && \
export PICO_SDK_PATH="$OUTDIR/pico-sdk" && \
cd pico && mkdir build && \
cd build && cmake .. && \
make micro_speech -j8

0 comments on commit 8baa989

Please sign in to comment.