|
| 1 | +{ |
| 2 | + "name": "micromamba", |
| 3 | + "runArgs": [ |
| 4 | + "--hostname", |
| 5 | + "devcontainer", |
| 6 | + "--name", |
| 7 | + "${localEnv:USER}_devcontainer_micromamba", |
| 8 | + "--privileged" // Add this to allow SLURM to manage processes |
| 9 | + ], |
| 10 | + "containerEnv": { |
| 11 | + "LOCAL_WORKSPACE_FOLDER": "${localWorkspaceFolder}", |
| 12 | + "CONTAINER_WORKSPACE_FOLDER": "${containerWorkspaceFolder}" |
| 13 | + }, |
| 14 | + "build": { |
| 15 | + "dockerfile": "Dockerfile", |
| 16 | + "context": "..", |
| 17 | + "args": { |
| 18 | + "CONTAINER_WORKSPACE_FOLDER": "${containerWorkspaceFolder}", |
| 19 | + "BASE_IMAGE": "git-515d637-jammy", |
| 20 | + "ENVIRONMENT_YAML": "environment.yml" |
| 21 | + } |
| 22 | + }, |
| 23 | + "overrideCommand": true, // allow the entrypoint to run |
| 24 | + "mounts": [ |
| 25 | + "source=pre-commit-cache-${localEnv:USER},target=/home/mambauser/.cache/pre-commit,type=volume", |
| 26 | + "source=/var/run/docker.sock,target=/var/run/docker.sock,type=bind,consistency=cached", |
| 27 | + "source=${localWorkspaceFolder}/.devcontainer/slurm.conf,target=/etc/slurm-llnl/slurm.conf,type=bind" |
| 28 | + ], |
| 29 | + "remoteUser": "mambauser", |
| 30 | + "customizations": { |
| 31 | + "vscode": { |
| 32 | + "extensions": [ |
| 33 | + "ms-python.python", |
| 34 | + "ms-python.mypy-type-checker", |
| 35 | + "charliermarsh.ruff", |
| 36 | + "ms-toolsai.jupyter", |
| 37 | + "ms-azuretools.vscode-docker", |
| 38 | + "donjayamanne.githistory", |
| 39 | + "eamodio.gitlens", |
| 40 | + "mutantdino.resourcemonitor", |
| 41 | + "github.copilot", |
| 42 | + "davidanson.vscode-markdownlint" |
| 43 | + ], |
| 44 | + "settings": { |
| 45 | + // Files to completely exclude from view |
| 46 | + // (see also search.exclude and files.watcherExclude) |
| 47 | + "files.exclude": { |
| 48 | + // Ignore cached files |
| 49 | + "**/__pycache__": true, |
| 50 | + // Ignore files created for development installs |
| 51 | + "**/*.egg-info": true, |
| 52 | + // Ignore Jupyter checkpoint files |
| 53 | + "**/.ipynb_checkpoints": true, |
| 54 | + // Ignore cache directory, except for files which start with . (e.g. .gitignore) |
| 55 | + ".devcontainer/cache/*/[!\\.]*": true |
| 56 | + }, |
| 57 | + "[python]": { |
| 58 | + "editor.defaultFormatter": "charliermarsh.ruff" |
| 59 | + }, |
| 60 | + "ruff.path": [ |
| 61 | + "/opt/conda/bin/ruff" |
| 62 | + ], |
| 63 | + "ruff.interpreter": [ |
| 64 | + "/opt/conda/bin/python" |
| 65 | + ], |
| 66 | + // Ruler for "black"-formatted line widths |
| 67 | + "editor.rulers": [ |
| 68 | + 88 |
| 69 | + ], |
| 70 | + // Disable barely usable scrollbar |
| 71 | + "workbench.editor.wrapTabs": true, |
| 72 | + // Turn on autosave |
| 73 | + "files.autoSave": "afterDelay", |
| 74 | + // Show whitespace as tiny grey dots |
| 75 | + "editor.renderWhitespace": "boundary", |
| 76 | + // Use Pylance |
| 77 | + "python.languageServer": "Pylance", |
| 78 | + "python.analysis.typeCheckingMode": "basic", |
| 79 | + // Interpret lines beginning with "# !%" as ipython magic commands |
| 80 | + "jupyter.interactiveWindow.textEditor.magicCommandsAsComments": true, |
| 81 | + // Path of the default Python environment |
| 82 | + "python.defaultInterpreterPath": "/opt/conda/bin/python", |
| 83 | + // Disable the "conda activate base" command when opening a new terminal |
| 84 | + "python.terminal.activateEnvironment": false, |
| 85 | + // Automatically keep Git up-to-date with remotes |
| 86 | + "git.autofetch": "all", |
| 87 | + // Make sure that key combos like Ctrl+K are not intercepted by VS Code |
| 88 | + // when using the terminal |
| 89 | + "terminal.integrated.allowChords": false, |
| 90 | + "extensions.verifySignature": false |
| 91 | + } |
| 92 | + } |
| 93 | + }, |
| 94 | + "postCreateCommand": "sudo /usr/local/bin/startup.sh && sudo scontrol show config && sudo scontrol show nodes && sudo scontrol show partitions", |
| 95 | + "postStartCommand": "pip install -e ." |
| 96 | +} |
0 commit comments