{"id":19289,"date":"2024-12-18T15:06:10","date_gmt":"2024-12-18T13:06:10","guid":{"rendered":"https:\/\/www.btc-embedded.com\/?p=19289"},"modified":"2025-06-03T12:38:28","modified_gmt":"2025-06-03T10:38:28","slug":"cloud-friendly-testing-for-of-model-based-software-components-with-docker","status":"publish","type":"post","link":"https:\/\/www.btc-embedded.com\/zh-hans\/cloud-friendly-testing-for-of-model-based-software-components-with-docker\/","title":{"rendered":"Cloud-friendly testing for of model-based software components with Docker"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-post\" data-elementor-id=\"19289\" class=\"elementor elementor-19289\" data-elementor-post-type=\"post\">\n\t\t\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-37892ab elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"37892ab\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-c61e693\" data-id=\"c61e693\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-4102ea5 elementor-widget elementor-widget-heading\" data-id=\"4102ea5\" data-element_type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">Toolchains in model-based automotive development projects<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-27ecd9a elementor-widget elementor-widget-text-editor\" data-id=\"27ecd9a\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>No doubt, model-based development (MBD) projects offer a lot of benefits for automotive embedded software development, especially in the mechatronics-focused domains. However, compared to classic software development which mostly relies on a compiler, maybe a build tool plus some libraries for testing, checks, etc., MBD is guaranteed to come with a heavy Windows-based toolchain from the vast MATLAB Simulink ecosystem.<\/p><p>To complicate things even further, these toolchains are usually entirely different for each company:<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-80adf30 elementor-widget elementor-widget-image\" data-id=\"80adf30\" data-element_type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t<figure class=\"wp-caption\">\n\t\t\t\t\t\t\t\t\t\t<img fetchpriority=\"high\" decoding=\"async\" width=\"800\" height=\"434\" src=\"https:\/\/www.btc-embedded.com\/wp-content\/uploads\/2024\/12\/Blog1.webp\" class=\"attachment-large size-large wp-image-19301\" alt=\"Cloud-friendly testing for of model-based software components with Docker\" srcset=\"https:\/\/www.btc-embedded.com\/wp-content\/uploads\/2024\/12\/Blog1.webp 1384w, https:\/\/www.btc-embedded.com\/wp-content\/uploads\/2024\/12\/Blog1-768x417.webp 768w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/>\t\t\t\t\t\t\t\t\t\t\t<figcaption class=\"widget-image-caption wp-caption-text\">Fig.01: Model-based Development Toolchain<\/figcaption>\n\t\t\t\t\t\t\t\t\t\t<\/figure>\n\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-53bfae4 elementor-widget elementor-widget-text-editor\" data-id=\"53bfae4\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>Consequently, there is no standard toolchain package or standard CI pipeline, let alone an off-the-shelf Amazon EC2 or AzureVM template. But we still don\u2019t want to be forced to install 10 different tools whenever we provide a CI runner or developer VM. We need a solution that is easy to use, easy to rollout to CI runners, and easy to maintain.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-5182ad6 elementor-widget elementor-widget-heading\" data-id=\"5182ad6\" data-element_type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">Using Virtual Machines to ensure a consistent environment<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-2053de4 elementor-widget elementor-widget-text-editor\" data-id=\"2053de4\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>Virtual machines seem to be the perfect fit. They provide a nice, sandboxed environment and \u2013 when working in a managed solution like Amazon EC2 or AzureVM or applying tools like Chef, Puppet, Ansible or Terraform \u2013 you can prepare VM templates that can be rolled out at scale.<\/p><p>This provides a huge benefit, as VM templates can be prepared by a central team \u2013 even allowing manual adaptions \u2013 and then be rolled out both as developer VMs and as CI unners. Keeping both worlds identical is a great advantage, especially when developers need to debug failed CI runs.<\/p><p>However, the flexibility of VMs is also a big weakness: humans naturally seek the path of least resistance and if something can be solved by a manual tweak, we will utilize that. Consequently, it\u2019s hard to know the cause when the VMs suddenly act up after a roll out. Has someone forgotten an essential manual step? Or was the VM corrupted after the rollout \u2013 permanently modified by an application running inside it?<\/p><p>Broken access rights, missing or modified environment variables, or a full disk due to missing clean up routines are just some of the many things that tend to go wrong when VMs are deployed at scale.<\/p><p>This can be mitigated partially by applying a strict configuration-as-code approach; however, this usually requires additional management solutions. I\u2019ve worked in projects where the solution was a nightly reset of VMs, to ensure that their state doesn\u2019t stray too far from the original state, but in my opinion, those nightly resets were causing more problems than they solved.<\/p><p>A system should either stay the way that I left it or be entirely ephemeral. But a mix of these concepts leads to situations where it\u2019s sometimes working great, sometimes slightly off, and at other times completely broken.<\/p><p>And to make things worse, having VMs constantly active in the cloud is very costly, with an especially bad cost-benefit ratio at times where they are idling, as Windows tends to make sure that the CPU doesn\u2019t get bored. On the other hand, treating VMs for CI runners as entirely ephemeral (start on demand and discard after use) solves most of those problems, but also comes at a high price:<\/p><ul><li>Big delays due to slow startup times (usually over 1 minute)<\/li><li>High resource consumption on startup (unrelated to the actual workload)<\/li><li>Compute, Memory and storage footprint increased by OS<\/li><\/ul>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-fcb11a9 elementor-widget elementor-widget-heading\" data-id=\"fcb11a9\" data-element_type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">Solving the pain-points with Docker Containers<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-047c236 elementor-widget elementor-widget-text-editor\" data-id=\"047c236\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>The pain-points described above are not entirely new. For these exact reasons, containers have emerged as a leading solution.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-255514e elementor-widget elementor-widget-text-editor\" data-id=\"255514e\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>If you\u2019ve never heard of a container, feel free to google for a textbook explanation or consider the following perspective:<\/p><p>You can think of a virtual machine as a house. An application can run inside a VM the same way you can live in a house. The house has its own foundation, driveway, plumbing, central heating and utilities. If you run applications at scale using virtual machines, you duplicate all of that.<\/p><p>Similarly, you can think of a container as an apartment. You can also live in it, but not every apartment needs its own foundation, driveway, plumbing, central heating and utilities. When running applications at scale in containers, you basically operate a big student residence. The cheap rent this concept offers is directly reflected on your cloud bill \ud83e\udd13<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-10ed52f elementor-widget elementor-widget-text-editor\" data-id=\"10ed52f\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>This already mitigates the problem of costly resource consumption overheads. But containers can do so much more! They are built from a text file recipe (the Dockerfile), which is kept in source control (configuration-as-code). This is important: changing the container means changing the Dockerfile and that means a commit to your git repository. In other words: it\u2019s very easy to track changes and roll back a working state in case something breaks.<\/p><p>From the Dockerfile an immutable container image is built and stored in a container registry from where it can be accessed when needed. It starts up in a second, as the container shares the host\u2019s kernel instead of having its own full-fledged operating system. This enables pretty much native performance and a minimal resource overhead while providing a well-defined sandbox environment for apps running in the container.<\/p><p>The only disadvantage: container technology was designed for Linux-based operating systems. While it\u2019s also available on Windows, the experience is much smoother on Linux: This makes it harder to achieve environmental parity between CI and developer VMs (which are mostly Windows-based in automotive). But if anything, I would argue that a Linux-based container running your code using GCC is closer to your hardware target than a Windows server equipped with a Visual Studio compiler.<\/p><p>The only real deal-breaker can be the fact that your company\u2019s toolchain includes tools that only run on Windows. But there\u2019s a good chance that this doesn\u2019t affect you: given the rising demand, most tool vendors in the industry have added Linux support in the last five years.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-734b08a elementor-widget elementor-widget-heading\" data-id=\"734b08a\" data-element_type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">Putting it all together in an example<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-f5186da elementor-widget elementor-widget-text-editor\" data-id=\"f5186da\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\tNow that we\u2019ve established the benefits, let\u2019s try it out with an example! Let\u2019s consider a toolchain for a model-based CI workflow with MIL+SIL tests using:\n<ul>\n \t<li>MATLAB R2023b<\/li>\n \t<li>BTC EmbeddedPlatform 24.3p0<\/li>\n \t<li>GitHub Actions for CI<\/li>\n<\/ul>\n<p>\n<p>\nOur example has the following file structure:\u00b4\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-4aee19d elementor-widget elementor-widget-image\" data-id=\"4aee19d\" data-element_type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t<figure class=\"wp-caption\">\n\t\t\t\t\t\t\t\t\t\t<img decoding=\"async\" width=\"800\" height=\"517\" src=\"https:\/\/www.btc-embedded.com\/wp-content\/uploads\/2024\/12\/Blog2.webp\" class=\"attachment-large size-large wp-image-19298\" alt=\"Cloud-friendly testing for of model-based software components with Docker\" srcset=\"https:\/\/www.btc-embedded.com\/wp-content\/uploads\/2024\/12\/Blog2.webp 1384w, https:\/\/www.btc-embedded.com\/wp-content\/uploads\/2024\/12\/Blog2-768x497.webp 768w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/>\t\t\t\t\t\t\t\t\t\t\t<figcaption class=\"widget-image-caption wp-caption-text\"><\/figcaption>\n\t\t\t\t\t\t\t\t\t\t<\/figure>\n\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-18487b7 elementor-widget elementor-widget-text-editor\" data-id=\"18487b7\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>Our model is already working (=it compiles and can generate c-code) and we can run our tests using the Python script from the scripts-directory. But the script requires \u00a0the necessary toolchain to be available. Our goal for this example is to be able to say \u201crun my tests on model and code\u201d without requiring any software to be installed (except for Docker).<\/p><p>This is where the <strong>Dockerfile<\/strong> comes in as our recipe to define the required toolchain.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-d99c8ce elementor-widget elementor-widget-heading\" data-id=\"d99c8ce\" data-element_type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">General approach: creating a container image<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-18e3367 elementor-widget elementor-widget-text-editor\" data-id=\"18e3367\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>We will base our image on the official <strong>mathworks\/matlab<\/strong> image and customize it to meet our needs, including adding BTC EmbeddedPlatform from the public image <strong>btces\/ep<\/strong>. Most importantly, we\u2019ll expose the tool versions as build arguments, so that we can easily adapt them whenever we want to switch tool versions:<\/p><p class=\"MsoNormal\" style=\"margin: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; color: #000000; line-height: 13.5pt; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;\"><span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #af00db;\">ARG<\/span> <span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #001080;\">EP_RELEASE<\/span><span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo;\">=<\/span><span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #001080;\">24.2p0<\/span><\/p><p class=\"MsoNormal\" style=\"margin: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; color: #000000; line-height: 13.5pt; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;\"><span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #af00db;\">ARG<\/span> <span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #001080;\">MATLAB_RELEASE<\/span><span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo;\">=<\/span><span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #001080;\">R2023b<\/span><\/p><p class=\"MsoNormal\" style=\"margin: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; color: #000000; line-height: 13.5pt; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;\"><span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #3b3b3b;\">\u00a0<\/span><\/p><p class=\"MsoNormal\" style=\"margin: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; color: #000000; line-height: 13.5pt; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;\"><span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #af00db;\">FROM<\/span> <span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #267f99;\">btces\/ep<\/span><span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #3b3b3b;\">:<\/span><span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #001080;\">${EP_RELEASE}<\/span> <span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #af00db;\">AS<\/span> <span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #267f99;\">ep<\/span><\/p><p class=\"MsoNormal\" style=\"margin: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; color: #000000;\"><span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #af00db;\">FROM<\/span> <span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #267f99;\">mathworks\/matlab<\/span><span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #3b3b3b;\">:<\/span><span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #001080;\">${MATLAB_RELEASE}<\/span> <span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #af00db;\">AS<\/span> <span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #267f99;\">matlab<\/span><\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-93bad43 elementor-widget elementor-widget-heading\" data-id=\"93bad43\" data-element_type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">MATLAB-related steps<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-0c2df6e elementor-widget elementor-widget-text-editor\" data-id=\"0c2df6e\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>To customize MATLAB to our needs, we first use <strong>mpm<\/strong> (=matlab package manager) to setup the required products\/toolboxes:<\/p><p class=\"MsoNormal\" style=\"margin: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; color: #000000; line-height: 13.5pt; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;\"><span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: green;\"># &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<\/span><\/p><p class=\"MsoNormal\" style=\"margin: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; color: #000000; line-height: 13.5pt; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;\"><span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: green;\"># MATLAB-specific configurations<\/span><\/p><p class=\"MsoNormal\" style=\"margin: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; color: #000000; line-height: 13.5pt; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;\"><span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: green;\"># &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<\/span><\/p><p class=\"MsoNormal\" style=\"margin: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; color: #000000; line-height: 13.5pt; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;\"><span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: green;\"># Install required matlab products &amp; set up license<\/span><\/p><p class=\"MsoNormal\" style=\"margin: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; color: #000000; line-height: 13.5pt; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;\"><span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #af00db;\">ARG<\/span> <span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #001080;\">MATLAB_RELEASE<\/span><\/p><p class=\"MsoNormal\" style=\"margin: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; color: #000000; line-height: 13.5pt; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;\"><span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #af00db;\">ARG<\/span> <span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #001080;\">MATLAB_PRODUCTS<\/span><span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo;\">=<\/span><span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #a31515;\">&#8220;Embedded_Coder AUTOSAR_Blockset MATLAB_Coder Simulink Simulink_Coder Simulink_Coverage Stateflow&#8221;<\/span><\/p><p class=\"MsoNormal\" style=\"margin: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; color: #000000; line-height: 13.5pt; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;\"><span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #af00db;\">USER<\/span> <span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #001080;\">root<\/span><\/p><p class=\"MsoNormal\" style=\"margin: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; color: #000000; line-height: 13.5pt; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;\"><span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #af00db;\">RUN<\/span> <span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #001080;\">apt<\/span> <span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #001080;\">update<\/span> <span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #001080;\">&amp;&amp;<\/span> <span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #001080;\">apt-get<\/span> <span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #001080;\">install<\/span> <span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #001080;\">-y<\/span> <span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #001080;\">wget<\/span><\/p><p class=\"MsoNormal\" style=\"margin: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; color: #000000; line-height: 13.5pt; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;\"><span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #af00db;\">RUN<\/span> <span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #001080;\">wget<\/span> <span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #001080;\">-q<\/span> <span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #001080;\">https:\/\/www.mathworks.com\/mpm\/glnxa64\/mpm<\/span> <span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #001080;\">&amp;&amp;<\/span> <span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #001080;\">chmod<\/span> <span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #001080;\">+x<\/span> <span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #001080;\">mpm<\/span> <span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: blue;\">\\<\/span><\/p><p class=\"MsoNormal\" style=\"margin: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; color: #000000; line-height: 13.5pt; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;\"><span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #3b3b3b;\">\u00a0\u00a0\u00a0 <\/span><span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #001080;\">&amp;&amp;<\/span> <span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #001080;\">.\/mpm<\/span> <span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #001080;\">install<\/span> <span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: blue;\">\\<\/span><\/p><p class=\"MsoNormal\" style=\"margin: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; color: #000000; line-height: 13.5pt; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;\"><span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #3b3b3b;\">\u00a0\u00a0\u00a0 <\/span><span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #001080;\">&#8211;release=${MATLAB_RELEASE}<\/span><span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #3b3b3b;\">\u00a0 <\/span><span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: blue;\">\\<\/span><\/p><p class=\"MsoNormal\" style=\"margin: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; color: #000000; line-height: 13.5pt; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;\"><span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #3b3b3b;\">\u00a0\u00a0\u00a0 <\/span><span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #001080;\">&#8211;destination=\/opt\/matlab<\/span><span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #3b3b3b;\">\u00a0 <\/span><span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: blue;\">\\<\/span><\/p><p class=\"MsoNormal\" style=\"margin: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; color: #000000; line-height: 13.5pt; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;\"><span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #3b3b3b;\">\u00a0\u00a0\u00a0 <\/span><span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #001080;\">&#8211;products<\/span> <span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #001080;\">${MATLAB_PRODUCTS}<\/span> <span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: blue;\">\\<\/span><\/p><p class=\"MsoNormal\" style=\"margin: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; color: #000000; line-height: 13.5pt; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;\"><span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #3b3b3b;\">\u00a0\u00a0\u00a0 <\/span><span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #001080;\">&amp;&amp;<\/span> <span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #001080;\">rm<\/span> <span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #001080;\">-f<\/span> <span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #001080;\">mpm<\/span> <span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #001080;\">\/tmp\/mathworks_root.log<\/span> <span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: blue;\">\\<\/span><\/p><p class=\"MsoNormal\" style=\"margin: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; color: #000000; line-height: 13.5pt; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;\"><span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #3b3b3b;\">\u00a0\u00a0\u00a0 <\/span><span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #001080;\">&amp;&amp;<\/span> <span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #001080;\">ln<\/span> <span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #001080;\">-f<\/span> <span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #001080;\">-s<\/span> <span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #001080;\">\/opt\/matlab\/bin\/matlab<\/span> <span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #001080;\">\/usr\/local\/bin\/matlab<\/span><\/p><p class=\"MsoNormal\" style=\"margin: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; color: #000000; line-height: 13.5pt; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;\"><span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: green;\"># configure MATLAB license server<\/span><\/p><p class=\"MsoNormal\" style=\"margin: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; color: #000000; line-height: 13.5pt; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;\"><span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #af00db;\">ENV<\/span> <span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #001080;\">MLM_LICENSE_FILE<\/span><span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo;\">=<\/span><span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #001080;\">27000@matlab.license.server<\/span><\/p><p class=\"MsoNormal\" style=\"margin: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; color: #000000; line-height: 13.5pt; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;\"><span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #001080;\">\u00a0<\/span><\/p><p>At the time of writing, the MATLAB images no longer shipped a compiler, so we\u2019ll add <strong>gcc<\/strong>:<\/p><p class=\"MsoNormal\" style=\"margin: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; color: #000000; line-height: 13.5pt; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;\"><span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: green;\"># mex-compiler: gcc 11<\/span><\/p><p class=\"MsoNormal\" style=\"margin: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; color: #000000; line-height: 13.5pt; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;\"><span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #af00db;\">RUN<\/span> <span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #001080;\">export<\/span> <span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #001080;\">DEBIAN_FRONTEND=noninteractive<\/span> <span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #001080;\">&amp;&amp;<\/span> <span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #001080;\">apt-get<\/span> <span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #001080;\">install<\/span> <span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #001080;\">-y<\/span> <span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #001080;\">gcc-11<\/span> <span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #001080;\">&amp;&amp;<\/span> <span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #001080;\">update-alternatives<\/span> <span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #001080;\">&#8211;install<\/span> <span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #001080;\">\/usr\/bin\/gcc<\/span> <span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #001080;\">gcc<\/span> <span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #001080;\">\/usr\/bin\/gcc-11<\/span> <span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #001080;\">100<\/span> <span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #001080;\">&amp;&amp;<\/span> <span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #001080;\">update-alternatives<\/span> <span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #001080;\">&#8211;config<\/span> <span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #001080;\">gcc<\/span> <span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #001080;\">&amp;&amp;<\/span> <span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #001080;\">apt-get<\/span> <span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #001080;\">install<\/span> <span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #001080;\">-y<\/span> <span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #001080;\">g++-11<\/span> <span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #001080;\">&amp;&amp;<\/span> <span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #001080;\">update-alternatives<\/span> <span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #001080;\">&#8211;install<\/span> <span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #001080;\">\/usr\/bin\/g++<\/span> <span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #001080;\">g++<\/span> <span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #001080;\">\/usr\/bin\/g++-11<\/span> <span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #001080;\">100<\/span> <span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #001080;\">&amp;&amp;<\/span> <span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #001080;\">update-alternatives<\/span> <span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #001080;\">&#8211;config<\/span> <span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #001080;\">g++<\/span> <span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #001080;\">&amp;&amp;<\/span> <span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #001080;\">apt-get<\/span> <span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #001080;\">install<\/span> <span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #001080;\">-y<\/span> <span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #001080;\">cpp-11<\/span> <span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #001080;\">&amp;&amp;<\/span> <span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #001080;\">update-alternatives<\/span> <span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #001080;\">&#8211;install<\/span> <span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #001080;\">\/usr\/bin\/cpp<\/span> <span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #001080;\">cpp<\/span> <span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #001080;\">\/usr\/bin\/cpp-11<\/span> <span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #001080;\">100<\/span> <span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #001080;\">&amp;&amp;<\/span> <span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #001080;\">update-alternatives<\/span> <span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #001080;\">&#8211;config<\/span> <span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #001080;\">cpp<\/span><\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-39f4c70 elementor-widget elementor-widget-heading\" data-id=\"39f4c70\" data-element_type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">BTC-related steps<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-ba190fd elementor-widget elementor-widget-text-editor\" data-id=\"ba190fd\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>Up next, we\u2019ll add BTC EmbeddedPlatform from its public image and integrate it with MATLAB:<\/p><p style=\"margin: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; color: #000000; line-height: 13.5pt; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;\"><span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: green;\"># &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<\/span><\/p><p style=\"margin: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; color: #000000; line-height: 13.5pt; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;\"><span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: green;\"># BTC-specific configurations<\/span><\/p><p style=\"margin: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; color: #000000; line-height: 13.5pt; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;\"><span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: green;\"># &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<\/span><\/p><p style=\"margin: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; color: #000000; line-height: 13.5pt; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;\"><span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: green;\"># Copy files from public image btces\/ep<\/span><\/p><p style=\"margin: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; color: #000000; line-height: 13.5pt; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;\"><span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #af00db;\">COPY<\/span> <span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #001080;\">&#8211;chown<\/span><span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo;\">=<\/span><span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #001080;\">1000<\/span> <span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #001080;\">&#8211;from<\/span><span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo;\">=<\/span><span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #001080;\">ep<\/span> <span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #001080;\">\/opt<\/span> <span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #001080;\">\/opt<\/span><\/p><p style=\"margin: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; color: #000000; line-height: 13.5pt; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;\"><span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #af00db;\">COPY<\/span> <span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #001080;\">&#8211;chown<\/span><span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo;\">=<\/span><span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #001080;\">1000<\/span> <span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #001080;\">&#8211;from<\/span><span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo;\">=<\/span><span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #001080;\">ep<\/span> <span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #001080;\">\/root\/.BTC<\/span> <span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #001080;\">\/root\/.BTC<\/span><\/p><p style=\"margin: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; color: #000000; line-height: 13.5pt; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;\"><span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: green;\"># integrate BTC with MATLAB<\/span><\/p><p style=\"margin: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; color: #000000; line-height: 13.5pt; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;\"><span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #af00db;\">RUN<\/span> <span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #001080;\">chmod<\/span> <span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #001080;\">+x<\/span> <span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #001080;\">\/opt\/ep\/addMLIntegration.bash<\/span> <span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #001080;\">&amp;&amp;<\/span> <span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #001080;\">\/opt\/ep\/addMLIntegration.bash<\/span><\/p><p style=\"margin: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; color: #000000; line-height: 13.5pt; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;\"><span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: green;\"># configure BTC license server<\/span><\/p><p style=\"margin: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; color: #000000; line-height: 13.5pt; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;\"><span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #af00db;\">ENV<\/span> <span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #001080;\">LICENSE_LOCATION<\/span><span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo;\">=<\/span><span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #001080;\">27000@btc.license.server<\/span><\/p><p style=\"margin: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; color: #000000; line-height: 13.5pt; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;\"><span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #3b3b3b;\">\u00a0<\/span><\/p><p style=\"margin: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; color: #000000; line-height: 13.5pt; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;\"><span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: green;\"># install python module btc_embedded<\/span><\/p><p style=\"margin: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; color: #000000; line-height: 13.5pt; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;\"><span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #af00db;\">RUN<\/span> <span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #001080;\">pip3<\/span> <span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #001080;\">install<\/span> <span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #001080;\">&#8211;no-cache-dir<\/span> <span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #001080;\">btc_embedded<\/span><\/p><p style=\"margin: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; color: #000000; line-height: 13.5pt; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;\"><span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #af00db;\">ENV<\/span> <span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #001080;\">PYTHONUNBUFFERED<\/span><span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo;\">=<\/span><span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #001080;\">1<\/span><\/p><p style=\"margin: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; color: #000000; line-height: 13.5pt; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;\"><span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #001080;\">\u00a0<\/span><\/p><p>Finally, we restore the default user and ensure that we can pass a Python script as the entry point for this container by removing its default behavior (to start up MATLAB):<\/p><p style=\"margin: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; color: #000000; line-height: 13.5pt; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;\"><span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #af00db;\">USER<\/span> <span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #001080;\">matlab<\/span><\/p><p style=\"margin: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; color: #000000; line-height: 13.5pt; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;\"><span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: green;\"># Override default MATLAB entrypoint<\/span><\/p><p style=\"margin: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; color: #000000; line-height: 13.5pt; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;\"><span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #af00db;\">ENTRYPOINT<\/span> <span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #001080;\">[<\/span> <span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #001080;\">]<\/span><\/p><p style=\"margin: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; color: #000000; line-height: 13.5pt; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;\"><span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #af00db;\">CMD<\/span> <span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #001080;\">[<\/span> <span lang=\"EN-US\" style=\"font-size: 9pt; font-family: Menlo; color: #001080;\">]<\/span><\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-65edf60 elementor-widget elementor-widget-heading\" data-id=\"65edf60\" data-element_type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">Using the image<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-eb1c002 elementor-widget elementor-widget-text-editor\" data-id=\"eb1c002\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>At the start of this section, we stated our goal:<\/p><p><i style=\"color: #000000; font-family: 'Times New Roman', serif; font-size: 12pt; font-weight: var( --e-global-typography-text-font-weight ); letter-spacing: var( --e-global-typography-text-letter-spacing ); text-transform: var( --e-global-typography-text-text-transform ); text-align: var(--text-align); background-color: var( --e-global-color-8c64e01 );\"><span lang=\"EN-US\" style=\"color: #0070c0;\">[to be] able to say \u201crun my tests on model and code\u201d without requiring any software to be installed (except for Docker).<\/span><\/i><\/p><p>Based on the Dockerfile we defined, we can build our image with a simple Docker build (the image name \u201cmbdtest\u201d is arbitrary, you can pick any name you like):<\/p><p style=\"margin: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; color: #000000;\"><i><span lang=\"EN-US\" style=\"color: #0070c0;\">\u00a0<\/span><\/i><span lang=\"EN-US\" style=\"font-style: var( --e-global-typography-text-font-style ); font-weight: var( --e-global-typography-text-font-weight ); letter-spacing: var( --e-global-typography-text-letter-spacing ); text-transform: var( --e-global-typography-text-text-transform ); text-align: var(--text-align); background-color: var( --e-global-color-8c64e01 ); font-size: 7.5pt; font-family: Menlo; color: #795e26;\">docker<\/span> <span lang=\"EN-US\" style=\"font-style: var( --e-global-typography-text-font-style ); font-weight: var( --e-global-typography-text-font-weight ); letter-spacing: var( --e-global-typography-text-letter-spacing ); text-transform: var( --e-global-typography-text-text-transform ); text-align: var(--text-align); background-color: var( --e-global-color-8c64e01 ); font-size: 7.5pt; font-family: Menlo; color: #a31515;\">build<\/span> <span lang=\"EN-US\" style=\"font-style: var( --e-global-typography-text-font-style ); font-weight: var( --e-global-typography-text-font-weight ); letter-spacing: var( --e-global-typography-text-letter-spacing ); text-transform: var( --e-global-typography-text-text-transform ); text-align: var(--text-align); background-color: var( --e-global-color-8c64e01 ); font-size: 7.5pt; font-family: Menlo; color: blue;\">-t<\/span> <span lang=\"EN-US\" style=\"font-style: var( --e-global-typography-text-font-style ); font-weight: var( --e-global-typography-text-font-weight ); letter-spacing: var( --e-global-typography-text-letter-spacing ); text-transform: var( --e-global-typography-text-text-transform ); text-align: var(--text-align); background-color: var( --e-global-color-8c64e01 ); font-size: 7.5pt; font-family: Menlo; color: #a31515;\">mbdtest .<\/span><\/p><p>We\u2019ve now reached our goal, being able to run our tests with a simple Docker run call. We\u2019ll also make the current directory available as the workdir to have access to our model files, scripts, etc.:<\/p><p style=\"margin: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; color: #000000; line-height: 13.5pt; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;\"><span lang=\"EN-US\" style=\"font-size: 7.5pt; font-family: Menlo; color: #795e26;\">docker<\/span> <span lang=\"EN-US\" style=\"font-size: 7.5pt; font-family: Menlo; color: #a31515;\">run<\/span> <span lang=\"EN-US\" style=\"font-size: 7.5pt; font-family: Menlo; color: blue;\">&#8211;volume<\/span> <span lang=\"EN-US\" style=\"font-size: 7.5pt; font-family: Menlo; color: #a31515;\">&#8220;$(pwd):\/workdir&#8221;<\/span> <span lang=\"EN-US\" style=\"font-size: 7.5pt; font-family: Menlo; color: blue;\">&#8211;workdir<\/span> <span lang=\"EN-US\" style=\"font-size: 7.5pt; font-family: Menlo; color: #a31515;\">&#8220;\/workdir&#8221;<\/span> <span lang=\"EN-US\" style=\"font-size: 7.5pt; font-family: Menlo; color: #a31515;\">mbdtest<\/span> <span lang=\"EN-US\" style=\"font-size: 7.5pt; font-family: Menlo; color: #a31515;\">python3<\/span> <span lang=\"EN-US\" style=\"font-size: 7.5pt; font-family: Menlo; color: #a31515;\">scripts\/run_tests.py<\/span><\/p><p>Et voil\u00e0!<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-bde35f0 elementor-widget elementor-widget-heading\" data-id=\"bde35f0\" data-element_type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">Finishing touches<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div class=\"elementor-element elementor-element-e7516ca e-grid e-con-boxed e-con e-parent\" data-id=\"e7516ca\" data-element_type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-c964644 elementor-widget elementor-widget-text-editor\" data-id=\"c964644\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>The only change we do before we integrate this in a CI pipeline is to control the MATLAB and BTC versions via environment variables. That makes it trivial to switch to a different version:<\/p><p class=\"MsoNormal\" style=\"margin: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; color: #000000; line-height: 13.5pt; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;\"><span lang=\"EN-US\" style=\"font-size: 7.5pt; font-family: Menlo; color: #795e26;\">docker<\/span> <span lang=\"EN-US\" style=\"font-size: 7.5pt; font-family: Menlo; color: #a31515;\">build<\/span> <span lang=\"EN-US\" style=\"font-size: 7.5pt; font-family: Menlo; color: blue;\">-t<\/span> <span lang=\"EN-US\" style=\"font-size: 7.5pt; font-family: Menlo; color: #a31515;\">mbdtest:<\/span><span lang=\"EN-US\" style=\"font-size: 7.5pt; font-family: Menlo; color: #3b3b3b;\">${<\/span><span lang=\"EN-US\" style=\"font-size: 7.5pt; font-family: Menlo; color: #001080;\">EP_RELEASE<\/span><span lang=\"EN-US\" style=\"font-size: 7.5pt; font-family: Menlo; color: #3b3b3b;\">}<\/span><span lang=\"EN-US\" style=\"font-size: 7.5pt; font-family: Menlo; color: #a31515;\">_<\/span><span lang=\"EN-US\" style=\"font-size: 7.5pt; font-family: Menlo; color: #3b3b3b;\">${<\/span><span lang=\"EN-US\" style=\"font-size: 7.5pt; font-family: Menlo; color: #001080;\">MATLAB_RELEASE<\/span><span lang=\"EN-US\" style=\"font-size: 7.5pt; font-family: Menlo; color: #3b3b3b;\">} <\/span><span lang=\"EN-US\" style=\"font-size: 7.5pt; font-family: Menlo; color: #ee0000;\">\\<\/span><\/p><p class=\"MsoNormal\" style=\"margin: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; color: #000000; line-height: 13.5pt; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;\"><span lang=\"EN-US\" style=\"font-size: 7.5pt; font-family: Menlo; color: #3b3b3b;\">\u00a0\u00a0\u00a0 <\/span><span lang=\"EN-US\" style=\"font-size: 7.5pt; font-family: Menlo; color: blue;\">&#8211;build-arg<\/span> <span lang=\"EN-US\" style=\"font-size: 7.5pt; font-family: Menlo; color: #a31515;\">EP_RELEASE=<\/span><span lang=\"EN-US\" style=\"font-size: 7.5pt; font-family: Menlo; color: #3b3b3b;\">${<\/span><span lang=\"EN-US\" style=\"font-size: 7.5pt; font-family: Menlo; color: #001080;\">EP_RELEASE<\/span><span lang=\"EN-US\" style=\"font-size: 7.5pt; font-family: Menlo; color: #3b3b3b;\">} <\/span><span lang=\"EN-US\" style=\"font-size: 7.5pt; font-family: Menlo; color: #ee0000;\">\\<\/span><\/p><p class=\"MsoNormal\" style=\"margin: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; color: #000000; line-height: 13.5pt; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;\"><span lang=\"EN-US\" style=\"font-size: 7.5pt; font-family: Menlo; color: #3b3b3b;\">\u00a0\u00a0\u00a0 <\/span><span lang=\"EN-US\" style=\"font-size: 7.5pt; font-family: Menlo; color: blue;\">&#8211;build-arg<\/span> <span lang=\"EN-US\" style=\"font-size: 7.5pt; font-family: Menlo; color: #a31515;\">MATLAB_RELEASE=<\/span><span lang=\"EN-US\" style=\"font-size: 7.5pt; font-family: Menlo; color: #3b3b3b;\">${<\/span><span lang=\"EN-US\" style=\"font-size: 7.5pt; font-family: Menlo; color: #001080;\">MATLAB_RELEASE<\/span><span lang=\"EN-US\" style=\"font-size: 7.5pt; font-family: Menlo; color: #3b3b3b;\">} <\/span><span lang=\"EN-US\" style=\"font-size: 7.5pt; font-family: Menlo; color: #ee0000;\">\\<\/span><\/p><p class=\"MsoNormal\" style=\"margin: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; color: #000000; line-height: 13.5pt; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;\"><span lang=\"EN-US\" style=\"font-size: 7.5pt; font-family: Menlo; color: #3b3b3b;\">\u00a0\u00a0\u00a0 <\/span><span lang=\"EN-US\" style=\"font-size: 7.5pt; font-family: Menlo; color: #a31515;\">.<\/span><\/p><p class=\"MsoNormal\" style=\"margin: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; color: #000000; line-height: 13.5pt; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;\"><span lang=\"EN-US\" style=\"font-size: 7.5pt; font-family: Menlo; color: #795e26;\">\u00a0<\/span><\/p><p class=\"MsoNormal\" style=\"margin: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; color: #000000; line-height: 13.5pt; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;\"><span lang=\"EN-US\" style=\"font-size: 7.5pt; font-family: Menlo; color: #795e26;\">docker<\/span> <span lang=\"EN-US\" style=\"font-size: 7.5pt; font-family: Menlo; color: #a31515;\">run<\/span> <span lang=\"EN-US\" style=\"font-size: 7.5pt; font-family: Menlo; color: blue;\">&#8211;volume<\/span> <span lang=\"EN-US\" style=\"font-size: 7.5pt; font-family: Menlo; color: #a31515;\">&#8220;$(pwd):\/workdir&#8221;<\/span> <span lang=\"EN-US\" style=\"font-size: 7.5pt; font-family: Menlo; color: #ee0000;\">\\<\/span><\/p><p class=\"MsoNormal\" style=\"margin: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; color: #000000; line-height: 13.5pt; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;\"><span lang=\"EN-US\" style=\"font-size: 7.5pt; font-family: Menlo; color: #3b3b3b;\">\u00a0\u00a0\u00a0 <\/span><span lang=\"EN-US\" style=\"font-size: 7.5pt; font-family: Menlo; color: blue;\">&#8211;workdir<\/span> <span lang=\"EN-US\" style=\"font-size: 7.5pt; font-family: Menlo; color: #a31515;\">&#8220;\/workdir&#8221;<\/span> <span lang=\"EN-US\" style=\"font-size: 7.5pt; font-family: Menlo; color: #ee0000;\">\\<\/span><\/p><p class=\"MsoNormal\" style=\"margin: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; color: #000000; line-height: 13.5pt; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;\"><span lang=\"EN-US\" style=\"font-size: 7.5pt; font-family: Menlo; color: #3b3b3b;\">\u00a0\u00a0\u00a0 <\/span><span lang=\"EN-US\" style=\"font-size: 7.5pt; font-family: Menlo; color: #a31515;\">mbdtest:<\/span><span lang=\"EN-US\" style=\"font-size: 7.5pt; font-family: Menlo; color: #3b3b3b;\">${<\/span><span lang=\"EN-US\" style=\"font-size: 7.5pt; font-family: Menlo; color: #001080;\">EP_RELEASE<\/span><span lang=\"EN-US\" style=\"font-size: 7.5pt; font-family: Menlo; color: #3b3b3b;\">}<\/span><span lang=\"EN-US\" style=\"font-size: 7.5pt; font-family: Menlo; color: #a31515;\">_<\/span><span lang=\"EN-US\" style=\"font-size: 7.5pt; font-family: Menlo; color: #3b3b3b;\">${<\/span><span lang=\"EN-US\" style=\"font-size: 7.5pt; font-family: Menlo; color: #001080;\">MATLAB_RELEASE<\/span><span lang=\"EN-US\" style=\"font-size: 7.5pt; font-family: Menlo; color: #3b3b3b;\">} <\/span><span lang=\"EN-US\" style=\"font-size: 7.5pt; font-family: Menlo; color: #ee0000;\">\\<\/span><\/p><p class=\"MsoNormal\" style=\"margin: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; color: #000000; line-height: 13.5pt; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;\"><span lang=\"EN-US\" style=\"font-size: 7.5pt; font-family: Menlo; color: #3b3b3b;\">\u00a0\u00a0\u00a0 <\/span><span lang=\"EN-US\" style=\"font-size: 7.5pt; font-family: Menlo; color: #a31515;\">python3<\/span> <span lang=\"EN-US\" style=\"font-size: 7.5pt; font-family: Menlo; color: #a31515;\">scripts\/run_tests.py<\/span><\/p><p>Below\u2019s a screenshot of a pull request which switches the MATLAB version from R2023b to R2024a \u2013 this the beauty of a nicely prepared Dockerized workflow:<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-f7d2600 elementor-widget elementor-widget-image\" data-id=\"f7d2600\" data-element_type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<img decoding=\"async\" width=\"272\" height=\"248\" src=\"https:\/\/www.btc-embedded.com\/wp-content\/uploads\/2024\/12\/Blog3.webp\" class=\"attachment-medium_large size-medium_large wp-image-19304\" alt=\"Cloud-friendly testing for of model-based software components with Docker\" \/>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-2c296ad elementor-widget elementor-widget-heading\" data-id=\"2c296ad\" data-element_type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">Conclusion<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-402bc45 elementor-widget elementor-widget-text-editor\" data-id=\"402bc45\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>We\u2019ve seen that both virtual machines as well as containers are capable of supporting the complex toolchains common in automotive software development and thereby enable scalable CI workflows in the cloud.<\/p><p>Virtual machines are the go-to solution for many, as they feel more natural to anyone who\u2019s familiar with managing servers. Powerful template mechanisms enable a rollout of well-defined environments at scale, albeit without the benefit of immutability.<\/p><p>As more and more resources are hosted in the cloud, the underlying costs \u2013 previously often hidden \u2013 become apparent and reveal one of the major weaknesses of virtual machines at scale: the overhead of a full-fledged operating system. Mitigated only by running multiple workflows in the same VM which counteracts the goal of keeping independent workflows properly isolated.<\/p><p>Containers outshine VMs in most regards. Managing containerized application is much simpler than managing VMs, the startup time and resource footprint is as tiny, container images are immutable by design and encourage valuable practices such as \u201cconfiguration-as-code\u201d to ensure reproducibility at all times.<\/p><p>Personally, the only factors that I see in favor of VMs are the environmental parity of CI agents with the developer VMs (=common VM template) and the limited availability of some tools in Linux-based environments.<\/p><p>\u00a0<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-6bce2fe elementor-widget elementor-widget-text-editor\" data-id=\"6bce2fe\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>Update January 19th, 2025:<\/p>\n<p>According to <a href=\"https:\/\/hub.docker.com\/r\/mathworks\/matlab\" target=\"_blank\" rel=\"noopener\">The Mathworks licensing conditions<\/a>, running Matlab in a container requires a license that is &#8220;configured for cloud use&#8221;. Even though I don&#8217;t understand the rationals for distinguishing between container-based and VM-based automation from a licensing point of view, it is a relevant factor to consider.<\/p>\n<p>Thanks to Bavo Denys &amp; Pieter Fort for bringing this to my attention.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t<div class=\"elementor-element elementor-element-6d069fa e-flex e-con-boxed e-con e-parent\" data-id=\"6d069fa\" data-element_type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>Toolchains in model-based automotive development projec [&hellip;]<\/p>\n","protected":false},"author":16,"featured_media":19315,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"elementor_theme","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"footnotes":""},"categories":[1],"tags":[],"product":[],"use_cases":[],"class_list":["post-19289","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.btc-embedded.com\/zh-hans\/wp-json\/wp\/v2\/posts\/19289","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.btc-embedded.com\/zh-hans\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.btc-embedded.com\/zh-hans\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.btc-embedded.com\/zh-hans\/wp-json\/wp\/v2\/users\/16"}],"replies":[{"embeddable":true,"href":"https:\/\/www.btc-embedded.com\/zh-hans\/wp-json\/wp\/v2\/comments?post=19289"}],"version-history":[{"count":32,"href":"https:\/\/www.btc-embedded.com\/zh-hans\/wp-json\/wp\/v2\/posts\/19289\/revisions"}],"predecessor-version":[{"id":21513,"href":"https:\/\/www.btc-embedded.com\/zh-hans\/wp-json\/wp\/v2\/posts\/19289\/revisions\/21513"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.btc-embedded.com\/zh-hans\/wp-json\/wp\/v2\/media\/19315"}],"wp:attachment":[{"href":"https:\/\/www.btc-embedded.com\/zh-hans\/wp-json\/wp\/v2\/media?parent=19289"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.btc-embedded.com\/zh-hans\/wp-json\/wp\/v2\/categories?post=19289"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.btc-embedded.com\/zh-hans\/wp-json\/wp\/v2\/tags?post=19289"},{"taxonomy":"product","embeddable":true,"href":"https:\/\/www.btc-embedded.com\/zh-hans\/wp-json\/wp\/v2\/product?post=19289"},{"taxonomy":"use_cases","embeddable":true,"href":"https:\/\/www.btc-embedded.com\/zh-hans\/wp-json\/wp\/v2\/use_cases?post=19289"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}