Commit 4941f136 authored by jerrrrry's avatar jerrrrry
Browse files

Update .gitlab-ci.yml file

parent 8fb011e2
# 定义流水线要使用的 Docker 镜像 # 定义流水线要使用的 Docker 镜像
image: image.sourcefind.cn:5000/dcu/admin/base/vllm:0.8.5-ubuntu22.04-dtk25.04.1-rc5-das1.6-py3.10-20250724 image: image.sourcefind.cn:5000/dcu/admin/base/vllm:0.8.5-ubuntu22.04-dtk25.04.1-rc5-das1.6-py3.10-20250724
# 定义流水线的所有阶段 # 定义流水线的所有阶段
stages: stages:
- prepare - prepare
- install - install
- test - test
# === 阶段 1: 准备阶段 - 下载所有大文件 === # === 阶段 1: 准备阶段 ===
download_assets: download_assets:
stage: prepare stage: prepare
tags: tags:
...@@ -14,75 +15,72 @@ download_assets: ...@@ -14,75 +15,72 @@ download_assets:
script: script:
- echo "--- 1. Preparing assets ---" - echo "--- 1. Preparing assets ---"
- pip install modelscope - pip install modelscope
- modelscope download --model AI-ModelScope/sdxl-vae-fp16-fix --local_dir ./sdxl-vae-fp16-fix - modelscope download --model "AI-ModelScope/sdxl-vae-fp16-fix" --local_dir "./sdxl-vae-fp16-fix"
- modelscope download --model stabilityai/stable-diffusion-xl-base-1.0 --local_dir ./stable-diffusion-xl-base-1.0 - modelscope download --model "stabilityai/stable-diffusion-xl-base-1.0" --local_dir "./stable-diffusion-xl-base-1.0"
- curl -f -C - -o rocblas-install-0626-bug.tar.gz https://wuzh01.hpccube.com:65015/efile/s/d/amVycnJycnk=/a6a7342d017b1748 - curl -f -C - -o "rocblas-install-0626-bug.tar.gz" "https://wuzh01.hpccube.com:65015/efile/s/d/amVycnJycnk=/a6a7342d017b1748"
- curl -f -C - -o package-miopen-dev-0801-ubuntu20.tar.gz https://ksefile.hpccube.com:65241/efile/s/d/amVycnJycnk=/9c2334cb9cdb8b39 - curl -f -C - -o "package-miopen-dev-0801-ubuntu20.tar.gz" "https://ksefile.hpccube.com:65241/efile/s/d/amVycnJycnk=/9c2334cb9cdb8b39"
- echo "--- Asset download finished ---" - echo "--- Asset download finished ---"
cache: cache:
key: ${CI_COMMIT_REF_SLUG} key: "assets-cache-${CI_COMMIT_REF_SLUG}"
paths: paths:
- sdxl-vae-fp16-fix/ - "sdxl-vae-fp16-fix/"
- stable-diffusion-xl-base-1.0/ - "stable-diffusion-xl-base-1.0/"
- rocblas-install-0626-bug.tar.gz - "rocblas-install-0626-bug.tar.gz"
- package-miopen-dev-0801-ubuntu20.tar.gz - "package-miopen-dev-0801-ubuntu20.tar.gz"
# === 阶段 2: 安装阶段 - 解压、安装、配置 === # === 阶段 2: 安装阶段 ===
setup_environment: setup_environment:
stage: install stage: install
tags: tags:
- demos - demos
script: script:
- echo "--- 2. Setting up environment ---" - echo "--- 2. Setting up environment ---"
- tar -xzvf rocblas-install-0626-bug.tar.gz - tar -xzvf "rocblas-install-0626-bug.tar.gz"
- tar -xzvf package-miopen-dev-0801-ubuntu20.tar.gz - tar -xzvf "package-miopen-dev-0801-ubuntu20.tar.gz"
- cd stable-diffusion-xl-base-1.0 - cd "stable-diffusion-xl-base-1.0"
- mv vae vae_bak || true - mv vae vae_bak || true
- mkdir -p vae - mkdir -p vae
- cp ../sdxl-vae-fp16-fix/c* ./vae/ - cp ../sdxl-vae-fp16-fix/c* ./vae/
- cp ../sdxl-vae-fp16-fix/s* ./vae/ - cp ../sdxl-vae-fp16-fix/s* ./vae/
- cp ../sdxl-vae-fp16-fix/d* ./vae/ - cp ../sdxl-vae-fp16-fix/d* ./vae/
- cd .. - cd ..
- curl -f -C - -o diffusers-0.33.1-py3-none-any.whl https://ksefile.hpccube.com:65241/efile/s/d/amVycnJycnk=/63ec0d10ce960f90 - curl -f -C - -o "diffusers-0.33.1-py3-none-any.whl" "https://ksefile.hpccube.com:65241/efile/s/d/amVycnJycnk=/63ec0d10ce960f90"
- curl -f -C - -o lightop-0.5.0+das.dtk25041-cp310-cp310-linux_x86_64.whl https://ksefile.hpccube.com:65241/efile/s/d/amVycnJycnk=/da522f7e175bb092 - curl -f -C - -o "lightop-0.5.0+das.dtk25041-cp310-cp310-linux_x86_64.whl" "https://ksefile.hpccube.com:65241/efile/s/d/amVycnJycnk=/da522f7e175bb092"
- curl -f -C - -o litserve-0.2.15-py3-none-any.whl https://ksefile.hpccube.com:65241/efile/s/d/amVycnJycnk=/36943fb1ca62ac3b - curl -f -C - -o "litserve-0.2.15-py3-none-any.whl" "https://ksefile.hpccube.com:65241/efile/s/d/amVycnJycnk=/36943fb1ca62ac3b"
- pip install diffusers-0.33.1-py3-none-any.whl lightop-0.5.0+das.dtk25041-cp310-cp310-linux_x86_64.whl litserve-0.2.15-py3-none-any.whl - pip install "diffusers-0.33.1-py3-none-any.whl" "lightop-0.5.0+das.dtk25041-cp310-cp310-linux_x86_64.whl" "litserve-0.2.15-py3-none-any.whl"
- curl -f -C - -o transformers.tar.gz https://ksefile.hpccube.com:65241/efile/s/d/amVycnJycnk=/f587d939a37d1727 - curl -f -C - -o "transformers.tar.gz" "https://ksefile.hpccube.com:65241/efile/s/d/amVycnJycnk=/f587d939a37d1727"
- tar -xzvf transformers.tar.gz - tar -xzvf "transformers.tar.gz"
- echo "--- Environment setup finished ---" - echo "--- Environment setup finished ---"
cache: cache:
key: ${CI_COMMIT_REF_SLUG} key: "assets-cache-${CI_COMMIT_REF_SLUG}"
paths: paths:
- sdxl-vae-fp16-fix/ - "sdxl-vae-fp16-fix/"
- stable-diffusion-xl-base-1.0/ - "stable-diffusion-xl-base-1.0/"
- rocblas-install/ - "rocblas-install/"
- package-miopen-dev-0801-ubuntu20/ - "package-miopen-dev-0801-ubuntu20/"
- transformers/ - "transformers/"
policy: pull-push policy: pull-push
# === 阶段 3: 测试阶段 - 运行基准测试 === # === 阶段 3: 测试阶段 ===
benchmark_sdxl: benchmark_sdxl:
stage: test stage: test
tags: tags:
- demos - demos
before_script: script:
- export LD_LIBRARY_PATH=$CI_PROJECT_DIR/rocblas-install/lib/:$LD_LIBRARY_PATH - echo "--- 3. Running SDXL benchmark ---"
- export LD_LIBRARY_PATH=$CI_PROJECT_DIR/package-miopen-dev-0801-ubuntu20/lib/:$LD_LIBRARY_PATH - export LD_LIBRARY_PATH="$CI_PROJECT_DIR/rocblas-install/lib/:$LD_LIBRARY_PATH"
- export LD_LIBRARY_PATH="$CI_PROJECT_DIR/package-miopen-dev-0801-ubuntu20/lib/:$LD_LIBRARY_PATH"
- export PYTORCH_MIOPEN_SUGGEST_NHWC=1 - export PYTORCH_MIOPEN_SUGGEST_NHWC=1
- export PYTHONPATH="$CI_PROJECT_DIR/transformers:$PYTHONPATH" - export PYTHONPATH="$CI_PROJECT_DIR/transformers:$PYTHONPATH"
- export MODEL_PATH="$CI_PROJECT_DIR/stable-diffusion-xl-base-1.0" - export MODEL_PATH="$CI_PROJECT_DIR/stable-diffusion-xl-base-1.0"
script:
- echo "--- 3. Running SDXL benchmark ---"
- echo "LD_LIBRARY_PATH: $LD_LIBRARY_PATH"
- echo "PYTHONPATH: $PYTHONPATH"
- python test.py - python test.py
- echo "--- Benchmark finished ---" - echo "--- Benchmark finished ---"
artifacts: artifacts:
name: "$CI_JOB_NAME-$CI_COMMIT_REF_NAME" name: "$CI_JOB_NAME-$CI_COMMIT_REF_NAME"
paths: paths:
- *.png - "*.png"
- results.json - "results.json"
expire_in: 1 week expire_in: 1 week
cache: cache:
key: ${CI_COMMIT_REF_SLUG} key: "assets-cache-${CI_COMMIT_REF_SLUG}"
policy: pull policy: pull
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment