From 958fb4f0d0e14e3c259225c5637b01c2f53a32d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mos=C3=A8=20Giordano?= Date: Sat, 26 Oct 2024 00:54:21 +0100 Subject: [PATCH] Add devcontainer --- .devcontainer/devcontainer.json | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .devcontainer/devcontainer.json diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..7240f36 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,33 @@ +{ + "name": "Julia Tutorial at Supercomputing 24", + "image": "ghcr.io/juliaparallel/julia-hpc-tutorial-sc24:main", + + "customizations": { + "vscode": { + "extensions": [ + "julialang.language-julia", + "ms-toolsai.jupyter", + ] + } + }, + + "containerEnv": { + // Automatically use all threads available. + "JULIA_NUM_THREADS": "auto", + }, + + // Forward Jupyter port + "forwardPorts": [8888], + "portsAttributes": { + "8888": { + "label": "Jupyterlab server", + "requireLocalPort": true, + "onAutoForward": "ignore" + } + }, + + // Use 'postAttachCommand' to run commands after the container is started. + // Use tokenless server to be able to easily launch the app in Codespaces. + "postAttachCommand": "julia -e 'import Conda; run(`$(joinpath(Conda.SCRIPTDIR, \"jupyter\")) lab --allow-root --LabApp.token='' --port 8888`)'", + +}