Skip to content

Commit f08a90f

Browse files
authored
Merge pull request #10 from seqeralabs/feature/require-connect-client-version
feat: require CONNECT_CLIENT_VERSION build arg
2 parents 646e391 + 9062440 commit f08a90f

File tree

11 files changed

+84
-25
lines changed

11 files changed

+84
-25
lines changed

.github/workflows/docker.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,18 @@ on:
99
description: 'Tag to use for the images (e.g., v1.0.0)'
1010
required: true
1111
type: string
12+
connect_client_version:
13+
description: 'Version of connect-client to use (e.g., 0.8)'
14+
required: true
15+
type: string
16+
default: '0.8'
1217

1318
env:
1419
REGISTRY: ghcr.io
1520
# Use release tag for releases, or input tag for manual runs
1621
IMAGE_TAG: ${{ github.event_name == 'release' && github.event.release.tag_name || inputs.tag }}
22+
# Use provided connect-client version or default to 0.8
23+
CONNECT_CLIENT_VERSION: ${{ inputs.connect_client_version || '0.8' }}
1724

1825
jobs:
1926
build-and-push:
@@ -52,6 +59,8 @@ jobs:
5259
with:
5360
context: ${{ matrix.container.path }}
5461
push: true
62+
build-args: |
63+
CONNECT_CLIENT_VERSION=${{ env.CONNECT_CLIENT_VERSION }}
5564
tags: |
5665
${{ env.REGISTRY }}/${{ github.repository }}/${{ matrix.container.name }}:${{ env.IMAGE_TAG }}
5766
${{ env.REGISTRY }}/${{ github.repository }}/${{ matrix.container.name }}:latest

cellxgene/Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
# ---------------------------------------------------------------
22
# 1) Multi-stage build: Pull the connect-client binary
33
# ---------------------------------------------------------------
4-
FROM public.cr.seqera.io/platform/connect-client:0.8 AS connect
4+
ARG CONNECT_CLIENT_VERSION
5+
FROM public.cr.seqera.io/platform/connect-client:${CONNECT_CLIENT_VERSION} AS connect
56

67
# ---------------------------------------------------------------
78
# 2) Additional base image for CellxGene

