Skip to content

Commit 113690e

Browse files
authored
Adds new Devcontainer Setup for use with Codespaces (#8983)
* Add devcontainer setup from nf-core/tools for testing. Move nf-test install to setup.sh * Add the default user again at the end * Move nf-test install to unprivileged location and add WORKDIR. Add pipefail. Remove copying unnecessary files. * Move Dockerfile * Remove docker-in-docker interfering with docker-outside-docker from parent image. Adapt Mounts to use host paths when starting sibling containers * Fix arm profile * Remove apptainer install * Remove efforts for unprivileged user * Use root user by default * update welcome message. update prompt * Remove explicitly setting NFT_WORKDIR * Add nf-test as local feature * Remove Dockerfile in favor of features * Remove env vars * Add apptainer as local feature * Fix install * Fix install script for apptainer by installing dependencies first * Fix install script for apptainer by installing dependencies first * Update local feature to have version, name, id * ftr: new devcontainer config * Remove redundant tools install * Remove local features. Already installed in parent image * Testing: Change to pulling image from controlled location for testing in codespaces. REVERT THIS * fix: set executable bit flag to run setup.sh * Change to final container image * Bumpy hostRequirements to run in more powerful instance in Codespaces * Switch to using dev tag of our nf-core/devcontainer
1 parent 0c47e41 commit 113690e

File tree

2 files changed

+30
-23
lines changed

2 files changed

+30
-23
lines changed

.devcontainer/devcontainer.json

Lines changed: 15 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,20 @@
11
{
2-
"name": "nfcore",
3-
"image": "nfcore/gitpod:dev",
4-
"remoteUser": "gitpod",
5-
"runArgs": ["--privileged"],
6-
// Configure tool-specific properties.
7-
"customizations": {
8-
// Configure properties specific to VS Code.
9-
"vscode": {
10-
// Set *default* container specific settings.json values on container create.
11-
"settings": {
12-
"python.defaultInterpreterPath": "/opt/conda/bin/python",
13-
"python.linting.enabled": true
14-
},
2+
"name": "nfcore-modules",
3+
"image": "nfcore/devcontainer:dev",
154

16-
// Add the IDs of extensions you want installed when the container is created.
17-
"extensions": ["nf-core.nf-core-extensionpack"]
18-
}
5+
"remoteEnv": {
6+
// Workspace path on the host for mounting with docker-outside-of-docker
7+
"LOCAL_WORKSPACE_FOLDER": "${localWorkspaceFolder}"
198
},
20-
"features": {
21-
"ghcr.io/devcontainers/features/github-cli:1.0.11": {
22-
"digest": "sha256:464564228ccdd6028f01f8a62a3cfbaf76e9ba7953b29ac0e53ba2c262604312"
23-
},
24-
"ghcr.io/devcontainers/features/docker-in-docker:2.9.2": {
25-
"digest": "sha256:9074d8eaf4585ab1498c81a8762078992725614fc7a9cfafe799aa22717a6bbf"
26-
}
9+
10+
"onCreateCommand": "./.devcontainer/setup.sh",
11+
12+
"remoteUser": "root",
13+
"privileged": true,
14+
15+
"hostRequirements": {
16+
"cpus": 4,
17+
"memory": "16gb",
18+
"storage": "32gb"
2719
}
2820
}

.devcontainer/setup.sh

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/usr/bin/env bash
2+
3+
# Customise the terminal command prompt
4+
echo "export PROMPT_DIRTRIM=2" >> $HOME/.bashrc
5+
echo "export PS1='\[\e[3;36m\]\w ->\[\e[0m\\] '" >> $HOME/.bashrc
6+
export PS1='\[\e[3;36m\]\w ->\[\e[0m\\] '
7+
8+
# Update Nextflow
9+
nextflow self-update
10+
11+
# Install pre-commit hooks
12+
pre-commit install --install-hooks
13+
14+
# Update welcome message
15+
echo "Welcome to nf-core/modules devcontainer!" > /usr/local/etc/vscode-dev-containers/first-run-notice.txt

0 commit comments

Comments
 (0)