-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathdevcontainer.json
More file actions
67 lines (67 loc) · 2.49 KB
/
devcontainer.json
File metadata and controls
67 lines (67 loc) · 2.49 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
{
/* This DevContainer configuration demonstrates
1. Building image from Dockerfile from mathworks-ref-arch/matlab-dockerfile
2. Installation of MATLAB Integration for Jupyter & JupyterLab
3. Configuration of VSCode environment for following modes of access:
a. MATLAB in a Browser
b. Directly from VSCode, using the MATLAB extension for VSCode
c. Using Jupyter Notebooks in VSCode
d. Start Codespace in Jupyter
See: https://github.com/mathworks-ref-arch/matlab-dockerfile
*/
"name": "Built using MATLAB Dockerfile",
"build": {
"dockerfile": "Dockerfile",
"args": {
"MATLAB_RELEASE": "r2026a",
"MATLAB_PRODUCT_LIST": "MATLAB Symbolic_Math_Toolbox Simulink"
}
},
"onCreateCommand": {
"install-dependencies": "sudo apt-get update && sudo apt-get install --no-install-recommends -y git python3 python3-pip xvfb fluxbox"
},
"updateContentCommand": {
"install-mifj-and-jupyterlab": "sudo PIP_BREAK_SYSTEM_PACKAGES=1 python3 -m pip install --upgrade matlab-proxy jupyter-matlab-proxy jupyterlab && sudo install-matlab-kernelspec"
},
"waitFor": "updateContentCommand",
"postStartCommand": {
"start-matlab-desktop": "matlab-proxy-app"
},
"portsAttributes": {
"8888": {
"label": "MATLAB",
"onAutoForward": "openPreview"
}
},
"containerEnv": {
"MWI_APP_PORT": "8888",
"MWI_ENABLE_TOKEN_AUTH": "False",
// Configure MATLAB's startup folder
"MATLAB_USERWORKDIR": "${containerWorkspaceFolder}",
"MATLAB_USE_USERWORK": "1",
// Enable embedding the desktop into VSCode's Simple Browser
"MWI_CUSTOM_HTTP_HEADERS": "{\"Content-Security-Policy\": \"frame-ancestors *\"}",
"MW_DDUX_FORCE_ENABLE": "true",
"MW_CONTEXT_TAGS": "MATLAB:CODESPACES:V1"
},
// Configure VSCode Extensions
"customizations": {
"vscode": {
"extensions": [
"MathWorks.language-matlab",
"ms-toolsai.jupyter",
"ms-python.python"
],
"settings": {
"MATLAB.signIn": true,
// Marks MATLAB Kernel as a trusted source
"jupyter.kernels.trusted": [
"/usr/share/jupyter/kernels/jupyter_matlab_kernel/kernel.json"
]
}
}
},
"hostRequirements": {
"cpus": 4
}
}