cellxgene/README.md

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ This example provides a custom container image for running [CellxGene](https://c
88
- [Features](#features)
99
- [Files](#files)
1010
- [Prerequisites](#prerequisites)
11+
- [Building the Container](#building-the-container)
1112
- [Local Testing](#local-testing)
1213
- [Using in Seqera Studios](#using-in-seqera-studios)
1314
- [Notes](#notes)
@@ -51,12 +52,22 @@ For specific versions, use the release tag (e.g., `ghcr.io/seqeralabs/custom-stu
5152
Additional requirements specific to this example:
5253
- .h5ad format single-cell datasets
5354

55+
## Building the Container
56+
57+
> [!IMPORTANT]
58+
> You must provide the `CONNECT_CLIENT_VERSION` build argument when building the container.
59+
60+
To build the container locally:
61+
62+
```bash
63+
docker build --platform=linux/amd64 --build-arg CONNECT_CLIENT_VERSION=0.8 -t cellxgene-example .
64+
```
65+
5466
## Local Testing
5567

56-
To test the app locally:
68+
To test the app locally, you need to override the entrypoint:
5769

5870
```bash
59-
docker build --platform=linux/amd64 -t cellxgene-example .
6071
docker run -p 3000:3000 --entrypoint /usr/local/bin/cellxgene cellxgene-example launch \
6172
--host 0.0.0.0 \
6273
--port 3000 \
@@ -66,8 +77,7 @@ docker run -p 3000:3000 --entrypoint /usr/local/bin/cellxgene cellxgene-example
6677
/path/to/your/dataset.h5ad
6778
```
6879

69-
To use a specific data file, make it available at /workspace/data/cellxgene_datasets/ in the
70-
container:
80+
To use a specific data file, make it available at /workspace/data/cellxgene_datasets/ in the container:
7181

7282
```bash
7383
docker run -p 3000:3000 --entrypoint /usr/local/bin/cellxgene -v $(pwd)/data:/workspace/data/cellxgene_datasets cellxgene-example launch \

marimo/Dockerfile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
FROM public.cr.seqera.io/platform/connect-client:0.7 AS connect
1+
# ---------------------------------------------------------------
2+
# 1) Multi-stage build: Pull the connect-client binary
3+
# ---------------------------------------------------------------
4+
ARG CONNECT_CLIENT_VERSION
5+
FROM public.cr.seqera.io/platform/connect-client:${CONNECT_CLIENT_VERSION} AS connect
26

37
# Choose a python version that you know works with your application
48
FROM python:3.11-slim

marimo/README.md

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -44,16 +44,13 @@ This container is designed for use as a [custom Studio environment](https://docs
4444

4545
## Building the Container
4646

47-
To build the container locally:
47+
> [!IMPORTANT]
48+
> You must provide the `CONNECT_CLIENT_VERSION` build argument when building the container.
4849
49-
```sh
50-
wave -f Dockerfile --await
51-
```
52-
53-
Or, using Docker directly:
50+
To build the container locally:
5451

5552
```sh
56-
docker build -t marimo-studio .
53+
docker build --platform=linux/amd64 --build-arg CONNECT_CLIENT_VERSION=0.8 -t marimo-studio .
5754
```
5855

5956
> [!NOTE]

shiny-simple-example/Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
# ---------------------------------------------------------------
22
# 1) Multi-stage build: Pull the connect-client binary
33
# ---------------------------------------------------------------
4-
FROM public.cr.seqera.io/platform/connect-client:0.8 AS connect
4+
ARG CONNECT_CLIENT_VERSION
5+
FROM public.cr.seqera.io/platform/connect-client:${CONNECT_CLIENT_VERSION} AS connect
56

67
# ---------------------------------------------------------------
78
# 2) Final stage: Ubuntu + micromamba + r-shiny

shiny-simple-example/README.md

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ This example provides a custom container image for running a [R Shiny](https://s
88
- [Features](#features)
99
- [Files](#files)
1010
- [Prerequisites](#prerequisites)
11+
- [Building the Container](#building-the-container)
1112
- [Local Testing](#local-testing)
1213
- [Using in Seqera Studios](#using-in-seqera-studios)
1314
- [Notes](#notes)
@@ -50,12 +51,22 @@ For specific versions, use the release tag (e.g., `ghcr.io/seqeralabs/custom-stu
5051
- Access to a container registry (public or Amazon ECR) if you wish to push your image
5152
- R data files in CSV format
5253

54+
## Building the Container
55+
56+
> [!IMPORTANT]
57+
> You must provide the `CONNECT_CLIENT_VERSION` build argument when building the container.
58+
59+
To build the container locally:
60+
61+
```bash
62+
docker build --platform=linux/amd64 --build-arg CONNECT_CLIENT_VERSION=0.8 -t shiny-simple-example .
63+
```
64+
5365
## Local Testing
5466

55-
To test the app locally:
67+
To test the app locally, you need to override the entrypoint:
5668

5769
```bash
58-
docker build --platform=linux/amd64 -t shiny-simple-example .
5970
docker run -p 3000:3000 --entrypoint micromamba shiny-simple-example run -n shiny R -e "shiny::runApp('/app/app_plot_demo.R', host='0.0.0.0', port=3000)"
6071
```
6172

@@ -90,4 +101,4 @@ Additional steps specific to this example:
90101
- [Seqera Studios: Custom Environments](https://docs.seqera.io/platform-cloud/studios/custom-envs)
91102
- [R Shiny Documentation](https://shiny.rstudio.com/)
92103
- [Micromamba Documentation](https://mamba.readthedocs.io/)
93-
- [Wave Documentation](https://docs.seqera.io/platform-cloud/wave/)
104+
- [Wave Documentation](https://docs.seqera.io/platform-cloud/wave/)

streamlit/Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
# ---------------------------------------------------------------
22
# 1) Multi-stage build: Pull the connect-client binary
33
# ---------------------------------------------------------------
4-
FROM public.cr.seqera.io/platform/connect-client:0.8 AS connect
4+
ARG CONNECT_CLIENT_VERSION
5+
FROM public.cr.seqera.io/platform/connect-client:${CONNECT_CLIENT_VERSION} AS connect
56

67
# ---------------------------------------------------------------
78
# 2) Additional base image for Streamlit

streamlit/README.md

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ This example provides a custom container image for running a [Streamlit](https:/
88
- [Features](#features)
99
- [Files](#files)
1010
- [Prerequisites](#prerequisites)
11+
- [Building the Container](#building-the-container)
1112
- [Local Testing](#local-testing)
1213
- [Using in Seqera Studios](#using-in-seqera-studios)
1314
- [Notes](#notes)
@@ -47,12 +48,22 @@ For specific versions, use the release tag (e.g., `ghcr.io/seqeralabs/custom-stu
4748
- Access to a container registry (public or Amazon ECR) if you wish to push your image
4849
- MultiQC data files for visualization
4950

51+
## Building the Container
52+
53+
> [!IMPORTANT]
54+
> You must provide the `CONNECT_CLIENT_VERSION` build argument when building the container.
55+
56+
To build the container locally:
57+
58+
```bash
59+
docker build --platform=linux/amd64 --build-arg CONNECT_CLIENT_VERSION=0.8 -t streamlit-example .
60+
```
61+
5062
## Local Testing
5163

52-
To test the app locally:
64+
To test the app locally, you need to override the entrypoint:
5365

5466
```bash
55-
docker build --platform=linux/amd64 -t streamlit-example .
5667
docker run -p 3000:3000 --entrypoint streamlit streamlit-example run /app/multiqc_app.py \
5768
--server.port=3000 \
5869
--server.address=0.0.0.0 \

ttyd/Dockerfile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
1-
# Stage 1: Get the Seqera Connect client
2-
FROM public.cr.seqera.io/platform/connect-client:0.8 AS connect
1+
# ---------------------------------------------------------------
2+
# 1) Multi-stage build: Pull the connect-client binary
3+
# ---------------------------------------------------------------
4+
ARG CONNECT_CLIENT_VERSION
5+
FROM public.cr.seqera.io/platform/connect-client:${CONNECT_CLIENT_VERSION} AS connect
36

47
# Final image: Start from an arbitrary container
58
FROM community.wave.seqera.io/library/samtools:1.21--0d76da7c3cf7751c

0 commit comments

Comments
 (0)