Skip to content

Commit 3f0dc91

Browse files
Add KasmVNC QuPath studio branch
Co-authored-by: Florian Wuennemann <flowuenne@gmail.com>
1 parent 3f6b143 commit 3f0dc91

7 files changed

Lines changed: 85 additions & 224 deletions

File tree

.github/workflows/docker-pr.yml

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,8 @@ jobs:
3232
- 'shiny-simple-example/**'
3333
marimo:
3434
- 'marimo/**'
35-
napari:
36-
- 'kasmVNC/napari/**'
37-
qupath:
35+
kasmvnc_qupath:
36+
- '.seqera/**'
3837
- 'kasmVNC/qupath/**'
3938
4039
- name: Set matrix
@@ -56,11 +55,8 @@ jobs:
5655
if [[ "${{ steps.changes.outputs.marimo }}" == "true" ]]; then
5756
CONTAINERS=$(echo "$CONTAINERS" | jq -c '. + [{"name":"marimo","path":"./marimo"}]')
5857
fi
59-
if [[ "${{ steps.changes.outputs.napari }}" == "true" ]]; then
60-
CONTAINERS=$(echo "$CONTAINERS" | jq -c '. + [{"name":"napari","path":"./kasmVNC/napari"}]')
61-
fi
62-
if [[ "${{ steps.changes.outputs.qupath }}" == "true" ]]; then
63-
CONTAINERS=$(echo "$CONTAINERS" | jq -c '. + [{"name":"qupath","path":"./kasmVNC/qupath"}]')
58+
if [[ "${{ steps.changes.outputs.kasmvnc_qupath }}" == "true" ]]; then
59+
CONTAINERS=$(echo "$CONTAINERS" | jq -c '. + [{"name":"kasmvnc-qupath","path":"./.seqera"}]')
6460
fi
6561
echo "matrix={\"container\":$CONTAINERS}" >> "$GITHUB_OUTPUT"
6662

.github/workflows/docker-release.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@ on:
1313
- cellxgene
1414
- shiny
1515
- marimo
16-
- napari
17-
- qupath
16+
- kasmvnc-qupath
1817
version:
1918
description: 'Version to release (e.g., 1.0.0)'
2019
required: true
@@ -49,8 +48,7 @@ jobs:
4948
cellxgene) echo "path=./cellxgene" >> "$GITHUB_OUTPUT" ;;
5049
shiny) echo "path=./shiny-simple-example" >> "$GITHUB_OUTPUT" ;;
5150
marimo) echo "path=./marimo" >> "$GITHUB_OUTPUT" ;;
52-
napari) echo "path=./kasmVNC/napari" >> "$GITHUB_OUTPUT" ;;
53-
qupath) echo "path=./kasmVNC/qupath" >> "$GITHUB_OUTPUT" ;;
51+
kasmvnc-qupath) echo "path=./.seqera" >> "$GITHUB_OUTPUT" ;;
5452
esac
5553
5654
- name: Log in to the Container registry
Lines changed: 18 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -5,48 +5,42 @@ ARG CONNECT_CLIENT_VERSION=0.9
55
FROM public.cr.seqera.io/platform/connect-client:${CONNECT_CLIENT_VERSION} AS connect
66

77
# ---------------------------------------------------------------
8-
# 2) KasmVNC base image with napari
8+
# 2) KasmVNC base image with QuPath
99
# ---------------------------------------------------------------
1010
FROM lscr.io/linuxserver/baseimage-kasmvnc:ubuntujammy
1111

1212
# Just for the automation at Seqera
1313
LABEL org.opencontainers.image.source="https://github.com/seqeralabs/custom-studios-examples"
1414

15-
ENV TITLE="napari"
15+
ENV TITLE="QuPath"
1616

17-
# KasmVNC Performance Optimizations
17+
# KasmVNC performance tuning for interactive desktop streaming
1818
ENV KASM_VNC_ENABLE_WEBP=1
1919
ENV KASM_VNC_JPEG_QUALITY=5
2020
ENV KASM_VNC_MAX_FRAME_RATE=30
2121
ENV KASM_VNC_THREADS=4
2222

