-
Notifications
You must be signed in to change notification settings - Fork 1
chore: add devcontainer for codespaces, use default /workspace mount for code #186
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
a96140a to
9dc6f53
Compare
There was a problem hiding this 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 modernizes the devcontainer configuration to use GitHub Codespaces' default /workspaces mount point instead of the custom /src/eic-opticks path. The changes simplify the devcontainer setup by removing custom mount configurations and add a dedicated codespace configuration.
Key changes:
- Updates
OPTICKS_HOMEenvironment variable from/src/eic-opticksto/workspaces/eic-opticksin Dockerfile - Removes custom workspace folder and mount configurations from main devcontainer
- Adds new codespace-specific devcontainer configuration using prebuilt base image
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| Dockerfile | Updates OPTICKS_HOME path to align with standard Codespaces workspace mount location |
| .devcontainer/devcontainer.json | Removes custom mount and workspaceFolder settings to use Codespaces defaults |
| .devcontainer/codespace/devcontainer.json | Adds minimal codespace configuration using prebuilt base image |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| ENV BASH_ENV=/etc/bash.nonint | ||
| ENV OPTICKS_PREFIX=/opt/eic-opticks | ||
| ENV OPTICKS_HOME=/src/eic-opticks | ||
| ENV OPTICKS_HOME=/workspaces/eic-opticks |
Copilot
AI
Dec 19, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changing OPTICKS_HOME from /src/eic-opticks to /workspaces/eic-opticks creates inconsistencies with the GitHub Actions workflow. The workflow file .github/workflows/build-pull-request.yaml (lines 77-78) references hardcoded paths like /src/eic-opticks/tests/test_opticks.sh and /src/eic-opticks/tests/test_simg4ox.sh. Since the Dockerfile copies code to $OPTICKS_HOME and the workflow tests run against the built image, these test commands will fail because the paths no longer exist in the container.
The workflow file should be updated to use /workspaces/eic-opticks/tests/... or reference the $OPTICKS_HOME environment variable instead.
| ENV OPTICKS_HOME=/workspaces/eic-opticks | |
| ENV OPTICKS_HOME=/src/eic-opticks |
| @@ -0,0 +1,4 @@ | |||
| { | |||
| "name": "eic-opticks (codespace)", | |||
| "image": "ghcr.io/bnlnpps/eic-opticks:base" | |||
Copilot
AI
Dec 19, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The codespace devcontainer references the prebuilt image ghcr.io/bnlnpps/eic-opticks:base, which was built with the old OPTICKS_HOME=/src/eic-opticks path. This creates an inconsistency because:
- The Dockerfile now sets
OPTICKS_HOME=/workspaces/eic-opticks - Codespaces will mount the workspace at
/workspaces/eic-opticksby default - But the existing base image still expects code at
/src/eic-opticks
This means the codespace configuration won't work correctly until the base image is rebuilt and republished with the updated Dockerfile. Consider either building the image locally in the codespace devcontainer (like the main devcontainer does), or ensuring the base image is rebuilt before this configuration is used.
| "image": "ghcr.io/bnlnpps/eic-opticks:base" | |
| "build": { | |
| "dockerfile": "../Dockerfile" | |
| } |
No description provided.