How can I run MATLAB code from within a GitHub codespace?
4 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
MathWorks Support Team
el 18 de Oct. de 2024
Respondida: MathWorks Support Team
el 21 de Oct. de 2024
I would like to use MATLAB within a GitHub codespace that I have created. Launching the codespace loads Visual Studio Code by default, so I thought to try using the MATLAB VS Code extension. However, I am not sure how to configure this.
Respuesta aceptada
MathWorks Support Team
el 18 de Oct. de 2024
Because a GitHub codespace runs inside of a Docker container (called a dev container), any feature of the MATLAB VS Code extension that requires an installation of MATLAB (like code execution) is not supported. You are still able to use basic features of the extension when editing .m files in VS Code, like syntax highlighting and code folding.
If you want to use MATLAB within a GitHub codespace, we do provide some reference architecture that uses MATLAB's Docker image. This involves modifying "devcontainer.json", the configuration file of the docker container that the GitHub codespace runs in. The instructions are detailed in this MathWorks repository on GitHub.
In order to open MATLAB within your browser inside of your GitHub codespace, we recommend following the instructions listed within the "Using the MATLAB Image on Docker Hub and MATLAB Proxy" section of the README. This link from the README should directly configure a codespace with the correct "devcontainer.json" file.
0 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Containers en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!