Pushed by feifeibear 🚀 #162
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: GitHub Actions Demo | |
run-name: Pushed by ${{ github.actor }} 🚀 | |
on: [push, pull_request_target] | |
jobs: | |
upload: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Run a multi-line script | |
run: git archive --format zip HEAD > xDiT.zip | |
- name: copy file via ssh password | |
uses: appleboy/[email protected] | |
with: | |
host: ${{ secrets.SSH_HOST }} | |
port: ${{ secrets.SSH_PORT }} | |
username: ${{ secrets.SSH_USER }} | |
password: ${{ secrets.SSH_KEY }} | |
source: "xDiT.zip" | |
target: "~/" | |
setup-env-and-test: | |
needs: upload | |
runs-on: [self-hosted, linux, x64] | |
continue-on-error: true | |
steps: | |
- name: unzip | |
run: rm -rf ~/xDiT_${{github.run_number}} | |
- run: mkdir ~/xDiT_${{github.run_number}} | |
- run: unzip ~/xDiT.zip -d ~/xDiT_${{github.run_number}} | |
- name: Setup docker | |
run: docker run --rm --name xfuser_test_docker_${{github.repository_owner_id}}_${{github.run_number}} -d -i -t --runtime=nvidia --gpus all -v /cfs:/cfs -v /mnt:/mnt -v ~/xDiT_${{github.run_number}}:/code xfuser_cicd/test-py_3_11-torch_2_4_1 /bin/bash | |
- name: Install xfuser | |
run: docker exec -w /code xfuser_test_docker_${{github.repository_owner_id}}_${{github.run_number}} pip3.11 install -e . | |
- name: Test xfuser | |
run: docker exec -w /code xfuser_test_docker_${{github.repository_owner_id}}_${{github.run_number}} sh -c "torchrun --nproc_per_node=8 ./examples/sd3_example.py --model /cfs/dit/stable-diffusion-3-medium-diffusers --pipefusion_parallel_degree 2 --ulysses_degree 2 --ring_degree 1 --height 1024 --width 1024 --no_use_resolution_binning --num_inference_steps 20 --warmup_steps 0 --prompt 'A small dog' --use_cfg_parallel" | |
clear-env: | |
needs: setup-env-and-test | |
runs-on: [self-hosted, linux, x64] | |
steps: | |
- name: Remove Files | |
run: docker exec -w /code xfuser_test_docker_${{github.repository_owner_id}}_${{github.run_number}} sh -c "rm -r *" | |
- name: Destroy docker | |
run: docker stop xfuser_test_docker_${{github.repository_owner_id}}_${{github.run_number}} |