Scale computer-use 2.0 with open-source drivers, cross-OS sandboxes, and benchmarks for training, evaluation, and data generation.
Rust agentai-agentapplecomputer-usecomputer-use-agentcontainerizationcuadesktop-automationhacktoberfestlumemacosmanusoperatorswiftvirtualizationvirtualization-frameworkwindowswindows-sandbox
Add xfce gh action, simplify folder name
f-trycuaea5c4a1cdcdd
diff --git a/.github/workflows/docker-publish-kasm.yml b/.github/workflows/docker-publish-kasm.ymlindex 882d6869b1..d97dbf6fa4 100644--- a/.github/workflows/docker-publish-kasm.yml+++ b/.github/workflows/docker-publish-kasm.yml@@ -9,141 +9,21 @@ on:paths:- "libs/kasm/**"- ".github/workflows/docker-publish-kasm.yml"+ - ".github/workflows/docker-reusable-publish.yml"pull_request:paths:- "libs/kasm/**"- ".github/workflows/docker-publish-kasm.yml"---env:- IMAGE_NAME: cua-ubuntu- DOCKER_HUB_ORG: trycua+ - ".github/workflows/docker-reusable-publish.yml"jobs:- build-and-push:- runs-on: ubuntu-latest- strategy:- fail-fast: false- matrix:- platform:- - linux/amd64- - linux/arm64- # todo unsupported base image- # - windows/amd64- # - darwin/amd64- # - darwin/arm64- steps:- - name: Checkout repository- uses: actions/checkout@v4-- - name: Prepare platform tag- id: platform- run: |- # Convert platform (e.g., linux/amd64) to a valid tag suffix (e.g., linux-amd64)- PLATFORM_TAG=$(echo "${{ matrix.platform }}" | sed 's/\//-/g')- echo "tag=${PLATFORM_TAG}" >> $GITHUB_OUTPUT-- - name: Set up Docker Buildx- uses: docker/setup-buildx-action@v3-- - name: Log in to Docker Hub- uses: docker/login-action@v3- with:- username: trycua- password: ${{ secrets.DOCKER_HUB_TOKEN }}-- - name: Extract metadata (PR)- if: github.event_name == 'pull_request'- id: meta-pr- uses: docker/metadata-action@v5- with:- images: ${{ env.DOCKER_HUB_ORG }}/${{ env.IMAGE_NAME }}- tags: |- type=raw,value=${{ github.sha }}-- - name: Extract metadata (main branch)- if: github.event_name != 'pull_request' && github.ref == 'refs/heads/main'- id: meta-main- uses: docker/metadata-action@v5- with:- images: ${{ env.DOCKER_HUB_ORG }}/${{ env.IMAGE_NAME }}- tags: |- type=raw,value=latest-- - name: Extract metadata (semantic version tag)- if: startsWith(github.ref, 'refs/tags/docker-kasm-v')- id: meta-semver- uses: docker/metadata-action@v5- with:- images: ${{ env.DOCKER_HUB_ORG }}/${{ env.IMAGE_NAME }}- tags: |- type=semver,pattern={{version}},prefix=docker-kasm-v- type=semver,pattern={{major}}.{{minor}},prefix=docker-kasm-v- type=semver,pattern={{major}},prefix=docker-kasm-v- type=raw,value=latest-- - name: Build and push Docker image (PR)- if: github.event_name == 'pull_request'- uses: docker/build-push-action@v5- with:- context: ./libs/kasm- file: ./libs/kasm/Dockerfile- push: true- tags: ${{ steps.meta-pr.outputs.tags }}- labels: ${{ steps.meta-pr.outputs.labels }}- platforms: ${{ matrix.platform }}- cache-from: |- type=registry,ref=${{ env.DOCKER_HUB_ORG }}/${{ env.IMAGE_NAME }}:buildcache-${{ steps.platform.outputs.tag }}- type=registry,ref=${{ env.DOCKER_HUB_ORG }}/${{ env.IMAGE_NAME }}:latest- cache-to: type=registry,ref=${{ env.DOCKER_HUB_ORG }}/${{ env.IMAGE_NAME }}:buildcache-${{ steps.platform.outputs.tag }},mode=max-- - name: Build and push Docker image (main branch)- if: github.event_name != 'pull_request' && github.ref == 'refs/heads/main'- uses: docker/build-push-action@v5- with:- context: ./libs/kasm- file: ./libs/kasm/Dockerfile- push: true- tags: ${{ steps.meta-main.outputs.tags }}- labels: ${{ steps.meta-main.outputs.labels }}- platforms: ${{ matrix.platform }}- cache-from: |- type=registry,ref=${{ env.DOCKER_HUB_ORG }}/${{ env.IMAGE_NAME }}:buildcache-${{ steps.platform.outputs.tag }}- type=registry,ref=${{ env.DOCKER_HUB_ORG }}/${{ env.IMAGE_NAME }}:latest- cache-to: type=registry,ref=${{ env.DOCKER_HUB_ORG }}/${{ env.IMAGE_NAME }}:buildcache-${{ steps.platform.outputs.tag }},mode=max-- - name: Build and push Docker image (semantic version tag)- if: startsWith(github.ref, 'refs/tags/docker-kasm-v')- uses: docker/build-push-action@v5- with:- context: ./libs/kasm- file: ./libs/kasm/Dockerfile- push: true- tags: ${{ steps.meta-semver.outputs.tags }}- labels: ${{ steps.meta-semver.outputs.labels }}- platforms: ${{ matrix.platform }}- cache-from: |- type=registry,ref=${{ env.DOCKER_HUB_ORG }}/${{ env.IMAGE_NAME }}:buildcache-${{ steps.platform.outputs.tag }}- type=registry,ref=${{ env.DOCKER_HUB_ORG }}/${{ env.IMAGE_NAME }}:latest- cache-to: type=registry,ref=${{ env.DOCKER_HUB_ORG }}/${{ env.IMAGE_NAME }}:buildcache-${{ steps.platform.outputs.tag }},mode=max-- - name: Image digest- if: github.event_name == 'pull_request' || github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/docker-kasm-v')- run: |- if [ "${{ github.event_name }}" == "pull_request" ]; then- echo "Image pushed with digest ${{ steps.meta-pr.outputs.digest }}"- elif [[ "${{ github.ref }}" == refs/tags/docker-kasm-v* ]]; then- echo "Image pushed with digest ${{ steps.meta-semver.outputs.digest }}"- else- echo "Image pushed with digest ${{ steps.meta-main.outputs.digest }}"- fi-- - name: print image tags- run: |- if [ "${{ github.event_name }}" == "pull_request" ]; then- echo "Image tags: ${{ steps.meta-pr.outputs.tags }}"- elif [[ "${{ github.ref }}" == refs/tags/docker-kasm-v* ]]; then- echo "Image tags: ${{ steps.meta-semver.outputs.tags }}"- else- echo "Image tags: ${{ steps.meta-main.outputs.tags }}"- fi+ publish:+ uses: ./.github/workflows/docker-reusable-publish.yml+ with:+ image_name: cua-ubuntu+ context_dir: libs/kasm+ dockerfile_path: Dockerfile+ tag_prefix: docker-kasm-v+ docker_hub_org: trycua+ secrets:+ DOCKER_HUB_TOKEN: ${{ secrets.DOCKER_HUB_TOKEN }}diff --git a/.github/workflows/docker-publish-xfce.yml b/.github/workflows/docker-publish-xfce.ymlnew file mode 100644index 0000000000..fa64849e5a--- /dev/null+++ b/.github/workflows/docker-publish-xfce.yml@@ -0,0 +1,29 @@+name: Build and Publish CUA XFCE Container++on:+ push:+ branches:+ - main+ tags:+ - "docker-xfce-v*.*.*"+ paths:+ - "libs/xfce/**"+ - ".github/workflows/docker-publish-xfce.yml"+ - ".github/workflows/docker-reusable-publish.yml"+ pull_request:+ paths:+ - "libs/xfce/**"+ - ".github/workflows/docker-publish-xfce.yml"+ - ".github/workflows/docker-reusable-publish.yml"++jobs:+ publish:+ uses: ./.github/workflows/docker-reusable-publish.yml+ with:+ image_name: cua-xfce+ context_dir: libs/xfce+ dockerfile_path: Dockerfile+ tag_prefix: docker-xfce-v+ docker_hub_org: trycua+ secrets:+ DOCKER_HUB_TOKEN: ${{ secrets.DOCKER_HUB_TOKEN }}diff --git a/.github/workflows/docker-reusable-publish.yml b/.github/workflows/docker-reusable-publish.ymlnew file mode 100644index 0000000000..3472883f2d--- /dev/null+++ b/.github/workflows/docker-reusable-publish.yml@@ -0,0 +1,155 @@+name: Reusable Docker Publish Workflow++on:+ workflow_call:+ inputs:+ image_name:+ description: "Name of the Docker image (e.g. cua-ubuntu, cua-xfce)"+ required: true+ type: string+ context_dir:+ description: "Directory containing the Dockerfile relative to workspace root (e.g. libs/kasm, libs/xfce)"+ required: true+ type: string+ dockerfile_path:+ description: "Path to Dockerfile relative to context_dir (e.g. Dockerfile)"+ required: false+ type: string+ default: "Dockerfile"+ tag_prefix:+ description: "Prefix for semantic version tags (e.g. docker-kasm-v, docker-xfce-v)"+ required: true+ type: string+ docker_hub_org:+ description: "Docker Hub organization name"+ required: false+ type: string+ default: "trycua"+ secrets:+ DOCKER_HUB_TOKEN:+ required: true++jobs:+ build-and-push:+ runs-on: ubuntu-latest+ strategy:+ fail-fast: false+ matrix:+ platform:+ - linux/amd64+ - linux/arm64+ steps:+ - name: Checkout repository+ uses: actions/checkout@v4++ - name: Prepare platform tag+ id: platform+ run: |+ # Convert platform (e.g., linux/amd64) to a valid tag suffix (e.g., linux-amd64)+ PLATFORM_TAG=$(echo "${{ matrix.platform }}" | sed 's/\//-/g')+ echo "tag=${PLATFORM_TAG}" >> $GITHUB_OUTPUT++ - name: Set up Docker Buildx+ uses: docker/setup-buildx-action@v3++ - name: Log in to Docker Hub+ uses: docker/login-action@v3+ with:+ username: ${{ inputs.docker_hub_org }}+ password: ${{ secrets.DOCKER_HUB_TOKEN }}++ - name: Extract metadata (PR)+ if: github.event_name == 'pull_request'+ id: meta-pr+ uses: docker/metadata-action@v5+ with:+ images: ${{ inputs.docker_hub_org }}/${{ inputs.image_name }}+ tags: |+ type=raw,value=${{ github.sha }}++ - name: Extract metadata (main branch)+ if: github.event_name != 'pull_request' && github.ref == 'refs/heads/main'+ id: meta-main+ uses: docker/metadata-action@v5+ with:+ images: ${{ inputs.docker_hub_org }}/${{ inputs.image_name }}+ tags: |+ type=raw,value=latest++ - name: Extract metadata (semantic version tag)+ if: startsWith(github.ref, format('refs/tags/{0}', inputs.tag_prefix))+ id: meta-semver+ uses: docker/metadata-action@v5+ with:+ images: ${{ inputs.docker_hub_org }}/${{ inputs.image_name }}+ tags: |+ type=semver,pattern={{version}},prefix=${{ inputs.tag_prefix }}+ type=semver,pattern={{major}}.{{minor}},prefix=${{ inputs.tag_prefix }}+ type=semver,pattern={{major}},prefix=${{ inputs.tag_prefix }}+ type=raw,value=latest++ - name: Build and push Docker image (PR)+ if: github.event_name == 'pull_request'+ uses: docker/build-push-action@v5+ with:+ context: ./${{ inputs.context_dir }}+ file: ./${{ inputs.context_dir }}/${{ inputs.dockerfile_path }}+ push: true+ tags: ${{ steps.meta-pr.outputs.tags }}+ labels: ${{ steps.meta-pr.outputs.labels }}+ platforms: ${{ matrix.platform }}+ cache-from: |+ type=registry,ref=${{ inputs.docker_hub_org }}/${{ inputs.image_name }}:buildcache-${{ steps.platform.outputs.tag }}+ type=registry,ref=${{ inputs.docker_hub_org }}/${{ inputs.image_name }}:latest+ cache-to: type=registry,ref=${{ inputs.docker_hub_org }}/${{ inputs.image_name }}:buildcache-${{ steps.platform.outputs.tag }},mode=max++ - name: Build and push Docker image (main branch)+ if: github.event_name != 'pull_request' && github.ref == 'refs/heads/main'+ uses: docker/build-push-action@v5+ with:+ context: ./${{ inputs.context_dir }}+ file: ./${{ inputs.context_dir }}/${{ inputs.dockerfile_path }}+ push: true+ tags: ${{ steps.meta-main.outputs.tags }}+ labels: ${{ steps.meta-main.outputs.labels }}+ platforms: ${{ matrix.platform }}+ cache-from: |+ type=registry,ref=${{ inputs.docker_hub_org }}/${{ inputs.image_name }}:buildcache-${{ steps.platform.outputs.tag }}+ type=registry,ref=${{ inputs.docker_hub_org }}/${{ inputs.image_name }}:latest+ cache-to: type=registry,ref=${{ inputs.docker_hub_org }}/${{ inputs.image_name }}:buildcache-${{ steps.platform.outputs.tag }},mode=max++ - name: Build and push Docker image (semantic version tag)+ if: startsWith(github.ref, format('refs/tags/{0}', inputs.tag_prefix))+ uses: docker/build-push-action@v5+ with:+ context: ./${{ inputs.context_dir }}+ file: ./${{ inputs.context_dir }}/${{ inputs.dockerfile_path }}+ push: true+ tags: ${{ steps.meta-semver.outputs.tags }}+ labels: ${{ steps.meta-semver.outputs.labels }}+ platforms: ${{ matrix.platform }}+ cache-from: |+ type=registry,ref=${{ inputs.docker_hub_org }}/${{ inputs.image_name }}:buildcache-${{ steps.platform.outputs.tag }}+ type=registry,ref=${{ inputs.docker_hub_org }}/${{ inputs.image_name }}:latest+ cache-to: type=registry,ref=${{ inputs.docker_hub_org }}/${{ inputs.image_name }}:buildcache-${{ steps.platform.outputs.tag }},mode=max++ - name: Image digest+ if: github.event_name == 'pull_request' || github.ref == 'refs/heads/main' || startsWith(github.ref, format('refs/tags/{0}', inputs.tag_prefix))+ run: |+ if [ "${{ github.event_name }}" == "pull_request" ]; then+ echo "Image pushed with digest ${{ steps.meta-pr.outputs.digest }}"+ elif [[ "${{ github.ref }}" == refs/tags/${{ inputs.tag_prefix }}* ]]; then+ echo "Image pushed with digest ${{ steps.meta-semver.outputs.digest }}"+ else+ echo "Image pushed with digest ${{ steps.meta-main.outputs.digest }}"+ fi++ - name: print image tags+ run: |+ if [ "${{ github.event_name }}" == "pull_request" ]; then+ echo "Image tags: ${{ steps.meta-pr.outputs.tags }}"+ elif [[ "${{ github.ref }}" == refs/tags/${{ inputs.tag_prefix }}* ]]; then+ echo "Image tags: ${{ steps.meta-semver.outputs.tags }}"+ else+ echo "Image tags: ${{ steps.meta-main.outputs.tags }}"+ fidiff --git a/libs/docker-xfce/.dockerignore b/libs/xfce/.dockerignoresimilarity index 100%rename from libs/docker-xfce/.dockerignorerename to libs/xfce/.dockerignorediff --git a/libs/docker-xfce/.gitignore b/libs/xfce/.gitignoresimilarity index 100%rename from libs/docker-xfce/.gitignorerename to libs/xfce/.gitignorediff --git a/libs/docker-xfce/Dockerfile b/libs/xfce/Dockerfilesimilarity index 100%rename from libs/docker-xfce/Dockerfilerename to libs/xfce/Dockerfilediff --git a/libs/docker-xfce/README.md b/libs/xfce/README.mdsimilarity index 100%rename from libs/docker-xfce/README.mdrename to libs/xfce/README.mddiff --git a/libs/docker-xfce/src/scripts/resize-display.sh b/libs/xfce/src/scripts/resize-display.shsimilarity index 100%rename from libs/docker-xfce/src/scripts/resize-display.shrename to libs/xfce/src/scripts/resize-display.shdiff --git a/libs/docker-xfce/src/scripts/start-computer-server.sh b/libs/xfce/src/scripts/start-computer-server.shsimilarity index 100%rename from libs/docker-xfce/src/scripts/start-computer-server.shrename to libs/xfce/src/scripts/start-computer-server.shdiff --git a/libs/docker-xfce/src/scripts/start-novnc.sh b/libs/xfce/src/scripts/start-novnc.shsimilarity index 100%rename from libs/docker-xfce/src/scripts/start-novnc.shrename to libs/xfce/src/scripts/start-novnc.shdiff --git a/libs/docker-xfce/src/scripts/start-vnc.sh b/libs/xfce/src/scripts/start-vnc.shsimilarity index 100%rename from libs/docker-xfce/src/scripts/start-vnc.shrename to libs/xfce/src/scripts/start-vnc.shdiff --git a/libs/docker-xfce/src/scripts/xstartup.sh b/libs/xfce/src/scripts/xstartup.shsimilarity index 100%rename from libs/docker-xfce/src/scripts/xstartup.shrename to libs/xfce/src/scripts/xstartup.shdiff --git a/libs/docker-xfce/src/supervisor/supervisord.conf b/libs/xfce/src/supervisor/supervisord.confsimilarity index 100%rename from libs/docker-xfce/src/supervisor/supervisord.confrename to libs/xfce/src/supervisor/supervisord.confdiff --git a/libs/docker-xfce/src/xfce-config/helpers.rc b/libs/xfce/src/xfce-config/helpers.rcsimilarity index 100%rename from libs/docker-xfce/src/xfce-config/helpers.rcrename to libs/xfce/src/xfce-config/helpers.rcdiff --git a/libs/docker-xfce/src/xfce-config/xfce4-session.xml b/libs/xfce/src/xfce-config/xfce4-session.xmlsimilarity index 100%rename from libs/docker-xfce/src/xfce-config/xfce4-session.xmlrename to libs/xfce/src/xfce-config/xfce4-session.xml