Skip to content

Commit 71d8812

Browse files
committed
Initial commit
0 parents  commit 71d8812

File tree

16 files changed

+384
-0
lines changed

16 files changed

+384
-0
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"image": "docker.io/ubuntu:22.04"
3+
}

.devcontainer/2-matlab/Dockerfile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
FROM docker.io/mathworks/matlab:r2024b
2+
3+
RUN sudo apt-get update && sudo apt-get install git -y
4+
5+
RUN pipx upgrade matlab-proxy && \
6+
pipx inject --include-apps --include-deps \
7+
matlab-proxy jupyter-matlab-proxy jupyterlab
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"dockerFile": "Dockerfile",
3+
"runArgs": ["--shm-size=512M"], // shared memory required for MATLAB
4+
5+
"forwardPorts": [8888],
6+
"portsAttributes": {
7+
"8888": { "label": "MATLAB" }
8+
},
9+
10+
"postStartCommand": "nohup bash -c 'run.sh -browser &' > /dev/null 2>&1"
11+
}

.devcontainer/3-jupyter/Dockerfile

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
FROM quay.io/jupyter/datascience-notebook:r-4.3.3
2+
3+
USER root
4+
5+
### RStudio system dependencies
6+
RUN apt-get update && \
7+
apt-get install -y --no-install-recommends \
8+
lmodern psmisc lsb-release libssl-dev libclang-dev libpq5 libtiff-dev && \
9+
apt-get clean -y && \
10+
rm -rf /var/lib/apt/lists/* /tmp/library-scripts
11+
12+
### install RStudio server
13+
ARG RSTUDIO_VER="2023.12.1-402"
14+
ARG RSTUDIO_URL="https://download2.rstudio.org/server/jammy/amd64"
15+
RUN wget -q "${RSTUDIO_URL}/rstudio-server-${RSTUDIO_VER}-amd64.deb" && \
16+
apt-get install -yq --no-install-recommends ./rstudio*.deb && \
17+
rm -f ./rstudio*.deb && \
18+
apt-get clean && \
19+
chmod 777 /var/run/rstudio-server && \
20+
chmod +t /var/run/rstudio-server
21+
22+
USER ${NB_USER}
23+
24+
### RStudio launch button in JupyterLab
25+
RUN mamba install -y -c conda-forge --freeze-installed \
26+
jupyter-rsession-proxy=2.2.0 && \
27+
mamba clean --all
28+
29+
### Enhanced R terminal
30+
RUN pip install radian==0.6.11
31+
32+
### Additional editing and debugging tools for VS Code R development
33+
RUN echo 'options(repos=c(CRAN="https://cloud.r-project.org"))' > ~/.Rprofile && \
34+
R -q -e 'remotes::install_version("markdown", version="1.12")' && \
35+
R -q -e 'remotes::install_version("languageserver", version="0.3.16")' && \
36+
R -q -e 'remotes::install_version("httpgd", version="2.0.1")' && \
37+
R -q -e 'remotes::install_github("ManuelHentschel/vscDebugger")'
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"dockerFile": "Dockerfile",
3+
4+
"runArgs": ["--workdir=/workspaces/container-computing"],
5+
"overrideCommand": false, // Lets JupyterLab server to run
6+
"forwardPorts": [8888],
7+
"portsAttributes": {
8+
"8888": { "label": "JupyterLab" }
9+
},
10+
11+
"customizations": {
12+
"vscode": {
13+
"settings": {
14+
"python.defaultInterpreterPath": "/opt/conda/bin/python",
15+
"r.rterm.linux": "/opt/conda/bin/radian",
16+
"r.bracketedPaste": true,
17+
"r.plot.useHttpgd": true
18+
},
19+
"extensions": ["reditorsupport.r", "RDebugger.r-debugger"]
20+
}
21+
}
22+
}

.devcontainer/4-gpu/Dockerfile

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
FROM quay.io/jupyter/pytorch-notebook:cuda12-python-3.12.8
2+
3+
USER root
4+
5+
### System packages
6+
RUN apt-get update && \
7+
apt-get install -y --no-install-recommends \
8+
lmodern file curl g++ tmux && \
9+
apt-get clean -y && \
10+
rm -rf /var/lib/apt/lists/* /tmp/library-scripts
11+
12+
USER ${NB_USER}
13+
14+
### GitHub CLI Installation
15+
ENV GH_CLI_VER "2.30.0"
16+
ENV GH_CLI_URL "https://github.com/cli/cli/releases/download"
17+
RUN wget -O - \
18+
${GH_CLI_URL}/v${GH_CLI_VER}/gh_${GH_CLI_VER}_linux_amd64.tar.gz | \
19+
tar xvzf - -C /opt/conda/bin gh_${GH_CLI_VER}_linux_amd64/bin/gh \
20+
--strip-components=2
21+
22+
### Prints Jupyter server token when terminal is opened
23+
RUN echo "echo \"Jupyter server token: \$(jupyter server list 2>&1 | grep -oP '(?<=token=)[[:alnum:]]*')\"" > ${HOME}/.get-jupyter-url.sh && \
24+
echo "sh \${HOME}/.get-jupyter-url.sh" >> ${HOME}/.bashrc
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"dockerFile": "Dockerfile",
3+
4+
"workspaceMount": "source=${localWorkspaceFolder},target=/home/jovyan/work,type=bind",
5+
"workspaceFolder": "/home/jovyan/work",
6+
"overrideCommand": false,
7+
"forwardPorts": [8888],
8+
9+
"runArgs": [
10+
"--runtime=nvidia", // "--runtime=amd"
11+
"--gpus=all" // "--gpus='device=1,2'"
12+
],
13+
14+
"customizations": {
15+
"vscode": {
16+
"settings": {
17+
"python.defaultInterpreterPath": "/opt/conda/bin/python"
18+
},
19+
"extensions": [
20+
"ms-python.python", // for Python
21+
"ms-toolsai.jupyter", // for Python
22+
"ms-toolsai.jupyter-keymap", // for Python
23+
"ms-vscode.live-server",
24+
"analytic-signal.preview-pdf"
25+
]
26+
}
27+
}
28+
}

.devcontainer/5-gui/Dockerfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
FROM docker.io/ubuntu:22.04
2+
3+
# git package installation
4+
RUN apt-get update && \
5+
apt-get install -y git g++
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"dockerFile": "Dockerfile",
3+
"containerEnv": { "TMPDIR": "/tmp" },
4+
5+
"forwardPorts": [6080],
6+
7+
"features": {
8+
"ghcr.io/devcontainers/features/desktop-lite:1": {
9+
"version": "latest",
10+
"noVncVersion": "1.2.0",
11+
"password": "noPassword",
12+
"webPort": "6080"
13+
}
14+
}
15+
}

.devcontainer/Dockerfile

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
FROM quay.io/jupyter/datascience-notebook:r-4.3.3
2+
3+
USER root
4+
5+
### RStudio system dependencies
6+
RUN apt-get update && \
7+
apt-get install -y --no-install-recommends \
8+
lmodern psmisc lsb-release libssl-dev \
9+
libclang-dev libpq5 libtiff-dev \
10+
&& \
11+
apt-get clean -y && \
12+
rm -rf /var/lib/apt/lists/* /tmp/library-scripts
13+
14+
### RStudio server
15+
ARG RSTUDIO_VER=2023.12.1-402
16+
ARG RSTUDIO_URL=https://download2.rstudio.org/server/jammy/amd64
17+
RUN wget -q ${RSTUDIO_URL}/rstudio-server-${RSTUDIO_VER}-amd64.deb && \
18+
apt-get install -yq --no-install-recommends ./rstudio*.deb && \
19+
rm -f ./rstudio*.deb && \
20+
apt-get clean && \
21+
chmod 777 /var/run/rstudio-server && \
22+
chmod +t /var/run/rstudio-server
23+
24+
USER ${NB_USER}
25+
26+
### RStudio launch button in JupyterLab
27+
RUN mamba install -y -c conda-forge --freeze-installed \
28+
jupyter-rsession-proxy=2.2.0 && \
29+
mamba clean --all
30+
31+
### Enhanced R terminal
32+
RUN pip install \
33+
radian==0.6.11
34+
35+
### Additional editing and debugging tools for VS Code R development
36+
RUN R -q -e 'remotes::install_version("markdown", version="1.12", repos="cloud.r-project.org")' && \
37+
R -q -e 'remotes::install_version("languageserver", version="0.3.16", repos="cloud.r-project.org")' && \
38+
R -q -e 'remotes::install_version("httpgd", version="2.0.1", repos="cloud.r-project.org")' && \
39+
R -q -e 'remotes::install_github("ManuelHentschel/vscDebugger")' && \
40+
echo
41+
42+
### Prints Jupyter server token when terminal is opened
43+
RUN echo "echo \"Jupyter server token: \$(jupyter server list 2>&1 | grep -oP '(?<=token=)[[:alnum:]]*')\"" > ${HOME}/.get-token.sh && \
44+
echo "sh \${HOME}/.get-token.sh" >> ${HOME}/.bashrc

0 commit comments

Comments
 (0)