How can I run MATLAB code from within a GitHub codespace?
4 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
MathWorks Support Team
le 18 Oct 2024
Réponse apportée : MathWorks Support Team
le 21 Oct 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.
Réponse acceptée
MathWorks Support Team
le 18 Oct 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 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Containers dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!