-
Notifications
You must be signed in to change notification settings - Fork 248
DRAFT: Build studios compatible images #629
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
Draft
pinin4fjords
wants to merge
8
commits into
master
Choose a base branch
from
studios_docker
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from 4 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
acdfb40
Build studios compatible images
pinin4fjords d24a051
Fix registry stuff
pinin4fjords dc9fb17
Refactor Studios Dockerfile for improved UX and stability
pinin4fjords ad4a2ee
Appease linter
pinin4fjords 35240de
Tidy up, make repo configurable
pinin4fjords 1cb038b
Fix whitespace
pinin4fjords 69df12c
Fix container restart issue in setup script - check if repo exists be…
pinin4fjords 239f40f
Optimize container restart - skip all setup if repo exists, only run …
pinin4fjords File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
|
||
ARG CONNECT_CLIENT_VERSION="0.8-rc" | ||
|
||
FROM cr.seqera.io/public/data-studio-vscode:1.101.2-${CONNECT_CLIENT_VERSION} | ||
|
||
ARG IMAGE_TAG=2.2.1 | ||
ENV TRAINING_TAG=${IMAGE_TAG} | ||
|
||
# Create and configure workspace | ||
WORKDIR /workspaces | ||
RUN mkdir -p /workspaces/.nextflow && \ | ||
mkdir -p /workspaces/.vscode-server && \ | ||
mkdir -p /workspaces/training | ||
|
||
# Configure VS Code settings for dark mode and auto-open terminal | ||
RUN mkdir -p /workspaces/training/.vscode | ||
COPY <<EOF /workspaces/training/.vscode/settings.json | ||
{ | ||
"workbench.colorTheme": "Default Dark Modern", | ||
"terminal.integrated.defaultProfile.linux": "bash", | ||
"terminal.integrated.cwd": "${workspaceFolder}", | ||
"workbench.startupEditor": "none", | ||
"workbench.panel.defaultLocation": "bottom", | ||
"workbench.panel.opensMaximized": "never", | ||
"terminal.integrated.showOnStartup": "always", | ||
"cSpell.diagnosticLevel": "Hint", | ||
"nextflow.java.home": "/usr", | ||
"nextflow.debug": false | ||
} | ||
EOF | ||
|
||
# Pre-install nf-core extension pack | ||
RUN /home/.vscode/bin/openvscode-server --install-extension nf-core.nf-core-extensionpack --force | ||
|
||
# Patch init script to use training directory as default folder | ||
RUN sed -i 's|--default-folder '"'"'/workspace'"'"'|--default-folder '"'"'/workspaces/training'"'"'|g' /init | ||
|
||
# Create setup script that downloads training materials then runs init | ||
RUN echo -e '#!/bin/bash\n\ | ||
echo "Downloading training materials..."\n\ | ||
wget -qO- https://github.com/nextflow-io/training/archive/refs/tags/${TRAINING_TAG}.tar.gz | tar xz --strip-components=1 -C /workspaces/training\n\ | ||
echo "Initializing Nextflow..."\n\ | ||
# Set conservative JVM flags for memory management only\n\ | ||
export NXF_OPTS="-XX:+UseContainerSupport -XX:MaxRAMPercentage=50.0"\n\ | ||
# Pre-warm Nextflow\n\ | ||
nextflow help > /dev/null 2>&1\n\ | ||
sleep 2\n\ | ||
nextflow info > /dev/null 2>&1\n\ | ||
sleep 2\n\ | ||
echo "Starting VS Code..."\n\ | ||
exec /init' > /usr/local/bin/setup.sh && \ | ||
chmod +x /usr/local/bin/setup.sh | ||
|
||
# Override the entrypoint to use connect-client | ||
ENTRYPOINT ["/usr/bin/connect-client", "--entrypoint", "/usr/local/bin/setup.sh"] | ||
|
||
# Default arguments (empty since setup script handles everything) | ||
CMD [] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
future improvement: the latest CONNECT_CLIENT_VERSION could be extracted from the release information in the repo https://github.com/seqeralabs/studio-templates. As we are still finalizing versioning of the connect and cliejt templates, this is something that can be added later