Skip to content

Commit a9cd74e

Browse files
prabhakk-mwkrisctlbrownemiNarvik09zainh-mw
committed
Initial commit
Co-authored-by: krisctl <krisctl@users.noreply.github.com> Co-authored-by: brownemi <brownemi@users.noreply.github.com> Co-authored-by: Narvik09 <Narvik09@users.noreply.github.com> Co-authored-by: zainh-mw <zainh-mw@users.noreply.github.com> Co-authored-by: Shushant2502 <Shushant2502@users.noreply.github.com>
0 parents  commit a9cd74e

112 files changed

Lines changed: 19208 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.devcontainer/Dockerfile

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# Copyright 2025 The MathWorks, Inc.
2+
3+
# Light weight image only to test Jupyter Notebook UI
4+
5+
# Using the default python version in Databricks Runtime 17.3-LTS
6+
ARG PYTHON_VERSION=3.12
7+
ARG MATLAB_RELEASE="R2025b"
8+
ARG UBUNTU_VERSION="24.04"
9+
# Default installation directory for MATLAB
10+
ARG MATLAB_INSTALL_LOCATION="/opt/matlab"
11+
ARG MATLAB_PRODUCT_LIST="MATLAB"
12+
13+
FROM ubuntu:24.04
14+
15+
ARG PYTHON_VERSION
16+
ARG MATLAB_RELEASE
17+
ARG UBUNTU_VERSION
18+
ARG MATLAB_INSTALL_LOCATION
19+
ARG MATLAB_PRODUCT_LIST
20+
21+
ENV DEBIAN_FRONTEND=noninteractive
22+
# Install build dependencies, install UV (for python) and NVM (for nodejs)
23+
RUN apt-get update && \
24+
apt-get install -y --no-install-recommends \
25+
git \
26+
wget \
27+
curl \
28+
unzip \
29+
ca-certificates && \
30+
rm -rf /var/lib/apt/lists/*
31+
32+
# Install MATLAB dependencies and MATLAB using MPM
33+
ARG MATLAB_DEPS_URL="https://raw.githubusercontent.com/mathworks-ref-arch/container-images/main/matlab-deps/${MATLAB_RELEASE}/ubuntu${UBUNTU_VERSION}/base-dependencies.txt"
34+
ARG MATLAB_DEPENDENCIES="matlab-deps-${MATLAB_RELEASE}-base-dependencies.txt"
35+
ARG ADDITIONAL_PACKAGES="wget curl unzip ca-certificates xvfb git vim fluxbox"
36+
RUN export DEBIAN_FRONTEND=noninteractive && apt-get update \
37+
&& apt-get install --no-install-recommends -y ${ADDITIONAL_PACKAGES}\
38+
&& wget $(echo ${MATLAB_DEPS_URL} | tr "[:upper:]" "[:lower:]") -O ${MATLAB_DEPENDENCIES} \
39+
&& xargs -a ${MATLAB_DEPENDENCIES} -r apt-get install --no-install-recommends -y \
40+
&& apt-get clean \
41+
&& apt-get -y autoremove \
42+
&& rm -rf /var/lib/apt/lists/* ${MATLAB_DEPENDENCIES}
43+
44+
RUN echo "Installing MATLAB using MPM..."
45+
RUN wget -q https://www.mathworks.com/mpm/glnxa64/mpm && \
46+
chmod +x mpm \
47+
&& ./mpm install --release=${MATLAB_RELEASE} --destination=${MATLAB_INSTALL_LOCATION} \
48+
--products ${MATLAB_PRODUCT_LIST} \
49+
|| (echo "MPM Installation Failure. See below for more information:" && cat /tmp/mathworks_root.log && false)\
50+
&& rm -f /tmp/mathworks_root.log \
51+
&& ln -s ${MATLAB_INSTALL_LOCATION}/bin/matlab /usr/local/bin/matlab \
52+
&& mv mpm /usr/local/bin
53+
54+
55+
# Installs UV for all users
56+
RUN curl -LsSf https://astral.sh/uv/install.sh | \
57+
UV_INSTALL_DIR=/usr/local/bin INSTALLER_NO_MODIFY_PATH=1 sh
58+
59+
# Create a python environment for the ROOT user
60+
COPY requirements.txt /tmp/requirements.txt
61+
RUN uv venv /local-dev-env --python ${PYTHON_VERSION} && uv pip install -r /tmp/requirements.txt --python /local-dev-env/bin/python
62+
RUN UV_PYTHON_INSTALL_DIR=/opt/uv-python UV_TOOL_BIN_DIR=/usr/local/bin UV_TOOL_DIR=/opt/uv-tools \
63+
uv tool install matlab-proxy --force --python ${PYTHON_VERSION} && \
64+
chmod -R 755 /opt/uv-tools && chmod -R 755 /opt/uv-python

.devcontainer/devcontainer.json

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
{
2+
"name": "Notebook",
3+
"build": {
4+
"dockerfile": "Dockerfile",
5+
"context": ".",
6+
"args": {
7+
"PYTHON_VERSION": "3.12"
8+
}
9+
},
10+
"customizations": {
11+
"vscode": {
12+
"extensions": [
13+
"ms-python.python",
14+
"ms-toolsai.jupyter",
15+
"davidanson.vscode-markdownlint"
16+
],
17+
"settings": {
18+
"python.defaultInterpreterPath": "/local-dev-env/bin/python",
19+
"python.terminal.activateEnvInCurrentTerminal": true,
20+
"python.terminal.activateEnvironment": true,
21+
"jupyter.kernels.trusted": [
22+
"/local-dev-env/share/jupyter/kernels/python3/kernel.json"
23+
],
24+
"python.venvFolders": [
25+
"/local-dev-env"
26+
],
27+
"chat.disableAIFeatures": true,
28+
"chat.agent.enabled": false
29+
}
30+
}
31+
},
32+
"remoteUser": "root",
33+
"updateRemoteUserUID": true
34+
}

.devcontainer/jupyter/Dockerfile

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Copyright 2026 The MathWorks, Inc.
2+
3+
# Light weight image only to test Jupyter Notebook UI
4+
5+
ARG PYTHON_VERSION=3.11
6+
7+
FROM ubuntu:24.04
8+
9+
ARG PYTHON_VERSION
10+
11+
ENV DEBIAN_FRONTEND=noninteractive
12+
# Install build dependencies, install UV (for python) and NVM (for nodejs)
13+
RUN apt-get update && \
14+
apt-get install -y --no-install-recommends \
15+
git \
16+
wget \
17+
curl \
18+
unzip \
19+
ca-certificates && \
20+
rm -rf /var/lib/apt/lists/*
21+
22+
# Installs UV for all users
23+
RUN curl -LsSf https://astral.sh/uv/install.sh | \
24+
UV_INSTALL_DIR=/usr/local/bin INSTALLER_NO_MODIFY_PATH=1 sh
25+
26+
COPY requirements.txt /tmp/requirements.txt
27+
# Install Jupyter using UV as a tool accessible to all users
28+
RUN UV_PYTHON_INSTALL_DIR=/opt/uv-python UV_TOOL_BIN_DIR=/usr/local/bin UV_TOOL_DIR=/opt/uv-tools \
29+
uv tool install jupyter-core --with-requirements /tmp/requirements.txt --force --python ${PYTHON_VERSION} && \
30+
chmod -R 755 /opt/uv-tools && chmod -R 755 /opt/uv-python
31+
32+
USER ubuntu
33+
34+
WORKDIR /home/ubuntu
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"name": "Open in Jupyter",
3+
// Uncomment line below to test with no network access in Jupyter
4+
// "runArgs": ["--network", "none"],
5+
"build": {
6+
"dockerfile": "Dockerfile",
7+
"context": ".",
8+
"args": {
9+
"PYTHON_VERSION" : "3.11"
10+
}
11+
}
12+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
ipykernel
2+
ipywidgets
3+
jedi==0.17.2
4+
jupyterlab

.devcontainer/requirements.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
ipykernel
2+
ipywidgets
3+
jupyterlab
4+
pytest
5+
pytest-cov
6+
pytest-mock
7+
requests
8+
ruff
Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
# Copyright 2026 The MathWorks, Inc.
2+
3+
name: "Bug Report for Dockerfiles/Containers"
4+
title: "<Enter short description>"
5+
description: "File a bug report."
6+
labels: [bug, needs-triage, dockerfiles]
7+
body:
8+
- type: markdown
9+
attributes:
10+
value: |
11+
Before reporting a bug, see [Issues](https://github.com/mathworks-ref-arch/matlab-on-databricks/issues) to check if an issue already exists for the bug you encountered. To request a feature or report a vulnerability, return to [Create an Issue](https://github.com/mathworks-ref-arch/matlab-on-databricks/issues/new/choose).
12+
13+
Do not include sensitive information in the bug report. If you need to share sensitive information, please contact [databricks@mathworks.com](mailto:databricks@mathworks.com).
14+
15+
- type: textarea
16+
id: problem
17+
attributes:
18+
label: What is the problem?
19+
description: A clear and concise description of what the bug is.
20+
21+
- type: textarea
22+
id: expectation
23+
attributes:
24+
label: What behavior were you expecting?
25+
description: What did you expect to happen?
26+
27+
- type: textarea
28+
id: actual-behavior
29+
attributes:
30+
label: What happened instead?
31+
description: What actually happened?
32+
33+
- type: textarea
34+
id: steps-to-reproduce
35+
attributes:
36+
label: Steps to reproduce the issue
37+
description: Provide a sequence of steps to reproduce the issue.
38+
39+
- type: textarea
40+
id: image
41+
attributes:
42+
label: Image or Dockerfile in question
43+
description: e.g., `matlab-on-databricks:r2024a` or the Dockerfile in the `matlab` directory
44+
45+
- type: textarea
46+
id: changes
47+
attributes:
48+
label: Did you modify the provided Dockerfile to build and use your own image?
49+
description: Yes/No. If yes, please provide a diff or describe the changes.
50+
51+
- type: textarea
52+
id: environment
53+
attributes:
54+
label: Environment Details
55+
description: |
56+
Please provide details about the environment where you encountered the issue, such as:
57+
* Docker Version (e.g., `Docker version 20.10.17, build 100c701`)
58+
* Host Operating System (e.g., `Ubuntu 22.04`, `macOS 13.1`, `Windows 11 with WSL2`)
59+
* Execution Environment (e.g., `Local Machine`, `GitHub Actions`, `AWS ECS`, `Databricks`)
60+
* Databricks Runtime (e.g., `17.3-LTS`)
61+
render: markdown
62+
63+
- type: textarea
64+
id: suggested-fix
65+
attributes:
66+
label: Suggested fix (if any)
67+
68+
- type: textarea
69+
id: additional-info
70+
attributes:
71+
label: Any additional information
72+
description: Add any other context about the problem here.
73+
74+
- type: textarea
75+
id: logs
76+
attributes:
77+
label: Logs and Errors
78+
description: |
79+
Include full errors and relevant logs.
80+
render: markdown
81+
82+
- type: dropdown
83+
id: browsers
84+
attributes:
85+
label: Browser(s) used
86+
multiple: true
87+
options:
88+
- Chrome
89+
- Firefox
90+
- Safari
91+
- Microsoft Edge
92+
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# Copyright 2026 The MathWorks, Inc.
2+
3+
name: "Bug Report - General"
4+
title: "<Enter short description>"
5+
description: "File a bug report."
6+
labels: [bug, needs-triage, general]
7+
body:
8+
- type: markdown
9+
attributes:
10+
value: |
11+
Before reporting a bug, see [Issues](https://github.com/mathworks-ref-arch/matlab-on-databricks/issues) to check if an issue already exists for the bug you encountered. To request a feature or report a vulnerability, return to [Create an Issue](https://github.com/mathworks-ref-arch/matlab-on-databricks/issues/new/choose).
12+
13+
Do not include sensitive information in the bug report. If you need to share sensitive information, please contact [databricks@mathworks.com](mailto:databricks@mathworks.com).
14+
15+
- type: textarea
16+
id: problem
17+
attributes:
18+
label: What is the problem?
19+
description: A clear and concise description of what the bug is.
20+
21+
- type: textarea
22+
id: expectation
23+
attributes:
24+
label: What behavior were you expecting?
25+
description: What did you expect to happen?
26+
27+
- type: textarea
28+
id: actual-behavior
29+
attributes:
30+
label: What happened instead?
31+
description: What actually happened?
32+
33+
- type: textarea
34+
id: steps-to-reproduce
35+
attributes:
36+
label: Steps to reproduce the issue
37+
description: Provide a sequence of steps to reproduce the issue.
38+
39+
- type: textarea
40+
id: suggested-fix
41+
attributes:
42+
label: Suggested fix (if any)
43+
44+
- type: textarea
45+
id: additional-info
46+
attributes:
47+
label: Any additional information
48+
description: Add any other context about the problem here.
49+
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
# Copyright 2026 The MathWorks, Inc.
2+
3+
name: "Bug Report for Notebooks"
4+
title: "<Enter short description>"
5+
description: "File a bug report."
6+
labels: [bug, needs-triage, notebook]
7+
body:
8+
- type: markdown
9+
attributes:
10+
value: |
11+
Before reporting a bug, see [Issues](https://github.com/mathworks-ref-arch/matlab-on-databricks/issues) to check if an issue already exists for the bug you encountered. To request a feature or report a vulnerability, return to [Create an Issue](https://github.com/mathworks-ref-arch/matlab-on-databricks/issues/new/choose).
12+
13+
Do not include sensitive information in the bug report. If you need to share sensitive information, please contact [databricks@mathworks.com](mailto:databricks@mathworks.com).
14+
15+
- type: textarea
16+
id: problem
17+
attributes:
18+
label: What is the problem?
19+
description: A clear and concise description of what the bug is.
20+
21+
- type: textarea
22+
id: expectation
23+
attributes:
24+
label: What behavior were you expecting?
25+
description: What did you expect to happen?
26+
27+
- type: textarea
28+
id: actual-behavior
29+
attributes:
30+
label: What happened instead?
31+
description: What actually happened?
32+
33+
- type: textarea
34+
id: steps-to-reproduce
35+
attributes:
36+
label: Steps to reproduce the issue
37+
description: Provide a sequence of steps to reproduce the issue.
38+
39+
- type: textarea
40+
id: suggested-fix
41+
attributes:
42+
label: Suggested fix (if any)
43+
44+
- type: textarea
45+
id: additional-info
46+
attributes:
47+
label: Any additional information
48+
description: Add any other context about the problem here.
49+
50+
- type: textarea
51+
id: logs
52+
attributes:
53+
label: Logs and Errors
54+
description: |
55+
Include full errors, uncaught exceptions, stack traces, and relevant logs.
56+
57+
If possible, provide **Standard output** and **Standard error** output from the driver logs of your cluster.
58+
render: markdown
59+
60+
- type: dropdown
61+
id: browsers
62+
attributes:
63+
label: Browser(s) used
64+
multiple: true
65+
options:
66+
- Chrome
67+
- Firefox
68+
- Safari
69+
- Microsoft Edge
70+
71+
- type: textarea
72+
id: Diagnostics-output
73+
attributes:
74+
label: Diagnostics output
75+
description: Run Diagnostics from the Diagnostic tab in Connect_to_MATLAB notebook and paste the output below.
76+

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Copyright 2026 The MathWorks, Inc.
2+
3+
blank_issues_enabled: false

0 commit comments

Comments
 (0)