-
Notifications
You must be signed in to change notification settings - Fork 64
Expand file tree
/
Copy pathinstall_ubuntu.sh
More file actions
executable file
·51 lines (39 loc) · 1.68 KB
/
Copy pathinstall_ubuntu.sh
File metadata and controls
executable file
·51 lines (39 loc) · 1.68 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#!/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"
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}
# -----------------------------------------
# Install python environment for CP
#------------------------------------------
# Define the name of the virtual environment directory
VENV_DIR=".venv"
# Create the virtual environment if it doesn't exist
if [ ! -d "$VENV_DIR" ]; then
echo "Creating virtual environment: $VENV_DIR"
python3 -m venv "$VENV_DIR"
else
echo "Virtual environment $VENV_DIR already exists."
fi
# Activate the virtual environment
echo "Activating virtual environment: $VENV_DIR"
source "$VENV_DIR/bin/activate"
# Upgrade pip within the virtual environment
echo "Upgrading pip..."
pip install --upgrade pip
# Install required packages from a requirements.txt file (optional)
echo "Installing packages from requirement.txt..."
pip install -r requirement.txt
# -------------------------------------------------------------------------
# NNV INSTALLATION
matlab -nodisplay -r "cd ${CURR_DIR}; cd code/nnv/; install; exit()"
# DONE