⚠ This page is served via a proxy. Original site: https://github.com
This service does not collect credentials or authentication data.
Skip to content

Conversation

@jbcoe
Copy link
Owner

@jbcoe jbcoe commented Jan 31, 2026

Closes #6

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds devcontainer support to enable consistent development environments using Docker and VS Code's devcontainer feature. The configuration is copied from the pytorch-sandbox repository and adapted for this project.

Changes:

  • Added devcontainer configuration with Python 3.12 base image
  • Configured VS Code extensions for Python development (Ruff, Pylance, Jupyter, mypy)
  • Set up non-root user environment with uv package manager

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.

File Description
.devcontainer/devcontainer.json Defines the devcontainer configuration including VS Code extensions, settings, mounts, and environment variables
.devcontainer/Dockerfile Creates a Python 3.12-slim based container with essential development tools and uv package manager
.devcontainer/.dockerfilelintrc Configures dockerfile linting to allow sudo usage

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

},
"mounts": [
"source=${localWorkspaceFolder},target=/workspace,type=bind,consistency=cached",
"source=${localEnv:HOME}${localEnv:USERPROFILE}/.ssh,target=/home/vscode/.ssh,type=bind,consistency=cached"
Copy link

Copilot AI Jan 31, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The SSH mount attempts to support both Unix (HOME) and Windows (USERPROFILE) by concatenating environment variables. However, if both variables are set (which can happen on Windows with Git Bash or WSL), this will concatenate both paths creating an invalid path. A more robust approach would be to use conditional mounting or test this configuration on both platforms to ensure it works as intended.

Suggested change
"source=${localEnv:HOME}${localEnv:USERPROFILE}/.ssh,target=/home/vscode/.ssh,type=bind,consistency=cached"
"source=${localEnv:HOME}/.ssh,target=/home/vscode/.ssh,type=bind,consistency=cached"

Copilot uses AI. Check for mistakes.
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll just use the UNIX-compliant path.

@@ -0,0 +1,52 @@
{
"name": "py_cppmodel Dev Container",
Copy link

Copilot AI Jan 31, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The container name uses an underscore ("py_cppmodel Dev Container") while the project name in pyproject.toml uses a hyphen ("py-cppmodel"). For consistency with the project naming conventions, consider using "py-cppmodel Dev Container" instead.

Suggested change
"name": "py_cppmodel Dev Container",
"name": "py-cppmodel Dev Container",

Copilot uses AI. Check for mistakes.
@jbcoe jbcoe changed the title Copy devcontainer from https://github.com/jbcoe/pytorch-sandbox Adopt devcontainer from https://github.com/jbcoe/pytorch-sandbox Jan 31, 2026
@jbcoe jbcoe merged commit a8ca276 into main Jan 31, 2026
5 checks passed
@jbcoe jbcoe deleted the jbcoe/devcontainer branch January 31, 2026 18:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add devcontainer and docker image

2 participants