Skip to content

Commit

Permalink
Add installation script for ubuntu
Browse files Browse the repository at this point in the history
  • Loading branch information
mldiego committed Nov 26, 2024
1 parent 7156b14 commit c8ddeaf
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 1 deletion.
3 changes: 3 additions & 0 deletions code/nnv/startup_nnv.m
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
fprintf('\nAdding dependencies to Matlab path...\n');

if ~exist("tbxmanager.m","file") % not added to the path
addpath("tbxmanager");
end
tbxmanager restorepath

fprintf('\nAdding NNV to Matlab path...\n');
Expand Down
2 changes: 1 addition & 1 deletion code/nnv/tests/io/test_io.m
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

%% Test 3: Load onnx model
if ~is_github_actions() % importers (support packages) are not installed in MATLAB actions
net_onnx = importONNXNetwork('mobilenetv2-1.0.onnx');
net_onnx = importNetworkFromONNX('mobilenetv2-1.0.onnx');
% net = matlab2nnv(net_onnx);
% This should get error:
% nnet.cnn.layer.GroupedConvolution2DLayer unsupported
Expand Down
24 changes: 24 additions & 0 deletions install_ubuntu.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/bin/bash

# VARS
MATLAB_RELEASE=2024b # latest
EXISTING_MATLAB_LOCATION=$(dirname $(dirname $(readlink -f $(which matlab))))
# (assume no products are installed yet)
ADDITIONAL_PRODUCTS="Computer_Vision_Toolbox Control_System_Toolbox Deep_Learning_Toolbox Image_Processing_Toolbox Optimization_Toolbox Parallel_Computing_Toolbox Statistics_and_Machine_Learning_Toolbox Symbolic_Math_Toolbox System_Identification_Toolbox Deep_Learning_Toolbox_Converter_for_ONNX_Model_Format Deep_Learning_Toolbox_Converter_for_TensorFlow_Models"
CURR_DIR=$(pwd)


# MATLAB INSTALLATION
wget -q https://www.mathworks.com/mpm/glnxa64/mpm \
&& chmod +x mpm \
&& ./mpm install \
--destination=${EXISTING_MATLAB_LOCATION} \
--release=r${MATLAB_RELEASE} \
--products ${ADDITIONAL_PRODUCTS}

# -------------------------------------------------------------------------
# NNV INSTALLATION
matlab -nodisplay -r "cd ${CURR_DIR}; cd code/nnv/; install; exit()"


# DONE

0 comments on commit c8ddeaf

Please sign in to comment.