A reactive notebook for Python — run reproducible experiments, query with SQL, execute as a script, deploy as an app, and version with git. Stored as pure Python. All in a modern, AI-native editor.
Python artificial-intelligencedagdata-sciencedata-visualizationdataflowdeveloper-toolsmachine-learningnotebookspipelinepythonreactivesqlweb-app
ci: split out docker ci to be manually run (#7740)
Myles Scolnick20bd3ac95378
diff --git a/.github/workflows/publish-docker.yml b/.github/workflows/publish-docker.ymlnew file mode 100644index 0000000000..1023d30556--- /dev/null+++ b/.github/workflows/publish-docker.yml@@ -0,0 +1,153 @@+name: Publish Docker images++on:+ workflow_call:+ inputs:+ marimo_version:+ description: 'marimo version to publish'+ required: true+ type: string+ workflow_dispatch:+ inputs:+ marimo_version:+ description: 'marimo version to publish'+ required: true+ type: string++permissions:+ contents: read+ packages: write++env:+ REGISTRY: ghcr.io+ IMAGE_NAME: marimo-team/marimo++jobs:+ publish_docker:+ name: 🐋 Publish Docker images+ runs-on: ubuntu-latest+ # Don't error while this is in BETA+ continue-on-error: true++ steps:+ - name: ⬇️ Checkout repo+ uses: actions/checkout@v4++ - name: ⏳ Wait for PyPI package availability+ run: |+ VERSION="${{ inputs.marimo_version }}"+ echo "Waiting for marimo version $VERSION to be available on PyPI..."++ MAX_ATTEMPTS=30+ ATTEMPT=0+ SLEEP_TIME=10++ while [ $ATTEMPT -lt $MAX_ATTEMPTS ]; do+ ATTEMPT=$((ATTEMPT + 1))+ echo "Attempt $ATTEMPT/$MAX_ATTEMPTS: Checking PyPI for version $VERSION..."++ # Check if the version exists on PyPI+ HTTP_CODE=$(curl -s -o /dev/null -w "%{http_code}" "https://pypi.org/pypi/marimo/$VERSION/json")++ if [ "$HTTP_CODE" = "200" ]; then+ echo "✅ Version $VERSION is available on PyPI!"+ exit 0+ else+ echo "Version $VERSION not yet available (HTTP $HTTP_CODE). Waiting ${SLEEP_TIME}s..."+ sleep $SLEEP_TIME+ fi+ done++ echo "❌ Timed out waiting for version $VERSION on PyPI after $((MAX_ATTEMPTS * SLEEP_TIME)) seconds"+ exit 1++ - name: 🐋 Log in to the Container registry+ uses: docker/login-action@v3+ with:+ registry: ${{ env.REGISTRY }}+ username: ${{ github.actor }}+ password: ${{ secrets.GITHUB_TOKEN }}++ - name: 🐋 Extract metadata (tags, labels) for Docker+ id: meta+ uses: docker/metadata-action@v5+ with:+ images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}++ - name: 🐋 Set up Docker Buildx+ uses: docker/setup-buildx-action@v3++ - name: 🧪 Build docker image for testing+ uses: docker/build-push-action@v6+ with:+ context: .+ file: ./docker/Dockerfile+ # Don't push test image+ push: false+ load: true+ tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:test+ target: slim+ build-args: |+ marimo_version=${{ inputs.marimo_version }}+ labels: ${{ steps.meta.outputs.labels }}+ cache-from: type=gha+ cache-to: type=gha,mode=max++ - name: 🧪 Test docker build+ run: |+ docker run -d -e PORT=9090 -p 9090:9090 --name test_container ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:test+ sleep 2+ curl -f http://localhost:9090/health || (docker logs test_container && exit 1)+ docker stop test_container+ docker rm test_container++ - name: 📦 Build and push Docker images (slim)+ uses: docker/build-push-action@v6+ with:+ context: .+ file: ./docker/Dockerfile+ push: true+ tags: |+ ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ inputs.marimo_version }}+ ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest+ target: slim+ platforms: linux/amd64,linux/arm64+ build-args: |+ marimo_version=${{ inputs.marimo_version }}+ labels: ${{ steps.meta.outputs.labels }}+ cache-from: type=gha+ cache-to: type=gha,mode=max++ - name: 📦 Build and push Docker images (data)+ uses: docker/build-push-action@v6+ with:+ context: .+ file: ./docker/Dockerfile+ push: true+ tags: |+ ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ inputs.marimo_version }}-data+ ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest-data+ target: data+ platforms: linux/amd64,linux/arm64+ build-args: |+ marimo_version=${{ inputs.marimo_version }}+ labels: ${{ steps.meta.outputs.labels }}+ cache-from: type=gha+ cache-to: type=gha,mode=max++ - name: 📦 Build and push Docker images (sql)+ uses: docker/build-push-action@v6+ with:+ context: .+ file: ./docker/Dockerfile+ push: true+ tags: |+ ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ inputs.marimo_version }}-sql+ ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest-sql+ target: sql+ platforms: linux/amd64,linux/arm64+ build-args: |+ marimo_version=${{ inputs.marimo_version }}+ labels: ${{ steps.meta.outputs.labels }}+ cache-from: type=gha+ cache-to: type=gha,mode=maxdiff --git a/.github/workflows/release-prod.yml b/.github/workflows/release-prod.ymlindex 5c0cefe867..cacb9205b6 100644--- a/.github/workflows/release-prod.yml+++ b/.github/workflows/release-prod.yml@@ -108,133 +108,10 @@ jobs:publish_docker:name: 🐋 Publish Docker images- runs-on: ubuntu-latest- needs: [publish_release]- # Don't error while this is in BETA- continue-on-error: true+ needs: publish_release+ uses: ./.github/workflows/publish-docker.yml+ with:+ marimo_version: ${{ needs.publish_release.outputs.marimo_version }}permissions:contents: readpackages: write-- steps:- - name: ⬇️ Checkout repo- uses: actions/checkout@v4-- - name: ⏳ Wait for PyPI package availability- run: |- VERSION="${{ needs.publish_release.outputs.marimo_version }}"- echo "Waiting for marimo version $VERSION to be available on PyPI..."-- MAX_ATTEMPTS=30- ATTEMPT=0- SLEEP_TIME=10-- while [ $ATTEMPT -lt $MAX_ATTEMPTS ]; do- ATTEMPT=$((ATTEMPT + 1))- echo "Attempt $ATTEMPT/$MAX_ATTEMPTS: Checking PyPI for version $VERSION..."-- # Check if the version exists on PyPI- HTTP_CODE=$(curl -s -o /dev/null -w "%{http_code}" "https://pypi.org/pypi/marimo/$VERSION/json")-- if [ "$HTTP_CODE" = "200" ]; then- echo "✅ Version $VERSION is available on PyPI!"- exit 0- else- echo "Version $VERSION not yet available (HTTP $HTTP_CODE). Waiting ${SLEEP_TIME}s..."- sleep $SLEEP_TIME- fi- done-- echo "❌ Timed out waiting for version $VERSION on PyPI after $((MAX_ATTEMPTS * SLEEP_TIME)) seconds"- exit 1-- - name: 🐋 Log in to the Container registry- uses: docker/login-action@v3- with:- registry: ${{ env.REGISTRY }}- username: ${{ github.actor }}- password: ${{ secrets.GITHUB_TOKEN }}-- - name: 🐋 Extract metadata (tags, labels) for Docker- id: meta- uses: docker/metadata-action@v5- with:- images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-- - name: 🐋 Set up Docker Buildx- uses: docker/setup-buildx-action@v3-- - name: 🧪 Build docker image for testing- uses: docker/build-push-action@v6- with:- context: .- file: ./docker/Dockerfile- # Don't push test image- push: false- load: true- tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:test- target: slim- build-args: |- marimo_version=${{ needs.publish_release.outputs.marimo_version }}- labels: ${{ steps.meta.outputs.labels }}- cache-from: type=gha- cache-to: type=gha,mode=max-- - name: 🧪 Test docker build- run: |- docker run -d -e PORT=9090 -p 9090:9090 --name test_container ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:test- sleep 2- curl -f http://localhost:9090/health || (docker logs test_container && exit 1)- docker stop test_container- docker rm test_container-- - name: 📦 Build and push Docker images (slim)- uses: docker/build-push-action@v6- with:- context: .- file: ./docker/Dockerfile- push: true- tags: |- ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ needs.publish_release.outputs.marimo_version }}- ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest- target: slim- platforms: linux/amd64,linux/arm64- build-args: |- marimo_version=${{ needs.publish_release.outputs.marimo_version }}- labels: ${{ steps.meta.outputs.labels }}- cache-from: type=gha- cache-to: type=gha,mode=max-- - name: 📦 Build and push Docker images (data)- uses: docker/build-push-action@v6- with:- context: .- file: ./docker/Dockerfile- push: true- tags: |- ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ needs.publish_release.outputs.marimo_version }}-data- ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest-data- target: data- platforms: linux/amd64,linux/arm64- build-args: |- marimo_version=${{ needs.publish_release.outputs.marimo_version }}- labels: ${{ steps.meta.outputs.labels }}- cache-from: type=gha- cache-to: type=gha,mode=max-- - name: 📦 Build and push Docker images (sql)- uses: docker/build-push-action@v6- with:- context: .- file: ./docker/Dockerfile- push: true- tags: |- ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ needs.publish_release.outputs.marimo_version }}-sql- ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest-sql- target: sql- platforms: linux/amd64,linux/arm64- build-args: |- marimo_version=${{ needs.publish_release.outputs.marimo_version }}- labels: ${{ steps.meta.outputs.labels }}- cache-from: type=gha- cache-to: type=gha,mode=max