Skip to content

Local devcontainers enablement #539

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

Closed
wants to merge 22 commits into from
Closed
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions .devcontainer/codespaces/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"name": "nextflow-training (codespaces)",

// Update this to pin the release tag before release
"image": "ghcr.io/nextflow-io/training:latest",
// Uncomment this and comment "image" when testing Dockerfile changes
// "build": { "dockerfile": "../Dockerfile", "context": ".." },

"features": {
"ghcr.io/devcontainers/features/docker-outside-of-docker:1": {
"version": "latest"
}
},
"workspaceFolder": "/workspaces/training",
"remoteEnv": {
"NXF_HOME": "/workspaces/.nextflow",
"HOST_PROJECT_PATH": "/workspaces/training"
},
"customizations": {
"vscode": {
"settings": {
"python.defaultInterpreterPath": "/opt/conda/bin/python"
},
"extensions": [
"ms-python.python",
"ms-python.vscode-pylance",
"nf-core.nf-core-extensionpack", // nf-core recommended extensions
"nextflow.nextflow", // Nextflow VS Code extension
"codezombiech.gitignore", // Language support for .gitignore files
"cssho.vscode-svgviewer" // SVG viewer
Copy link
Member

Choose a reason for hiding this comment

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

I think we can simplify these - nextflow.nextflow shouldn't be needed as it's already part of the nf-core extension pack, and the other two could be added to that. Then we just have the nf-core extension pack and be done with it.

I'd also like to remove a couple of the more subjective packages from the nf-core extension pack (rainbow indentation, TODO tree, code spell checker). I find myself disabling these each time in devcontainers, which is annoying.

We can do this in a separate PR, as needs upstream changes to the nf-core extension pack first.

Copy link
Member

Choose a reason for hiding this comment

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

]
}
},
"remoteUser": "root"
}
41 changes: 0 additions & 41 deletions .devcontainer/devcontainer.json

This file was deleted.

1 change: 1 addition & 0 deletions .devcontainer/devcontainer.json
39 changes: 39 additions & 0 deletions .devcontainer/local/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"name": "nextflow-training (local)",

// Update this to pin the release tag before release
"image": "ghcr.io/nextflow-io/training:latest",
// Uncomment this and comment "image" when testing Dockerfile changes
// "build": { "dockerfile": "../Dockerfile", "context": ".." },

"features": {
"ghcr.io/devcontainers/features/docker-outside-of-docker:1": {
"version": "latest"
}
},
"workspaceFolder": "${localWorkspaceFolder}",
"workspaceMount": "source=${localWorkspaceFolder},target=${localWorkspaceFolder},type=bind",
"remoteEnv": {
"NXF_HOME": "/workspaces/training/.nextflow",
"HOST_PROJECT_PATH": "/workspaces/training"
},
"postCreateCommand": "sudo mkdir -p /workspaces && sudo rm -rf /workspaces/training && sudo ln -s ${localWorkspaceFolder} /workspaces/training",
"customizations": {
"vscode": {
"settings": {
"python.defaultInterpreterPath": "/opt/conda/bin/python",
"terminal.integrated.cwd": "/workspaces/training",
"terminal.integrated.defaultLocation": "workspace"
},
"extensions": [
"ms-python.python",
"ms-python.vscode-pylance",
"nf-core.nf-core-extensionpack", // nf-core recommended extensions
"nextflow.nextflow", // Nextflow VS Code extension
"codezombiech.gitignore", // Language support for .gitignore files
"cssho.vscode-svgviewer" // SVG viewer
]
}
},
"remoteUser": "root"
}