Skip to content

Local devcontainers (take 2) #575

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

Merged
merged 13 commits into from
Apr 25, 2025
Merged

Local devcontainers (take 2) #575

merged 13 commits into from
Apr 25, 2025

Conversation

pinin4fjords
Copy link
Collaborator

@pinin4fjords pinin4fjords commented Mar 20, 2025

Re-pitching #539 in light of recent changes. I'll pull updates to docs etc from there once people are happy with the approach.

Local devcontainers usage means making the host file paths valid within the container to appease docker-outside-docker. This is really just a case of:

  1. Mount the host systems
  2. Use symlinking to make /workspaces/training valid and consistent with materials, and add some options to move new terminal starting dirs to the symlink.

I'm not sure if this will all work without a local build, so

I also had to pin the java version ('latest' didn't work for me).

<     "workspaceFolder": "/workspaces/training",
---
>     "workspaceFolder": "${localWorkspaceFolder}",
>     "workspaceMount": "source=${localWorkspaceFolder},target=${localWorkspaceFolder},type=bind",
27c28
<         "NXF_HOME": "/workspaces/.nextflow",
---
>         "NXF_HOME": "/workspaces/training/.nextflow",
34c35,36
<     "onCreateCommand": "bash .devcontainer/setup.sh",
---
>     "onCreateCommand": "bash ${localWorkspaceFolder}/.devcontainer/setup.sh",
>     "postCreateCommand": "mkdir -p /workspaces && rm -rf /workspaces/training && ln -s ${localWorkspaceFolder} /workspaces/training",
40c42,44
<                 "python.defaultInterpreterPath": "/opt/conda/bin/python"
---
>                 "python.defaultInterpreterPath": "/opt/conda/bin/python",
>                 "terminal.integrated.cwd": "/workspaces/training",
>                 "terminal.integrated.defaultLocation": "workspace"

Copy link

netlify bot commented Mar 20, 2025

Deploy Preview for nextflow-training ready!

Name Link
🔨 Latest commit c5535d2
🔍 Latest deploy log https://app.netlify.com/sites/nextflow-training/deploys/680bb3f2a31c480008f30db6
😎 Deploy Preview https://deploy-preview-575--nextflow-training.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@pinin4fjords pinin4fjords requested a review from ewels March 20, 2025 13:13
@vdauwera
Copy link
Collaborator

@pinin4fjords where do we stand on this?

@vdauwera vdauwera added question Further information is requested environment Devcontainer, codespaces etc labels Apr 14, 2025
@pinin4fjords
Copy link
Collaborator Author

@vdauwera ready to roll from my point of view. @ewels wanted to review when he could.

@vdauwera vdauwera removed the question Further information is requested label Apr 15, 2025
Co-authored-by: Maxime U Garcia <maxime.garcia@seqera.io>
maxulysse
maxulysse previously approved these changes Apr 25, 2025
Copy link
Collaborator

@maxulysse maxulysse left a comment

Choose a reason for hiding this comment

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

Minor comment, but I followed the guide, and managed to run a different nextflow version in my local devcontainers compared to my own local install.
This is some serious magic

pinin4fjords and others added 2 commits April 25, 2025 17:10
@pinin4fjords
Copy link
Collaborator Author

Applying maxime's little suggestions dismissed his approval, but this is tested and ready to go.

@pinin4fjords pinin4fjords merged commit 073757c into master Apr 25, 2025
7 checks passed
@pinin4fjords pinin4fjords deleted the local-devcontainers branch April 25, 2025 16:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
environment Devcontainer, codespaces etc
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants