blob: 55829cc5aacc1ff46dfacda8c315dddbb9de8b9c [file] [log] [blame]
Richard Burtonbcec6752023-11-03 16:21:58 +00001# SPDX-FileCopyrightText: Copyright 2022-2023 Arm Limited and/or its affiliates <open-source-office@arm.com>
Kshitij Sisodia1ec169b2022-06-01 09:06:21 +01002# SPDX-License-Identifier: Apache-2.0
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15
Conor Kennedyc56eeda2023-12-04 14:43:32 +000016FROM ubuntu:22.04
Kshitij Sisodia1ec169b2022-06-01 09:06:21 +010017ENV DEBIAN_FRONTEND noninteractive
18ENV EVAL_KIT_DIR "/home/ml-embedded-evaluation-kit"
19
20RUN apt-get update && \
21 apt-get install -y \
22 make \
23 git \
Richard Burton49482d52023-11-30 11:38:45 +000024 python3.10 \
Kshitij Sisodia1ec169b2022-06-01 09:06:21 +010025 python3-pip \
Richard Burton49482d52023-11-30 11:38:45 +000026 python3.10-dev \
27 python3.10-venv \
Kshitij Sisodia1ec169b2022-06-01 09:06:21 +010028 unzip \
29 curl \
30 wget \
31 gpg \
32 libsndfile1 \
33 sudo \
34 telnet
Conor Kennedyc56eeda2023-12-04 14:43:32 +000035
36# Check versions
37RUN gcc --version && g++ --version && python3 --version
Kshitij Sisodia1ec169b2022-06-01 09:06:21 +010038
Conor Kennedyc56eeda2023-12-04 14:43:32 +000039# Download and install GNU GCC 13.2 embedded toolchain
Richard Burtonbcec6752023-11-03 16:21:58 +000040RUN curl -L https://developer.arm.com/-/media/Files/downloads/gnu/13.2.rel1/binrel/arm-gnu-toolchain-13.2.rel1-x86_64-arm-none-eabi.tar.xz -o gcc-arm-none-eabi.tar.xz && \
41 echo "6cd1bbc1d9ae57312bcd169ae283153a9572bd6a8e4eeae2fedfbc33b115fdbb gcc-arm-none-eabi.tar.xz" | sha256sum -c && \
Kshitij Sisodia1ec169b2022-06-01 09:06:21 +010042 mkdir /opt/gcc-arm-none-eabi && \
43 tar -xf gcc-arm-none-eabi.tar.xz -C /opt/gcc-arm-none-eabi --strip-components 1 && \
44 rm gcc-arm-none-eabi.tar.xz
45
Conor Kennedyc56eeda2023-12-04 14:43:32 +000046# Download and install the Arm Corstone_SSE-300 FVP
Kshitij Sisodiaa8f8a482024-03-08 11:42:26 +000047RUN wget https://developer.arm.com/-/media/Arm%20Developer%20Community/Downloads/OSS/FVP/Corstone-300/FVP_Corstone_SSE-300_11.24_13_Linux64.tgz 2>/dev/null && \
48 echo "6ea4096ecf8a8c06d6e76e21cae494f0c7139374cb33f6bc3964d189b84539a9 FVP_Corstone_SSE-300_11.24_13_Linux64.tgz" | sha256sum -c && \
Kshitij Sisodia1ec169b2022-06-01 09:06:21 +010049 mkdir -p /home/FVP_Corstone_SSE-300/ && \
Kshitij Sisodiaa8f8a482024-03-08 11:42:26 +000050 tar -xf FVP_Corstone_SSE-300_11.24_13_Linux64.tgz -C /home/FVP_Corstone_SSE-300/ && \
Kshitij Sisodia1ec169b2022-06-01 09:06:21 +010051 bash /home/FVP_Corstone_SSE-300/FVP_Corstone_SSE-300.sh --no-interactive --i-agree-to-the-contained-eula -d /home/FVP_Corstone_SSE-300 && \
Kshitij Sisodiaa8f8a482024-03-08 11:42:26 +000052 rm FVP_Corstone_SSE-300_11.24_13_Linux64.tgz
Kshitij Sisodia1ec169b2022-06-01 09:06:21 +010053
54# Clone the ml-embedded-evaluation-kit repository
55RUN git clone "https://review.mlplatform.org/ml/ethos-u/ml-embedded-evaluation-kit" ${EVAL_KIT_DIR}
56
57# Change working directory
58WORKDIR ${EVAL_KIT_DIR}
59
60# Initialize submodules
61RUN git submodule update --init
62
63# Download and install resources required for ml-embedded-evaluation-kit
64RUN python3 ./set_up_default_resources.py
65
66# Update PATH to make the required version of CMake and GNU embedded toolchain is available:
67ENV PATH="${EVAL_KIT_DIR}/resources_downloaded/env/bin:/opt/gcc-arm-none-eabi/bin:${PATH}"
68
69# FVP binary paths:
Kshitij Sisodiaa8f8a482024-03-08 11:42:26 +000070ENV FVP_ETHOS_U55="/home/FVP_Corstone_SSE-300/models/Linux64_GCC-9.3/FVP_Corstone_SSE-300_Ethos-U55"
71ENV FVP_ETHOS_U65="/home/FVP_Corstone_SSE-300/models/Linux64_GCC-9.3/FVP_Corstone_SSE-300_Ethos-U65"
Kshitij Sisodia1ec169b2022-06-01 09:06:21 +010072
73# Default FVP arguments for no GUI and telnet pop ups:
74ENV FVP_ARGS="-C mps3_board.telnetterminal0.start_telnet=0 -C mps3_board.uart0.out_file='-' -C mps3_board.uart0.shutdown_on_eot=1 -C mps3_board.visualisation.disable-visualisation=1"