-
Notifications
You must be signed in to change notification settings - Fork 96
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make Simulink Real-Time™ Target Support Package installable via MPM #109
Comments
na |
Hi sribasadhikary. This functionality is in the next MPM release, MPM 2024.2, which will be available later this summer. |
Can someone please explain how I do this? I can't see the Simulink Real-Time Target Support Package listed in the example mpm input files, so I've guessed at the product name. The documentation on this page seems to be conflicting:
I have tried passing the source folder argument for the package that I've downloaded with the Support Software Downloader but get this error:
|
Looping in @mw-skardile for his thoughts |
Hi, @davidtopham. I can confirm that mpm does not support downloading or installing Simulink Real-Time Target Support Package. Instead, follow these instructions:
We will add these instructions to the mpm documentation. |
Any update on direct support by mpm? Using mpm 2024.2.2 I receive the following error: |
Hi @mw-wtripp, I am trying to do this in a Dockerfile to be able to install the Simulink Real-Time Target Support Package in a Docker container. However, I get an error when building the docker container on the line that runs SupportSoftwareInstaller that there is no display available. I don't want to have any display support in my container, so is there a way around this?
|
@davidtopham, at the moment we don't have a workaround for this. The display is required to show a license agreement that needs to be agreed to and can't be skipped. The development team is aware of this limitation and is investigating ways to remove it. |
Hi all, I have played around with the SupportSoftwareInstaller and the Docker Hub MATLAB image. I have noticed that xvfb is installed in the Docker Hub base image. It can also be seen in the Dockerfile: I had success with installing Simulink Real-Time Target Support Package without any interactive prompt by using It could be interesting to explore if this would be suitable as a temporary workaround. Notes:
# To specify which MATLAB release to install in the container, edit the value of the MATLAB_VERSION argument.
ARG MATLAB_VERSION=2024b
# Specify the extra products to install into the image. These products can either be toolboxes or support packages.
ARG ADDITIONAL_PRODUCTS="Simulink Simulink_Real-Time"
# Declare the global argument to use at the current build stage
FROM mathworks/matlab:r$MATLAB_VERSION
ARG MATLAB_VERSION
ARG ADDITIONAL_PRODUCTS
# By default, the MATLAB container runs as user "matlab". To install mpm dependencies, switch to root.
USER root
# Install mpm dependencies and other tools
RUN export DEBIAN_FRONTEND=noninteractive \
&& apt-get update \
&& apt-get install --no-install-recommends --yes \
wget \
unzip \
git \
ca-certificates \
&& apt-get clean \
&& apt-get autoremove \
&& rm -rf /var/lib/apt/lists/*
# Switch to user matlab, and pass in $HOME variable to mpm,
# so that mpm can set the correct root folder for the support packages.
USER matlab
WORKDIR /tmp
RUN wget -q https://www.mathworks.com/mpm/glnxa64/mpm \
&& chmod +x mpm \
&& EXISTING_MATLAB_LOCATION=$(dirname $(dirname $(readlink -f $(which matlab)))) \
&& sudo HOME=${HOME} ./mpm install \
--destination=${EXISTING_MATLAB_LOCATION} \
--release=R${MATLAB_VERSION} \
--products ${ADDITIONAL_PRODUCTS} \
|| (echo "MPM Installation Failure. See below for more information:" && cat /tmp/mathworks_root.log && false) \
&& sudo rm -f mpm /tmp/mathworks_root.log
# Install Support Package ("Simulink Real-Time Target Support Package")
# COPY in the support package files to be installed and run the installation
# We use xvfb-run when running the SupportSoftwareInstaller under matlabroot
WORKDIR /tmp/slrt
COPY ./SupportPackages.tar.gz /tmp/slrt
RUN tar -xzf SupportPackages.tar.gz \
&& sudo HOME=${HOME} xvfb-run /opt/matlab/R${MATLAB_VERSION}/bin/glnxa64/SupportSoftwareInstaller -downloadfolder ./SupportPackages/R${MATLAB_VERSION} -inputFile ./SupportPackages/R${MATLAB_VERSION}/ssi_input.txt \
|| (echo "Support Package Installation Failure. See below for more information:" && cat /tmp/mathworks_root.log && false) \
&& sudo rm -rf /tmp/mathworks_root.log /tmp/slrt
# COPY over the support package folder from root to matlab user home directory.
# The SupportSoftwareInstaller places the installed support package under root.
RUN sudo cp -a /root/Documents/MATLAB/SupportPackages/. /home/matlab/Documents/MATLAB/SupportPackages/
# Set user and work directory
USER matlab
WORKDIR /home/matlab/
# Set entrypoint and command
ENTRYPOINT [ "tail", "-f", "/dev/null" ]
CMD [ "" ] Cheers! |
Thanks a lot @gamlab-jlin, that helped me narrow it down to some of the dependencies from the MathWorks container-images Dockerfile to allow xvfb-run to work with the SupportSoftwareInstaller. I've managed to get it to install in my Docker container now, but it seems like there are some files missing from the archives downloaded via the the Support Software Downloader. It looks like it's missing the QNX compiler (which should end up in SupportPackages/R2023b/toolbox/slrealtime/target/supportpackage/qnx710) in the zip files that are downloaded using that method. @mw-wtripp do you know if this is expected? This means when I try to build a Simulink Real-Time model, it fails at the compilation stage as the compiler can't be found. Installing this support package through the MATLAB Add-on manager on my Windows desktop installs everything I need. |
Hi, @davidtopham. The issue you're seeing is not expected. If you're still having trouble, I recommend creating a support case at https://www.mathworks.com/support/contact_us.html. Someone from our team can help you resolve this. |
Hi @davidtopham, have you been able to install the support package in the meantime? |
Hi! I have done a quick test on Windows as well. It seems like the silent installation mode with |
No description provided.
The text was updated successfully, but these errors were encountered: