Skip to content

Commit

Permalink
build PICO
Browse files Browse the repository at this point in the history
  • Loading branch information
DeepCowProductions committed Sep 24, 2024
1 parent ee35369 commit 0297bb0
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
13 changes: 12 additions & 1 deletion images/arm32/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,23 @@ SHELL ["/bin/bash", "-o", "pipefail", "-c"]

USER root

RUN apt update && apt install cmake gcc-arm-none-eabi build-essential -y \
RUN apt update && apt install -y \
cmake gcc-arm-none-eabi libnewlib-arm-none-eabi libstdc++-arm-none-eabi-newlib g++ \
&& apt-get clean && \
rm -rf /var/lib/apt/lists/*

RUN mkdir /opt/PICO
RUN fix-permissions /opt/PICO

COPY link_files.sh /usr/local/bin/before-notebook.d/90_link_files.sh
RUN chmod +x /usr/local/bin/before-notebook.d/90_link_files.sh

USER $NB_UID

RUN cd /opt/PICO && git clone https://github.com/fhswf/PICO-CAM-A.git
RUN mkdir /opt/PICO/PICO-CAM-A/build && cd /opt/PICO/PICO-CAM-A/build && cmake -D PICO_SDK_FETCH_FROM_GIT=1 /opt/PICO/PICO-CAM-A
RUN cd /opt/PICO/PICO-CAM-A/build && make

LABEL ki.fh-swf.de.jupyterhub.runtime="CPU"
LABEL ki.fh-swf.de.jupyterhub.namelabel="$BUILD_IMAGE_NAME"
LABEL ki.fh-swf.de.jupyterhub.description="arm32"
Expand Down
9 changes: 9 additions & 0 deletions images/arm32/link_files.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash
set -e

if [[ ! -f "$HOME/PICO" ]] ; then
echo "linking /opt/PICO";
ln -s /opt/PICO/ $HOME/PICO
else
echo "/opt/PICO found in $HOME";
fi

0 comments on commit 0297bb0

Please sign in to comment.