-
Notifications
You must be signed in to change notification settings - Fork 1
Add Xpra and IGV (v2.19.4) Java desktop example #6
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
Open
robnewman
wants to merge
11
commits into
master
Choose a base branch
from
robnewman-xpra-igv
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.
+263
−1
Open
Changes from 9 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
991eb4f
Add Xpra and IGV example
robnewman f9b891f
Update path to connect-client
robnewman 0d96b57
Remove missing Notes section
robnewman d9812de
Update xpra-igv/entry.sh
robnewman 45859a8
Update xpra-igv/Dockerfile
robnewman 21fb37b
Add menu item to allow IGV to launch from menu
robnewman 39c5f4d
Add updated Dockerfile
robnewman 03b7519
Merge branch 'robnewman-xpra-igv' of https://github.com/seqeralabs/cu…
robnewman 831aaf1
Fix double ampersand
robnewman 734b87a
Update xpra-igv/Dockerfile
robnewman 55d315f
Remove Data Team-specific cmd
robnewman 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
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,115 @@ | ||
| # Add a default Connect client version. Can be overridden by build arg | ||
| ARG CONNECT_CLIENT_VERSION="0.8.1-snapshot" | ||
|
|
||
| # Path to the public connect-client | ||
| FROM public.cr.seqera.io/platform/connect-client:${CONNECT_CLIENT_VERSION} AS connect | ||
|
|
||
| FROM mambaorg/micromamba:1.5.10-noble AS micromamba | ||
|
|
||
| FROM ubuntu:24.04 | ||
|
|
||
| ENV DEBIAN_FRONTEND=noninteractive | ||
|
|
||
| ARG MAMBA_USER=root | ||
| ARG MAMBA_USER_ID=0 | ||
| ARG MAMBA_USER_GID=0 | ||
| ENV MAMBA_USER=$MAMBA_USER | ||
| ENV MAMBA_ROOT_PREFIX="/opt/conda" | ||
| ENV MAMBA_EXE="/bin/micromamba" | ||
|
|
||
| USER $MAMBA_USER | ||
|
|
||
| RUN apt-get update --yes && apt-get install --yes --no-install-recommends \ | ||
| apt-transport-https \ | ||
| pciutils \ | ||
| cups-filters \ | ||
| cups-common \ | ||
| cups-pdf \ | ||
| ca-certificates \ | ||
| git \ | ||
| wget \ | ||
| sudo \ | ||
| libatomic1 \ | ||
| python3.12 \ | ||
| python3-cups \ | ||
| python3-xdg \ | ||
| python3-pyinotify \ | ||
| python3-paramiko \ | ||
| python3-netifaces \ | ||
| python-is-python3 \ | ||
| gnome-menus \ | ||
| curl \ | ||
| locales \ | ||
| openjdk-17-jre \ | ||
| gnupg \ | ||
| kmod \ | ||
| x11-xkb-utils \ | ||
| dbus-x11 \ | ||
| xvfb \ | ||
| terminator \ | ||
| thunar && \ | ||
| apt-get clean && rm -rf /var/lib/apt/lists/* | ||
|
|
||
| COPY --from=micromamba "$MAMBA_EXE" "$MAMBA_EXE" | ||
| COPY --from=micromamba /usr/local/bin/_activate_current_env.sh /usr/local/bin/_activate_current_env.sh | ||
| COPY --from=micromamba /usr/local/bin/_dockerfile_shell.sh /usr/local/bin/_dockerfile_shell.sh | ||
| COPY --from=micromamba /usr/local/bin/_dockerfile_initialize_user_accounts.sh /usr/local/bin/_dockerfile_initialize_user_accounts.sh | ||
| COPY --from=micromamba /usr/local/bin/_dockerfile_setup_root_prefix.sh /usr/local/bin/_dockerfile_setup_root_prefix.sh | ||
|
|
||
| RUN /usr/local/bin/_dockerfile_initialize_user_accounts.sh && \ | ||
| /usr/local/bin/_dockerfile_setup_root_prefix.sh | ||
| SHELL ["/usr/local/bin/_dockerfile_shell.sh"] | ||
|
|
||
|
|
||
| # Install Xpra | ||
| RUN wget -O "/usr/share/keyrings/xpra.asc" https://xpra.org/xpra.asc && \ | ||
| wget -O "/etc/apt/sources.list.d/xpra.sources" https://raw.githubusercontent.com/Xpra-org/xpra/master/packaging/repos/noble/xpra.sources | ||
|
|
||
| ARG xpra_version=6.2.0-r2-1 | ||
| RUN apt-get update --yes && apt-get install --yes --no-install-recommends \ | ||
| xpra-html5 \ | ||
| xpra=${xpra_version} \ | ||
| xpra-client=${xpra_version} \ | ||
| xpra-client-gtk3=${xpra_version} \ | ||
| xpra-server=${xpra_version} \ | ||
| xpra-codecs=${xpra_version} \ | ||
| xpra-codecs-extras=${xpra_version} \ | ||
| xpra-common=${xpra_version} \ | ||
| xpra-x11=${xpra_version} && \ | ||
| apt-get clean && rm -rf /var/lib/apt/lists/* | ||
|
|
||
| RUN sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && \ | ||
| dpkg-reconfigure --frontend=noninteractive locales && \ | ||
| update-locale LANG=en_US.UTF-8 | ||
| ENV LANG=en_US.UTF-8 | ||
|
|
||
| # Create a conda env with the most recent compatible IGV | ||
| RUN rm -rf /opt/conda/pkgs/*.lock && \ | ||
| micromamba create -y -n igv -c bioconda \ | ||
| igv \ | ||
| && micromamba clean --all --yes \ | ||
| && rm -rf /opt/conda/pkgs/*.lock | ||
|
|
||
| # Copy the menu item contents, add to the env, make it executable | ||
| COPY ./menu_items.txt /usr/share/applications/.desktop | ||
| RUN chmod +x /usr/share/applications/.desktop | ||
|
|
||
| # Copy the welcome message into the container and append it to the .bashrc | ||
| COPY ./welcome_ASCII.txt /root/.welcome_ASCII.txt | ||
| RUN echo "cat /root/.welcome_ASCII.txt" >> /root/.bashrc | ||
| COPY ./entry.sh /bin | ||
|
|
||
| COPY ./seqera-wallpaper.png /usr/share/xpra/www/background.png | ||
|
|
||
| WORKDIR /workspace | ||
| RUN ln -s /workspace /root | ||
|
|
||
| # Add connect binary | ||
| COPY --from=connect /usr/bin/connect-client /usr/bin/connect-client | ||
| # Install connect dependencies | ||
| RUN /usr/bin/connect-client --install | ||
| # Optionally set tool identifier for metrics tracking purposes | ||
| RUN /usr/bin/connect-client --setToolIdentifier custom | ||
|
|
||
| ENTRYPOINT ["/usr/bin/connect-client", "--entrypoint"] | ||
| CMD ["bash", "/bin/entry.sh"] | ||
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,75 @@ | ||
| # Xpra and Integrative Genomics Viewer (IGV) Studio Environment | ||
|
|
||
| This repository provides a custom container image for running | ||
| [Xpra](https://xpra.org/index.html) and the [IGV](https://igv.org/) | ||
| desktop Java application as a Studio environment in Seqera Platform. | ||
|
|
||
| ## Table of Contents | ||
|
|
||
| - [Overview](#overview) | ||
| - [Features](#features) | ||
| - [Prerequisites](#prerequisites) | ||
| - [Building the Container](#building-the-container) | ||
| - [Using in Seqera Studios](#using-in-seqera-studios) | ||
| - [Customizing the Environment](#customizing-the-environment) | ||
| - [References](#references) | ||
|
|
||
| ## Overview | ||
|
|
||
| This container is designed for use as a [custom Studio | ||
| environment](https://docs.seqera.io/platform-cloud/studios/custom-envs) in | ||
| Seqera Platform. It is based on the required Seqera base image and | ||
| includes the necessary `connect-client` for compatibility. | ||
|
|
||
| ## Features | ||
|
|
||
| - Open-source, remote desktop display server | ||
| - IGV desktop Java application (v2.19.4) | ||
| - Reproducible and git-friendly | ||
| - Compatible with Seqera Studios custom environments | ||
|
|
||
| ## Prerequisites | ||
|
|
||
| - [Docker](https://www.docker.com/) installed | ||
| - [Wave](https://docs.seqera.io/platform-cloud/wave/) configured | ||
| in your Seqera Platform workspace (required for custom environments) | ||
| - Access to a container registry (public or Amazon ECR) if you wish to push your image | ||
|
|
||
| ## Building the Container | ||
|
|
||
| To build the container locally: | ||
|
|
||
| ```sh | ||
| wave -f Dockerfile --await | ||
| ``` | ||
|
|
||
| Or, using Docker directly: | ||
|
|
||
| ```sh | ||
| docker build -t xpra-igv . | ||
| ``` | ||
|
|
||
| ## Using in Seqera Studios | ||
|
|
||
| 1. **Push your image** to a container registry accessible by Seqera Platform. | ||
| 2. In Seqera Platform, go to the **Studios** tab and click **Add Studio**. | ||
| 3. Select **Prebuilt container image** as the template. | ||
| 4. Enter your container image URI (e.g., `cr.your-registry.io/your-org/marimo-studio:latest`). | ||
| 5. Configure compute resources and data mounts as needed. | ||
| 6. Launch the Studio. | ||
|
|
||
| For more details, see the [official documentation](https://docs.seqera.io/platform-cloud/studios/custom-envs). | ||
|
|
||
| ## Customizing the Environment | ||
|
|
||
| You can further customize this environment by: | ||
|
|
||
| - Adding Conda or pip packages (see [Conda package syntax](https://docs.seqera.io/platform-cloud/studios/custom-envs#conda-package-syntax)) | ||
| - Modifying the Dockerfile to include additional dependencies | ||
|
|
||
| ## References | ||
|
|
||
| - [Seqera Studios: Custom Environments](https://docs.seqera.io/platform-cloud/studios/custom-envs) | ||
| - [Xpra Documentation](https://github.com/Xpra-org/xpra/blob/master/README.md) | ||
| - [IGV Desktop Documentation](https://github.com/igvteam/igv) | ||
| - [Wave Documentation](https://docs.seqera.io/platform-cloud/wave/) |
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,50 @@ | ||
| #!/bin/bash | ||
|
|
||
| source /usr/local/bin/_activate_current_env.sh | ||
| # automatically initialize all future (bash) shells, so that micromambe environments can be activated and deactivated | ||
| micromamba shell init --shell bash --root-prefix=~/micromamba | ||
|
|
||
| # Default video encoder | ||
| video_encoder="x264" | ||
|
|
||
| # Check for NVIDIA or AMD GPU presence | ||
| if lspci | grep -E "VGA|3D|NVIDIA|AMD"; then | ||
| # Assuming the presence of NVIDIA drivers and utilities | ||
| if command -v nvidia-smi &> /dev/null; then | ||
| video_encoder="nvenc" | ||
| elif glxinfo | grep -i "direct rendering: Yes"; then | ||
| # Check for AMD or other GPU types that support VA-API (Intel included) | ||
| video_encoder="vaapi" | ||
| fi | ||
| fi | ||
|
|
||
| exec xpra start \ | ||
| --bind-tcp=0.0.0.0:$CONNECT_TOOL_PORT \ | ||
| --mdns=no \ | ||
| --html=on \ | ||
| --pulseaudio=no \ | ||
| --clipboard-direction=both \ | ||
| --clipboard=yes \ | ||
| --dpi=300 \ | ||
| --encoding=auto \ | ||
| --video-encoder=$video_encoder \ | ||
| --min-quality=95 \ | ||
| --min-speed=95 \ | ||
| --desktop-scaling=auto \ | ||
| --windows=yes \ | ||
| --daemon=no \ | ||
| --start-child="terminator" \ | ||
| --start-child="igv" \ | ||
| --idle-timeout=21600 \ | ||
| --mousewheel=on \ | ||
| --opengl=yes \ | ||
| --tray=yes \ | ||
| --system-tray=yes \ | ||
| --sharing=yes \ | ||
| --ssl=www \ | ||
| --exit-with-client=no \ | ||
| --file-transfer=on \ | ||
| --open-files=no \ | ||
| --webcam=no \ | ||
| --notifications=no \ | ||
| --bell=no :100 |
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,9 @@ | ||
| [Desktop Entry] | ||
| Version=1.0 | ||
| Type=Application | ||
| Name=IGV | ||
| Comment=Integrative Genomics Viewer | ||
| Exec=/opt/conda/bin/igv | ||
| Icon=utilities-terminal | ||
| Terminal=false | ||
| Categories=System;Science;Biology; |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,15 @@ | ||
| .--------------------------------------------------------------------------. | ||
| | | | ||
| | ____ ____ _ _ _ | | ||
| | / ___| ___ __ _ ___ _ __ __ _ / ___|| |_ _ _ __| (_) ___ ___ | | ||
| | \___ \ / _ \/ _` |/ _ \ '__/ _` | \___ \| __| | | |/ _` | |/ _ \/ __| | | ||
| | ___) | __/ (_| | __/ | | (_| | ___) | |_| |_| | (_| | | (_) \__ \ | | ||
| | |____/ \___|\__, |\___|_| \__,_| |____/ \__|\__,_|\__,_|_|\___/|___/ | | ||
| | __ __ |_| ___ ______ __ | | ||
| | \ \/ /_ __ _ __ __ _ _ |_ _/ ___\ \ / / | | ||
| | \ /| '_ \| '__/ _` | _| |_ | | | _ \ \ / / | | ||
| | / \| |_) | | | (_| | |_ _| | | |_| | \ V / | | ||
| | /_/\_\ .__/|_| \__,_| |_| |___\____| \_/ | | ||
| | |_| | | ||
| | | | ||
| '--------------------------------------------------------------------------' |
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.
Uh oh!
There was an error while loading. Please reload this page.