Skip to content

Commit

Permalink
Merge pull request #129 from tum-ei-eda/develop
Browse files Browse the repository at this point in the history
Merge Develop (19.01.2024)
  • Loading branch information
PhilippvK authored Jan 25, 2024
2 parents e24ec10 + fe8ca29 commit 2a9d911
Show file tree
Hide file tree
Showing 77 changed files with 14,092 additions and 6,387 deletions.
17 changes: 6 additions & 11 deletions .github/workflows/notebook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@
##
name: Run Notebook
on:
push:
branches:
- develop
workflow_dispatch:
inputs:
path:
Expand All @@ -30,7 +27,7 @@ on:
branch:
description: 'Target branch for updates'
required: false
default: ""
default: "pr-ci-ipynb"

jobs:
run:
Expand All @@ -49,16 +46,15 @@ jobs:
# TODO: caching
- name: Install APT packages
run: |
sudo apt -qq install -y g++ libboost-all-dev libboost-system-dev libboost-filesystem-dev libboost-program-options-dev graphviz doxygen libtinfo-dev zlib1g-dev texinfo unzip device-tree-compiler pandoc
sudo apt -qq install -y g++ libboost-all-dev libboost-system-dev libboost-filesystem-dev libboost-program-options-dev graphviz doxygen libtinfo-dev zlib1g-dev texinfo unzip device-tree-compiler pandoc texlive-xetex texlive-fonts-recommended texlive-plain-generic
sudo apt -qq install -y ninja-build flex
sudo apt remove clang-11* llvm-11*
- name: Run Notebooks
run: |
cd ipynb
# find ${{ github.event.inputs.path }} -name '*.ipynb' -exec ./run_notebook.sh {} \;
find Examples/AnalyseInstructionsFeature -name '*.ipynb' -exec ./run_notebook.sh {} \;
find ${{ github.event.inputs.path }} -name '*.ipynb' -print0 | xargs -n1 -0 ./run_notebook.sh --html --pdf --mill --cleanup
- name: Archive reports
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: output
path: |
Expand All @@ -69,15 +65,14 @@ jobs:
run: echo "timestamp=`date +%FT%T`" >> $GITHUB_ENV
- name: Create Pull Request
uses: peter-evans/create-pull-request@v5
# if: github.event_name == 'workflow_dispatch' && github.event.inputs.branch != ''
if: github.event_name == 'workflow_dispatch' && github.event.inputs.branch != ''
with:
# token: ${{ secrets.PAT }}
commit-message: Update Notebook Outputs for ${{ github.event.inputs.path }} on ${{ env.timestamp }}
committer: GitHub <[email protected]>
author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
signoff: false
# branch: ${{ github.event.inputs.branch }}
branch: pr-ipynb
branch: ${{ github.event.inputs.branch }}
delete-branch: true
title: '[ipynb] Update Notebook Ouputs'
body: |
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ sudo apt install python3-pip python3-venv
sudo apt install libboost-all-dev graphviz doxygen libtinfo-dev zlib1g-dev texinfo unzip device-tree-compiler tree g++
# Optional (depending on configuration)
sudo apt install ninja-build flex
sudo apt install ninja-build flex lsb-release libelf-dev
```

Also make sure that your default Python is at least v3.7. If the `python` command is not available in your shell or points Python v2.7 check out `python-is-python3`.
Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ RUN apt-get update \
bison flex texinfo gperf libtool patchutils bc zlib1g-dev libexpat-dev ca-certificates \
virtualenv git python3-dev python3-pip python3-setuptools libtinfo5 libzstd-dev \
gcc libedit-dev libxml2-dev libopenblas-dev liblapack-dev gfortran cmake unzip ninja-build python-is-python3 device-tree-compiler libboost-all-dev \
libfl-dev \
libfl-dev lsb-release libelf-dev \
&& apt-get clean \
&& rm -rf /var/cache/apt/archives/ \
&& rm -rf /var/cache/apt/lists
Expand Down
100 changes: 100 additions & 0 deletions docker/Dockerfile_arch
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
##
## Copyright (c) 2022 TUM Department of Electrical and Computer Engineering.
##
## This file is part of MLonMCU.
## See https://github.com/tum-ei-eda/mlonmcu.git for further info.
##
## Licensed under the Apache License, Version 2.0 (the "License");
## you may not use this file except in compliance with the License.
## You may obtain a copy of the License at
##
## http://www.apache.org/licenses/LICENSE-2.0
##
## Unless required by applicable law or agreed to in writing, software
## distributed under the License is distributed on an "AS IS" BASIS,
## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
## See the License for the specific language governing permissions and
## limitations under the License.
##
ARG ENABLE_CMAKE="false"

# FROM archlinux:latest AS cmake-install
# ARG CMAKE_REPO="https://github.com/Kitware/CMake"
# ARG CMAKE_VERSION="3.22.2"
# ARG CMAKE_TARGET="Linux-x86_64"
# ARG ENABLE_CMAKE
#
# RUN mkdir -p /opt/tools/cmake \
# && if [ "${ENABLE_CMAKE}" = "true" ] ; \
# then echo "Installing CMake..." ; \
# else echo "Skipping cmake-install" ; \
# fi
#
# RUN if [ "${ENABLE_CMAKE}" = "true" ] ; \
# then apt-get update \
# && export DEBIAN_FRONTEND=noninteractive \
# && apt-get -y install --no-install-recommends wget ca-certificates \
# && apt-get clean \
# && rm -rf /var/cache/apt/archives/ \
# && rm -rf /var/cache/apt/lists; \
# fi
#
# # Install modern CMake
# RUN if [ "${ENABLE_CMAKE}" = "true" ] ; \
# then cd /tmp \
# && wget -O cmake.sh ${CMAKE_REPO}/releases/download/v${CMAKE_VERSION}/cmake-${CMAKE_VERSION}-${CMAKE_TARGET}.sh \
# && sh ./cmake.sh --prefix=/opt/tools/cmake/ --skip-license \
# && rm ./cmake.sh ; \
# fi

FROM archlinux:latest AS mlonmcu-ci

# COPY --from=cmake-install /opt/tools/cmake/ /opt/tools/cmake/
# ENV PATH="/opt/tools/cmake/bin:${PATH}"
# ENV CMAKE_DIR="/opt/tools/cmake"

# Install APT dependencies (TODO: update list)
# RUN apt-get update \
# && export DEBIAN_FRONTEND=noninteractive \
# && apt-get -y install --no-install-recommends wget unzip vim openssh-client \
# g++ graphviz doxygen libtinfo-dev zlib1g-dev \
# autoconf automake autotools-dev curl python3 libmpc-dev libmpfr-dev libgmp-dev gawk build-essential \
# bison flex texinfo gperf libtool patchutils bc zlib1g-dev libexpat-dev ca-certificates \
# virtualenv git python3-dev python3-pip python3-setuptools libtinfo5 libzstd-dev \
# gcc libedit-dev libxml2-dev libopenblas-dev liblapack-dev gfortran cmake unzip ninja-build python-is-python3 device-tree-compiler libboost-all-dev \
# libfl-dev \
# && apt-get clean \
# && rm -rf /var/cache/apt/archives/ \
# && rm -rf /var/cache/apt/lists
RUN pacman --noconfirm -Sy python-pip git cmake base-devel gcc boost dtc wget unzip ncurses
RUN link /lib/libtinfo.so.6 /lib/libtinfo.so.5

CMD /bin/bash

FROM mlonmcu-ci AS mlonmcu

ADD . /mlonmcu
WORKDIR /mlonmcu
RUN python -m venv /venv
RUN source /venv/bin/activate && pip install -r requirements.txt --no-cache-dir
RUN source /venv/bin/activate && pip install . --no-cache-dir
CMD mlonmcu

ARG MLONMCU_TEMPLATE=default
FROM mlonmcu AS mlonmcu-bench

WORKDIR /environment

RUN source /venv/bin/activate && mlonmcu init --template ${MLONMCU_TEMPLATE} --non-interactive /environment --clone-models
ENV MLONMCU_HOME=/environment

RUN source /venv/bin/activate && mlonmcu setup -g

RUN source /venv/bin/activate && pip install -r /environment/requirements_addition.txt --no-cache-dir

RUN source /venv/bin/activate && mlonmcu setup -v

RUN df -h

CMD mlonmcu
VOLUME /environment
3 changes: 3 additions & 0 deletions ipynb/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
# generated by TVMs profiling feature
*.json
*.pdf
*.html
*.orig
Loading

0 comments on commit 2a9d911

Please sign in to comment.