-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathdevcontainer.json
More file actions
65 lines (65 loc) · 2.38 KB
/
devcontainer.json
File metadata and controls
65 lines (65 loc) · 2.38 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
{
/* This DevContainer configuration file demonstrates
1. Using the mathworks/matlab image on Dockerhub
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://hub.docker.com/r/mathworks/matlab for available images.
*/
"name": "Built using MathWorks Docker Hub Image",
"image": "docker.io/mathworks/matlab:latest",
"onCreateCommand": {
"install-dependencies": "sudo apt-get update && sudo apt-get install --no-install-recommends -y git"
},
"updateContentCommand": {
// dockerhub containers from R2023a onwards use PIPX to install matlab-proxy
// For older releases use the "using-matlab-dockerfile" configuration
"install-mifj-and-jupyterlab": "pipx upgrade matlab-proxy && pipx inject --include-apps --include-deps matlab-proxy jupyter-matlab-proxy jupyterlab"
},
"waitFor": "updateContentCommand",
"postStartCommand": {
"start-matlab-desktop": "run.sh -browser"
},
"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,
// Adds MATLAB's PIPX environments to Python indexer
"python.venvPath": "/home/matlab/.local/share/pipx/venvs/",
// Marks MATLAB Kernel as a trusted source
"jupyter.kernels.trusted": [
"/home/matlab/.local/share/pipx/venvs/matlab-proxy/share/jupyter/kernels/jupyter_matlab_kernel/kernel.json"
]
}
}
},
"hostRequirements": {
"cpus": 4
}
}