Add devcontainer for isolating Claude Code#3922
Draft
samsrabin wants to merge 15 commits intoESCOMP:b4b-devfrom
Draft
Add devcontainer for isolating Claude Code#3922samsrabin wants to merge 15 commits intoESCOMP:b4b-devfrom
samsrabin wants to merge 15 commits intoESCOMP:b4b-devfrom
Conversation
Install Miniconda as root (with arch detection for x86_64/aarch64), make it accessible to the node user, and initialize conda for both bash and zsh shells. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Script creates the ctsm_pylib conda environment using py_env_create, auto-activates it in new terminal sessions, and verifies key tools (python, pylint, black) are available. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace JS extensions (eslint, prettier) with Python extensions (ms-python.python, pylint, black-formatter). Configure VS Code to use the ctsm_pylib conda env, pylint with .pylintrc, and black with pyproject.toml. Add postCreateCommand to create the conda env. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Allow conda.anaconda.org, repo.anaconda.com, pypi.org, and files.pythonhosted.org through the firewall so additional packages can be installed after the firewall activates. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Document the Miniconda installation, conda env setup script, Python VS Code extensions/settings, and firewall whitelist additions. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add -exist flag to ipset add commands so duplicate IPs (from multiple domains resolving to the same address) are silently ignored instead of causing a fatal error. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Modern conda requires TOS acceptance for default channels before env creation. Accept pkgs/main and pkgs/r TOS non-interactively before running py_env_create. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
zsh-in-docker overwrites .zshrc, so conda init must run after it to ensure the conda initialization block persists. This fixes "Run 'conda init' before 'conda activate'" errors in VS Code terminal sessions. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Remove zsh-in-docker and powerline10k setup, change default shell to bash, and simplify conda init to bash only. This eliminates the zsh-in-docker .zshrc overwrite issue and reduces image complexity. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Required by the doc build process to fetch LFS-tracked image files. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Install and configure the en_US.UTF-8 locale to fix Sphinx locale.Error during documentation builds and suppress bash setlocale warnings. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of changes
This PR adds a
.devcontainer/directory at the top level with instructions and files for setting up a container in which Claude Code can be isolated.Remaining work:
Specific notes
Contributors other than yourself, if any: None
CTSM Issues Fixed (include github issue #): None
Are answers expected to change (and if so in what way)? No
Any User Interface Changes (namelist or namelist defaults changes)? No
Does this create a need to change or add documentation? Did you do so? Yes; not yet.
Testing performed, if any: I worked on #3920 and ESMCI/doc-builder#37 using this isolated Claude Code setup in unattended mode.