|
| 1 | +# Inspired by |
| 2 | +# https://github.com/huggingface/peft/blob/main/.github/workflows/build_docker_images.yml |
| 3 | +name: Build Docker images (scheduled) |
| 4 | + |
| 5 | +on: |
| 6 | + pull_request: # TODO(aliberts): for testing, delete before merge |
| 7 | + branches: |
| 8 | + - main |
| 9 | + workflow_dispatch: |
| 10 | + workflow_call: |
| 11 | + schedule: |
| 12 | + - cron: "0 1 * * *" |
| 13 | + |
| 14 | +concurrency: |
| 15 | + group: docker-image-builds |
| 16 | + cancel-in-progress: false |
| 17 | + |
| 18 | +# env: |
| 19 | +# CI_SLACK_CHANNEL: ${{ secrets.CI_DOCKER_CHANNEL }} |
| 20 | + |
| 21 | +jobs: |
| 22 | + latest-cpu: |
| 23 | + name: "Latest LeRobot CPU [dev]" |
| 24 | + runs-on: ubuntu-latest |
| 25 | + steps: |
| 26 | + - name: Cleanup disk |
| 27 | + run: | |
| 28 | + sudo df -h |
| 29 | + # sudo ls -l /usr/local/lib/ |
| 30 | + # sudo ls -l /usr/share/ |
| 31 | + sudo du -sh /usr/local/lib/ |
| 32 | + sudo du -sh /usr/share/ |
| 33 | + sudo rm -rf /usr/local/lib/android |
| 34 | + sudo rm -rf /usr/share/dotnet |
| 35 | + sudo du -sh /usr/local/lib/ |
| 36 | + sudo du -sh /usr/share/ |
| 37 | + sudo df -h |
| 38 | + - name: Set up Docker Buildx |
| 39 | + uses: docker/setup-buildx-action@v3 |
| 40 | + - name: Check out code |
| 41 | + uses: actions/checkout@v4 |
| 42 | + - name: Checkout gym-aloha |
| 43 | + uses: actions/checkout@v4 |
| 44 | + with: |
| 45 | + repository: huggingface/gym-aloha |
| 46 | + path: envs/gym-aloha |
| 47 | + ssh-key: ${{ secrets.SSH_PRIVATE_KEY }} |
| 48 | + - name: Checkout gym-xarm |
| 49 | + uses: actions/checkout@v4 |
| 50 | + with: |
| 51 | + repository: huggingface/gym-xarm |
| 52 | + path: envs/gym-xarm |
| 53 | + ssh-key: ${{ secrets.SSH_PRIVATE_KEY }} |
| 54 | + - name: Checkout gym-pusht |
| 55 | + uses: actions/checkout@v4 |
| 56 | + with: |
| 57 | + repository: huggingface/gym-pusht |
| 58 | + path: envs/gym-pusht |
| 59 | + ssh-key: ${{ secrets.SSH_PRIVATE_KEY }} |
| 60 | + - name: Login to DockerHub |
| 61 | + uses: docker/login-action@v3 |
| 62 | + with: |
| 63 | + username: ${{ secrets.DOCKERHUB_USER_CUSTOM }} |
| 64 | + password: ${{ secrets.DOCKERHUB_PASSWORD_CUSTOM }} |
| 65 | + |
| 66 | + - name: Build and Push CPU |
| 67 | + uses: docker/build-push-action@v5 |
| 68 | + with: |
| 69 | + context: . |
| 70 | + file: ./docker/lerobot-cpu/Dockerfile |
| 71 | + push: true |
| 72 | + # tags: huggingface/lerobot-cpu |
| 73 | + tags: ${{ secrets.DOCKERHUB_REGISTRY_CUSTOM }} |
| 74 | + |
| 75 | + # - name: Post to a Slack channel |
| 76 | + # id: slack |
| 77 | + # #uses: slackapi/[email protected] |
| 78 | + # uses: slackapi/slack-github-action@6c661ce58804a1a20f6dc5fbee7f0381b469e001 |
| 79 | + # with: |
| 80 | + # # Slack channel id, channel name, or user id to post message. |
| 81 | + # # See also: https://api.slack.com/methods/chat.postMessage#channels |
| 82 | + # channel-id: ${{ env.CI_SLACK_CHANNEL }} |
| 83 | + # # For posting a rich message using Block Kit |
| 84 | + # payload: | |
| 85 | + # { |
| 86 | + # "text": "lerobot-cpu Docker Image build result: ${{ job.status }}\n${{ github.event.pull_request.html_url || github.event.head_commit.url }}", |
| 87 | + # "blocks": [ |
| 88 | + # { |
| 89 | + # "type": "section", |
| 90 | + # "text": { |
| 91 | + # "type": "mrkdwn", |
| 92 | + # "text": "lerobot-cpu Docker Image build result: ${{ job.status }}\n${{ github.event.pull_request.html_url || github.event.head_commit.url }}" |
| 93 | + # } |
| 94 | + # } |
| 95 | + # ] |
| 96 | + # } |
| 97 | + # env: |
| 98 | + # SLACK_BOT_TOKEN: ${{ secrets.SLACK_CIFEEDBACK_BOT_TOKEN }} |
| 99 | + |
| 100 | + latest-cuda: |
| 101 | + name: "Latest LeRobot GPU [dev]" |
| 102 | + runs-on: ubuntu-latest |
| 103 | + steps: |
| 104 | + - name: Cleanup disk |
| 105 | + run: | |
| 106 | + sudo df -h |
| 107 | + # sudo ls -l /usr/local/lib/ |
| 108 | + # sudo ls -l /usr/share/ |
| 109 | + sudo du -sh /usr/local/lib/ |
| 110 | + sudo du -sh /usr/share/ |
| 111 | + sudo rm -rf /usr/local/lib/android |
| 112 | + sudo rm -rf /usr/share/dotnet |
| 113 | + sudo du -sh /usr/local/lib/ |
| 114 | + sudo du -sh /usr/share/ |
| 115 | + sudo df -h |
| 116 | + - name: Set up Docker Buildx |
| 117 | + uses: docker/setup-buildx-action@v3 |
| 118 | + - name: Check out code |
| 119 | + uses: actions/checkout@v4 |
| 120 | + - name: Checkout gym-aloha |
| 121 | + uses: actions/checkout@v4 |
| 122 | + with: |
| 123 | + repository: huggingface/gym-aloha |
| 124 | + path: envs/gym-aloha |
| 125 | + ssh-key: ${{ secrets.SSH_PRIVATE_KEY }} |
| 126 | + - name: Checkout gym-xarm |
| 127 | + uses: actions/checkout@v4 |
| 128 | + with: |
| 129 | + repository: huggingface/gym-xarm |
| 130 | + path: envs/gym-xarm |
| 131 | + ssh-key: ${{ secrets.SSH_PRIVATE_KEY }} |
| 132 | + - name: Checkout gym-pusht |
| 133 | + uses: actions/checkout@v4 |
| 134 | + with: |
| 135 | + repository: huggingface/gym-pusht |
| 136 | + path: envs/gym-pusht |
| 137 | + ssh-key: ${{ secrets.SSH_PRIVATE_KEY }} |
| 138 | + - name: Login to DockerHub |
| 139 | + uses: docker/login-action@v3 |
| 140 | + with: |
| 141 | + username: ${{ secrets.DOCKERHUB_USERNAME }} |
| 142 | + password: ${{ secrets.DOCKERHUB_PASSWORD }} |
| 143 | + |
| 144 | + - name: Build and Push GPU |
| 145 | + uses: docker/build-push-action@v5 |
| 146 | + with: |
| 147 | + context: . |
| 148 | + file: ./docker/lerobot-gpu/Dockerfile |
| 149 | + push: true |
| 150 | + tags: huggingface/lerobot-gpu |
| 151 | + |
| 152 | + # - name: Post to a Slack channel |
| 153 | + # id: slack |
| 154 | + # #uses: slackapi/[email protected] |
| 155 | + # uses: slackapi/slack-github-action@6c661ce58804a1a20f6dc5fbee7f0381b469e001 |
| 156 | + # with: |
| 157 | + # # Slack channel id, channel name, or user id to post message. |
| 158 | + # # See also: https://api.slack.com/methods/chat.postMessage#channels |
| 159 | + # channel-id: ${{ env.CI_SLACK_CHANNEL }} |
| 160 | + # # For posting a rich message using Block Kit |
| 161 | + # payload: | |
| 162 | + # { |
| 163 | + # "text": "lerobot-gpu Docker Image build result: ${{ job.status }}\n${{ github.event.pull_request.html_url || github.event.head_commit.url }}", |
| 164 | + # "blocks": [ |
| 165 | + # { |
| 166 | + # "type": "section", |
| 167 | + # "text": { |
| 168 | + # "type": "mrkdwn", |
| 169 | + # "text": "lerobot-gpu Docker Image build result: ${{ job.status }}\n${{ github.event.pull_request.html_url || github.event.head_commit.url }}" |
| 170 | + # } |
| 171 | + # } |
| 172 | + # ] |
| 173 | + # } |
| 174 | + # env: |
| 175 | + # SLACK_BOT_TOKEN: ${{ secrets.SLACK_CIFEEDBACK_BOT_TOKEN }} |
0 commit comments