-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Build updated base image - OSS mode and new FVP models 11.22.39
- Loading branch information
1 parent
010b351
commit f376edc
Showing
9 changed files
with
69 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
|
||
.DS_Store | ||
*.o |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
wget https://artifacts.keil.arm.com/arm-none-eabi-gcc/12.3.1/arm-gnu-toolchain-x86_64-arm-none-eabi.tar.bz2 -nv | ||
tar -xf arm-gnu-toolchain-x86_64-arm-none-eabi.tar.bz2 -C /home/arm_mlops_docker | ||
chown -R arm_mlops_docker /home/arm_mlops_docker/arm-gnu-toolchain-12.3.rel1-x86_64-arm-none-eabi/ | ||
chown -R arm_mlops_docker `/home/arm_mlops_docker/arm-gnu-toolchain-12.3.rel1-x86_64-arm-none-eabi/` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
wget https://github.com/ARM-software/LLVM-embedded-toolchain-for-Arm/releases/download/release-16.0.0/LLVMEmbeddedToolchainForArm-16.0.0-Linux-x86_64.tar.gz -nv | ||
tar -xf LLVMEmbeddedToolchainForArm-16.0.0-Linux-x86_64.tar.gz -C /home/arm_mlops_docker | ||
apt install -y libtinfo5 | ||
echo 'export PATH="$PATH:/home/arm_mlops_docker/LLVMEmbeddedToolchainForArm-16.0.0-Linux-x86_64/bin"' >> /home/arm_mlops_docker/.bashrc | ||
#echo 'export "/home/arm_mlops_docker/LLVMEmbeddedToolchainForArm-16.0.0-Linux-x86_64/bin:$PATH"' >> /home/arm_mlops_docker/.bashrc | ||
chown -R arm_mlops_docker /home/arm_mlops_docker/LLVMEmbeddedToolchainForArm-16.0.0-Linux-x86_64 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
wget https://artifacts.keil.arm.com/avh/11.21.15/avh-fvp-cortex-m-linux-amd64.tar.bz2 -nv | ||
mkdir /home/arm_mlops_docker/avh-fvp-11.21.15 | ||
tar -xvf avh-fvp-cortex-m-linux-amd64.tar.bz2 -C /home/arm_mlops_docker/avh-fvp-11.21.15 | ||
chmod 0755 /home/arm_mlops_docker/avh-fvp-11.21.15 -R | ||
wget https://artifacts.keil.arm.com/avh/11.22.39/avh-fvp-linux-amd64.tar.gz -nv | ||
mkdir /home/arm_mlops_docker/avh-fvp-11.22.39 | ||
tar -xvf avh-fvp-linux-amd64.tar.gz -C /home/arm_mlops_docker/avh-fvp-11.22.39 | ||
chmod 0755 /home/arm_mlops_docker/avh-fvp-11.22.39 -R |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,11 @@ | ||
ARG BASE_IMAGE | ||
FROM ${BASE_IMAGE} as base | ||
|
||
ADD arm_mlops_docker_license /arm_mlops_docker_license | ||
RUN su -l arm_mlops_docker -c "/home/arm_mlops_docker/ArmCompilerforEmbedded6.20/bin/armlm import --file /arm_mlops_docker_license" | ||
ADD arm_mlops_docker_license* /arm_mlops_docker_license* | ||
RUN if [ -f /arm_mlops_docker_license ]; then \ | ||
su -l arm_mlops_docker -c "/home/arm_mlops_docker/ArmCompilerforEmbedded6.20/bin/armlm import --file /arm_mlops_docker_license"; \ | ||
else \ | ||
su -l arm_mlops_docker -c "/home/arm_mlops_docker/ArmCompilerforEmbedded6.20/bin/armlm activate -product KEMDK-COM0 -server https://mdk-preview.keil.arm.com"; \ | ||
fi | ||
|
||
FROM base |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
#!/bin/bash | ||
|
||
# Check if the license code is provided as an argument | ||
LICENSE_CODE=${1:-} | ||
|
||
# Make sure Docker engine is installed | ||
if ! command -v docker &> /dev/null | ||
then | ||
echo "Docker is not installed. Please install Docker and try again." | ||
exit 1 | ||
fi | ||
|
||
# Check if Docker daemon is running | ||
DOCKER_INFO=$(docker info 2>&1) | ||
if [[ $DOCKER_INFO == *"Cannot connect to the Docker daemon"* ]]; then | ||
echo "Docker is not running. Please start Docker and try again." | ||
exit 1 | ||
fi | ||
|
||
# Build the base image | ||
docker build -t arm-mlops-docker-base:latest -f ../docker_base/Dockerfile ../docker_base --platform=linux/amd64 | ||
|
||
# Run an instance of the image in a container | ||
docker run -d --name build_container -u root -v ../:/workspace --platform=linux/amd64 arm-mlops-docker-base:latest sleep infinity | ||
|
||
# If the license code is provided, export it and copy to build folder | ||
if [[ -n "$LICENSE_CODE" ]]; then | ||
docker exec build_container /home/arm_mlops_docker/ArmCompilerforEmbedded6.20/bin/armlm activate --code $LICENSE_CODE --as-user arm_mlops_docker --to-file /workspace/arm_mlops_docker_license | ||
cp ../arm_mlops_docker_license ../docker_licensed/arm_mlops_docker_license | ||
fi | ||
|
||
# Build an image based on the base image, adding the license. This needs to be rebuild whenever the license expires | ||
docker build -t arm-mlops-docker-licensed:latest -f ../docker_licensed/Dockerfile ../docker_licensed --build-arg BASE_IMAGE=arm-mlops-docker-base --platform=linux/amd64 | ||
|
||
# Run an instance of the image | ||
docker run -d --name local_arm_mlops_container -u root -v $(readlink -f ../):/workspace --platform=linux/amd64 arm-mlops-docker-licensed:latest sleep infinity | ||
|
||
# Test if the Arm Compiler can be executed and displays your license | ||
docker exec local_arm_mlops_container su -l arm_mlops_docker -c "/home/arm_mlops_docker/ArmCompilerforEmbedded6.20/bin/armclang --version" | ||
|
||
# Test if a Arm Virtual Hardware FVP can be executed | ||
docker exec local_arm_mlops_container su -l arm_mlops_docker -c "/home/arm_mlops_docker/avh-fvp-11.22.39/avh-linux-x86/bin/FVP_MPS2_Cortex-M33 --version" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Test if a project can be compiled and executed | ||
docker exec local_arm_mlops_container wget -P /home/arm_mlops_docker https://github.com/ARM-software/CMSIS_6/releases/download/dev%2Fv6.0.0-dev35/ARM.CMSIS.6.0.0-dev35+geb1d42a.pack -nv | ||
docker exec local_arm_mlops_container su -l arm_mlops_docker -c "/home/arm_mlops_docker/cmsis-toolbox-linux-amd64/bin/cpackget add ARM.CMSIS.6.0.0-dev35+geb1d42a.pack --agree-embedded-license" | ||
docker exec local_arm_mlops_container wget -P /home/arm_mlops_docker https://github.com/ARM-software/Cortex_DFP/releases/download/dev%2Fv1.0.0-dev15/ARM.Cortex_DFP.1.0.0-dev15+gf6802e4.pack -nv | ||
docker exec local_arm_mlops_container su -l arm_mlops_docker -c "/home/arm_mlops_docker/cmsis-toolbox-linux-amd64/bin/cpackget add ARM.Cortex_DFP.1.0.0-dev15+gf6802e4.pack --agree-embedded-license" | ||
|
||
docker exec local_arm_mlops_container su - arm_mlops_docker -c "/home/arm_mlops_docker/cmsis-toolbox-linux-amd64/bin/cbuild /workspace/mlek-kws/MLOps.csolution.yml --packs --context +CM4 --toolchain AC6" | ||
docker exec local_arm_mlops_container su - arm_mlops_docker -c "LD_LIBRARY_PATH=/home/arm_mlops_docker/avh-fvp-11.21.15/avh-fvp-cortex-m-linux-amd64/bin/ /home/arm_mlops_docker/avh-fvp-11.22.39/avh-linux-x86/bin/FVP_MPS2_Cortex-M4 -f /workspace/TFLmicrospeech/Target/CM4/fvp_config.txt /workspace/mlek-kws/out/ML_Test/CM4/size/ML_Test.axf --simlimit 12" |