How can I run MATLAB code from within a GitHub codespace?

6 次查看(过去 30 天)

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.

采纳的回答

MathWorks Support Team
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 个)

类别

Help CenterFile Exchange 中查找有关 Containers 的更多信息

产品


版本

R2023a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by