23-
# Install Python and system dependencies for napari
23+
# Install dependencies for QuPath
2424
RUN apt-get update && apt-get install -y --no-install-recommends \
25-
python3.10 \
26-
python3.10-venv \
27-
python3-pip \
25+
wget \
26+
xz-utils \
2827
libgl1 \
28+
libgtk-3-0 \
29+
libopenslide0 \
2930
libglib2.0-0 \
30-
libfontconfig1 \
31-
libxcb-icccm4 \
32-
libxcb-image0 \
33-
libxcb-keysyms1 \
34-
libxcb-randr0 \
35-
libxcb-render-util0 \
36-
libxcb-shape0 \
37-
libxcb-xinerama0 \
38-
libxcb-xkb1 \
39-
libxkbcommon-x11-0 \
40-
libdbus-1-3 \
41-
libegl1 \
4231
&& apt-get clean \
4332
&& rm -rf /var/lib/apt/lists/*
4433

45-
# Install napari with PyQt5 backend
46-
RUN pip3 install --no-cache-dir "napari[all]" pyqt5
34+
# Install QuPath
35+
ARG QUPATH_VERSION="0.6.0"
36+
RUN wget -q https://github.com/qupath/qupath/releases/download/v${QUPATH_VERSION}/QuPath-v${QUPATH_VERSION}-Linux.tar.xz -O /tmp/qupath.tar.xz \
37+
&& mkdir -p /opt/qupath \
38+
&& tar -xf /tmp/qupath.tar.xz -C /opt/qupath --strip-components=1 \
39+
&& chmod +x /opt/qupath/bin/QuPath \
40+
&& rm /tmp/qupath.tar.xz
4741

4842
# Single-app mode: application launches directly, no desktop
49-
RUN echo "napari" > /defaults/autostart
43+
RUN echo "/opt/qupath/bin/QuPath" > /defaults/autostart
5044

5145
# ---------------------------------------------------------------
5246
# 3) Seqera Studios integration
@@ -62,8 +56,8 @@ COPY --from=connect /usr/bin/connect-client /usr/bin/connect-client
6256
# Install connect-client
6357
RUN /usr/bin/connect-client --install
6458

65-
# Seqera Studios entrypoint (connect-client handles fusion filesystem)
59+
# Seqera Studios entrypoint (connect-client handles Fusion filesystem)
6660
ENTRYPOINT ["/usr/bin/connect-client", "--entrypoint"]
6761

68-
# CMD bridges CONNECT_TOOL_PORT to KasmVNC's CUSTOM_PORT and launches the init
62+
# Bridge CONNECT_TOOL_PORT to KasmVNC's CUSTOM_PORT and launch the init system
6963
CMD ["/bin/bash", "-c", "export CUSTOM_PORT=${CONNECT_TOOL_PORT:-6901} && exec /init"]

.seqera/studio-config.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
schemaVersion: "0.0.1"
2+
kind: "studio-config"
3+
session:
4+
template:
5+
kind: "dockerfile"
6+
dockerfile: "Dockerfile"

README.md

Lines changed: 48 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -1,92 +1,70 @@
1-
# Custom Studios Examples
1+
# QuPath KasmVNC Studio Environment
22

3-
This repository contains example Dockerfiles and configurations for custom Seqera Studio applications. Each example demonstrates how to create and deploy different types of interactive applications in Seqera Studios.
3+
This branch contains the Seqera Studios configuration for running [QuPath](https://qupath.github.io/) with [KasmVNC](https://kasmweb.com/kasmvnc), making the QuPath desktop available through a browser in Seqera Platform.
44

5-
## Available Examples
5+
> This is a branch of the [custom-studios-examples](https://github.com/seqeralabs/custom-studios-examples) repository. Each branch contains a different custom Studio configuration. See the `master` branch for an overview of all available Studios.
66
7-
- [Marimo](marimo/README.md) - A reactive Python notebook environment
8-
- [CellxGene](cellxgene/README.md) - Interactive single-cell data visualization
9-
- [Streamlit](streamlit/README.md) - MultiQC visualization using Streamlit
10-
- [Shiny](shiny-simple-example/README.md) - Interactive data visualization with R Shiny
11-
- [TTYD](ttyd/README.md) - Interactive web-based terminal with bioinformatics tools
7+
## Quick Start
128

13-
## Prerequisites
9+
### Add from Git Repository
1410

15-
All examples in this repository require:
16-
- [Docker](https://www.docker.com/) installed
17-
- [Wave](https://docs.seqera.io/platform-cloud/wave/) configured in your Seqera Platform workspace
18-
- Access to a container registry (public or Amazon ECR) for pushing your images
11+
1. Navigate to **Studios** > **Add Studio** in your Seqera Platform workspace
12+
2. Select **Git repository** as the source
13+
3. Enter the repository URL: `https://github.com/seqeralabs/custom-studios-examples`
14+
4. Select branch: `kasmvnc-qupath`
15+
5. Select your compute environment
16+
6. Click **Add** then **Start**
1917

20-
## Common Features
18+
### Alternative: Use Pre-built Image
2119

22-
All examples in this repository:
23-
- Are compatible with both local Docker testing and Seqera Studios
24-
- Use the required Seqera base image and connect-client
25-
- Include detailed setup and usage instructions
26-
- Support data mounting via datalinks in Studios
27-
- Are built for linux/amd64 platform compatibility
28-
- Use multi-stage builds to include the connect-client
29-
- Follow consistent container best practices
20+
```
21+
ghcr.io/seqeralabs/custom-studios-examples/kasmvnc-qupath:latest
22+
```
3023

31-
## Deploying to Seqera Studios
24+
### Alternative: Build with Wave CLI
3225

33-
All examples follow the same deployment process:
26+
```bash
27+
wave -f .seqera/Dockerfile --context .seqera --platform linux/amd64 --await --tower-token "$TOWER_ACCESS_TOKEN"
28+
```
3429

35-
1. Select the **Studios** tab in your workspace
36-
2. Click **Add Studio**
37-
3. In the **General config** section:
38-
- Select **Prebuilt container image** as the container template
39-
- Enter your container image URI (e.g., `cr.seqera.io/scidev/your-example`)
40-
- Set a **Studio name** and optional **Description**
41-
4. Configure compute resources in the **Compute and Data** section:
42-
- Select your compute environment
43-
- Adjust CPU, GPU, and memory allocations as needed
44-
- Mount any required data using the **Mount data** option
45-
- Configure environment variables if the example supports them (see [Environment Variables](#environment-variables) section)
46-
5. Review the configuration in the **Summary** section
47-
6. Click **Add and start** to create and launch the Studio
30+
## Features
4831

49-
## Environment Variables
32+
- QuPath 0.6.0 bioimage analysis desktop
33+
- Browser access through LinuxServer.io KasmVNC
34+
- Single-app mode that launches QuPath directly
35+
- KasmVNC WebP, quality, frame-rate, and thread tuning for interactive use
36+
- Compatible with Seqera Studios custom environments and Data Link mounts
5037

51-
Some examples support environment variable configuration to customize data paths and application settings without modifying the container image. This makes those examples more flexible and reusable across different datasets and configurations.
38+
> **Note:** QuPath is x86_64 only. Build and run this Studio as `linux/amd64`.
5239
53-
### Examples with Environment Variables
40+
## Docker Image
5441

55-
Only the following examples support environment variable configuration:
56-
- **CellxGene**: `DATASET_FILE`, `DATASET_TITLE` - Configure dataset path and display title
57-
- **Shiny**: `DATA_PATH` - Configure data file path with automatic cloud storage path conversion
42+
The container image is available at:
5843

59-
### Examples without Environment Variables
44+
```
45+
ghcr.io/seqeralabs/custom-studios-examples/kasmvnc-qupath:latest
46+
```
6047

61-
These examples work with their default configurations and don't require environment variable setup:
62-
- **Marimo**: Interactive Python notebook environment
63-
- **Streamlit**: MultiQC visualization with web-based data loading interface
64-
- **TTYD**: Web-based terminal with pre-installed bioinformatics tools
48+
## Local Testing
6549

66-
### Using Environment Variables in Seqera Studios
50+
```bash
51+
cd .seqera
52+
docker build --platform=linux/amd64 --build-arg CONNECT_CLIENT_VERSION=0.9 -t kasmvnc-qupath .
53+
docker run --rm --platform linux/amd64 --shm-size=2g -p 6901:6901 --entrypoint /init kasmvnc-qupath
54+
```
6755

68-
When deploying to Seqera Studios, you can configure environment variables in the **Compute and Data** section:
69-
1. Expand the **Environment variables** section
70-
2. Add key-value pairs for the variables you want to customize
71-
3. The application will use these values instead of the defaults
56+
QuPath will be available at http://localhost:6901.
7257

73-
## Documentation
58+
## Configuration
7459

75-
- [Official documentation on building custom studio environments](https://docs.seqera.io/platform-cloud/studios/custom-envs#custom-containers)
76-
- Each example's README contains specific instructions for:
77-
- Building and testing locally
78-
- Required dependencies and configurations
79-
- Example-specific features and usage
80-
- Data format requirements
81-
- Customization options
60+
| Variable | Default | Description |
61+
|----------|---------|-------------|
62+
| `CONNECT_TOOL_PORT` | Set by platform | KasmVNC web port in Seqera Studios |
63+
| `CUSTOM_PORT` | `CONNECT_TOOL_PORT` or `6901` | KasmVNC web port used by the base image |
8264

83-
## Contributing
65+
## References
8466

85-
Feel free to contribute new examples or improvements to existing ones. Each example should:
86-
- Follow the established README structure
87-
- Include comprehensive documentation
88-
- Maintain consistency with common features
89-
- Provide clear prerequisites and deployment instructions
90-
- Include example data or clear data requirements
91-
92-
<!-- TODO Add a link to the blog post -->
67+
- [Seqera Studios: Custom Environments](https://docs.seqera.io/platform-cloud/studios/custom-envs)
68+
- [Seqera Studios: Add from Git Repository](https://docs.seqera.io/platform-cloud/studios/add-studio-git-repo)
69+
- [QuPath Documentation](https://qupath.readthedocs.io/)
70+
- [KasmVNC Documentation](https://kasmweb.com/kasmvnc)

kasmVNC/README.md

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,24 @@
1-
# KasmVNC Studio Environments
1+
# KasmVNC QuPath Studio Environment
22

3-
This folder contains custom container images for running GUI desktop applications in Seqera Studios using [KasmVNC](https://kasmweb.com/kasmvnc). All images are based on the [LinuxServer.io KasmVNC base image](https://docs.linuxserver.io/images/docker-baseimage-kasmvnc/) and run in single-app mode (no desktop environment).
3+
This folder contains the custom container image for running [QuPath](https://qupath.github.io/) in Seqera Studios using [KasmVNC](https://kasmweb.com/kasmvnc). The image is based on the [LinuxServer.io KasmVNC base image](https://docs.linuxserver.io/images/docker-baseimage-kasmvnc/) and runs in single-app mode (no desktop environment).
44

5-
## Available Applications
5+
## Available Application
66

77
| Application | Description | Platform |
88
|-------------|-------------|----------|
99
| [QuPath](./qupath/) | Bioimage analysis for pathology | x86_64 only |
10-
| [napari](./napari/) | Python-based multi-dimensional image viewer | x86_64, arm64 |
1110

1211
## Common Architecture
1312

14-
All KasmVNC images share the same architecture:
13+
The QuPath KasmVNC image uses this architecture:
1514

1615
```
1716
┌─────────────────────────────────────────────┐
1817
│ LinuxServer.io KasmVNC Base Image │
1918
│ (Ubuntu Jammy + KasmVNC server) │
2019
├─────────────────────────────────────────────┤
2120
│ Application Layer │
22-
│ (QuPath / napari)
21+
│ (QuPath)
2322
├─────────────────────────────────────────────┤
2423
│ Seqera Studios Integration │
2524
│ (connect-client + Fusion filesystem) │
@@ -42,16 +41,12 @@ ENV KASM_VNC_THREADS=4 # Match vCPU count
4241
- Use compute-optimized EC2 instances (c6i, c7i) for better responsiveness in Studios
4342
- Deploy in regions close to users to minimize latency
4443

45-
## Building Images
44+
## Building Image
4645

47-
All images require the `CONNECT_CLIENT_VERSION` build argument:
46+
The image requires the `CONNECT_CLIENT_VERSION` build argument:
4847

4948
```bash
50-
# QuPath
5149
cd qupath && docker build --platform=linux/amd64 --build-arg CONNECT_CLIENT_VERSION=0.9 -t kasmvnc-qupath .
52-
53-
# napari
54-
cd napari && docker build --platform=linux/amd64 --build-arg CONNECT_CLIENT_VERSION=0.9 -t kasmvnc-napari .
5550
```
5651

5752
## Local Testing

0 commit comments

Comments
 (0)