mathworks-ref-arch / matlab-dockerfile

Create a docker container that contains a MATLAB install
Other
344 stars 96 forks source link

The image built by matlab-dockerfile does not support the use of simiulink and Add-ons? #59

Closed cuixing158 closed 1 year ago

cuixing158 commented 1 year ago

When I have successfully installed the latest Matlab 2022b, simulink and some toolboxs following the tutorials in this repository, and started the container as -browser, it successfully opens and works in my google-chrome browser, but why the Add-ons and simulink in the main interface do not work.

>> simulink
Unable to run the 'simulink' function, because it is not supported for MATLAB
Online. To use this function, use an installed version of [MATLAB](https://www.mathworks.com/downloads/) on your computer.

click Add-ons buttons, Pop-up window:

Add-ons resourcer not supported

so, how can i fix these to support them? However, the official matlab online supports them all.


my dockerfile is follows:

#参考:https://github.com/UniprJRC/FSDA/blob/master/docker/Dockerfile
# https://github.com/mathworks-ref-arch/matlab-dockerfile/issues/55
# 

# By default build with latest from mathworks/matlab (make sure you have docker pull'd this) - but you can over-ride
# this (and the github workflows frequently do) so as to build with different versions of MATLAB
ARG MATLAB_DOCKER_TAG=latest

FROM mathworks/matlab:${MATLAB_DOCKER_TAG}

USER root
WORKDIR /root

RUN export DEBIAN_FRONTEND=noninteractive && apt-get update && \
    apt-get install --no-install-recommends --yes wget \
    build-essential \ 
    cmake && \
    apt-get clean && apt-get -y autoremove && rm -rf /var/lib/apt/lists/*

WORKDIR /opt/matlab
RUN wget -q https://www.mathworks.com/mpm/glnxa64/mpm && \
    chmod +x mpm && \
    MATLAB_RELEASE=`ls | grep R*` && \
    ./mpm install --destination=/opt/matlab/${MATLAB_RELEASE}/ --release=${MATLAB_RELEASE} \
    #5G_Toolbox \
    #AUTOSAR_Blockset \
    #Aerospace_Blockset \
    # Aerospace_Toolbox \
    # Antenna_Toolbox \
    Audio_Toolbox \
    Automated_Driving_Toolbox \
    # Bioinformatics_Toolbox \
    # Bluetooth_Toolbox \
    Communications_Toolbox \
    Computer_Vision_Toolbox \
    Control_System_Toolbox \
    Curve_Fitting_Toolbox \
    #DDS_Blockset \
    #DO_Qualification_Kit \
    DSP_HDL_Toolbox \
    DSP_System_Toolbox \
    #Database_Toolbox \
    #Datafeed_Toolbox \
    #Deep_Learning_HDL_Toolbox \
    Deep_Learning_Toolbox \
    #Econometrics_Toolbox \
    Embedded_Coder \
    #Filter_Design_HDL_Coder \
    #Financial_Instruments_Toolbox \
    #Financial_Toolbox \
    Fixed-Point_Designer \
    # Fuzzy_Logic_Toolbox \
    GPU_Coder \
    Global_Optimization_Toolbox \
    #HDL_Coder \
    #HDL_Verifier \
    #IEC_Certification_Kit \
    #Image_Acquisition_Toolbox \
    Image_Processing_Toolbox \
    #Industrial_Communication_Toolbox \
    #Instrument_Control_Toolbox \
    # LTE_Toolbox \
    Lidar_Toolbox \
    MATLAB_Coder \
    # MATLAB_Compiler \
    # MATLAB_Compiler_SDK \
    # MATLAB_Parallel_Server \
    #MATLAB_Production_Server \
    MATLAB_Report_Generator \
    #MATLAB_Web_App_Server \
    Mapping_Toolbox \
    # Mixed-Signal_Blockset \
    # Model_Predictive_Control_Toolbox \
    # Motor_Control_Blockset \
    Navigation_Toolbox \
    Optimization_Toolbox \
    Parallel_Computing_Toolbox \
    # Partial_Differential_Equation_Toolbox \
    Phased_Array_System_Toolbox \
    #Polyspace_Bug_Finder \
    #Polyspace_Bug_Finder_Server \
    #Polyspace_Code_Prover \
    #Polyspace_Code_Prover_Server \
    #Powertrain_Blockset \
    #Predictive_Maintenance_Toolbox \
    # RF_Blockset \
    # RF_PCB_Toolbox \
    # RF_Toolbox \
    ROS_Toolbox \
    Radar_Toolbox \
    Reinforcement_Learning_Toolbox \
    #Requirements_Toolbox \
    #Risk_Management_Toolbox \
    Robotics_System_Toolbox \
    # Robust_Control_Toolbox \
    # Satellite_Communications_Toolbox \
    Sensor_Fusion_and_Tracking_Toolbox \
    #SerDes_Toolbox \
    # Signal_Integrity_Toolbox \
    Signal_Processing_Toolbox \
    #SimBiology \
    #SimEvents \
    #Simscape \
    #Simscape_Driveline \
    #Simscape_Electrical \
    #Simscape_Fluids \
    #Simscape_Multibody \
    Simulink \
    #Simulink_3D_Animation \
    #Simulink_Check \
    # Simulink_Code_Inspector \
    Simulink_Coder \
    #Simulink_Compiler \
    #Simulink_Control_Design \
    #Simulink_Coverage \
    #Simulink_Design_Optimization \
    #Simulink_Design_Verifier \
    #Simulink_Desktop_Real-Time \
    #Simulink_PLC_Coder \
    #Simulink_Real-Time \
    Simulink_Report_Generator \
    #Simulink_Test \
    SoC_Blockset \
    #Spreadsheet_Link \
    #Stateflow \
    Statistics_and_Machine_Learning_Toolbox \
    Symbolic_Math_Toolbox \
    #System_Composer \
    # System_Identification_Toolbox \
    Text_Analytics_Toolbox \
    UAV_Toolbox \
    Vehicle_Dynamics_Blockset \
    Vehicle_Network_Toolbox || \
    #Vision_HDL_Toolbox \
    # WLAN_Toolbox \
    # Wavelet_Toolbox \
    #Wireless_HDL_Toolbox \
    (echo "MPM Installation Failure. See below for more information:" && cat /tmp/mathworks_root.log && false) && \
    rm -f mpm /tmp/mathworks_root.log && \
    rm /usr/local/bin/matlab && \
    ln -s /opt/matlab/${MATLAB_RELEASE}/bin/matlab /usr/local/bin/matlab

WORKDIR /

# Seems to be needed for -browser version to install addons - TODO not sure why
RUN mkdir /.Add-Ons && \
    chown -R matlab /.Add-Ons

# One time startup.m that undertakes installation etc. of FSDA in MATLAB
COPY ./startup.m /home/matlab/Documents/MATLAB/startup.m

WORKDIR /home/matlab_works
prabhakk-mw commented 1 year ago

Hi @cuixing158

Unfortunately the -browser flag which uses matlab-proxy does not support Simulink UI or the Add-Ons Explorer at this point in time. One can however use the sim command run models using non-interactive workflows.

We are working bringing support to these features in a future version of matlab-proxy.

oleksandr-svystun commented 1 year ago

Hi @prabhakk-mw, are there any updates to this issue?