Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

分离CPU和GPU计算任务成两个镜像 Separate GPU-accelerated steps to GPU the workload image. #46

Merged
merged 1 commit into from
Feb 15, 2025

Conversation

HanFa
Copy link
Contributor

@HanFa HanFa commented Feb 11, 2025

image

draw graph: https://draw.sutroplanet.com/#room=8e74f41ff01798afb266,1EHrU1nIkjH3_xIOS7cy8g

概述

此拉取请求对 EasyVideoTrans 项目进行了全面的改进和重构,重点在于分离 GPU 加速工作负载、优化 Docker 工作流以及改进代码组织。
关键更改

Docker 工作流增强:
    将 .github/workflows/docker-build.yaml 中的构建过程分为两个独立步骤:用于 EasyVideoTrans 服务和 GPU 工作负载。
    创建了新的 docker-workload-release.yaml 工作流文件,用于处理 GPU 工作负载 Docker 镜像的发布。
    更新了 docker-release.yaml 的名称和标签,以符合 EasyVideoTrans 的命名惯例。

Dockerfile 修改:
    将 Dockerfile 基础镜像更改为 python:3.9-slim,以减少 EasyVideoTrans 服务的镜像大小。
    添加了 Dockerfile-gpu-workload,专门用于 GPU 工作负载,确保高效利用 GPU 资源。

代码重构:
    将音频处理和视频合成逻辑移动到新的 workloads 目录中,以改善代码组织和关注点分离。
    更新了导入路径以反映新的目录结构。

配置更新:
    添加了新的配置文件 configs/easyvideotrans.json,支持新的工作负载客户端和端点。
    删除了旧的 configs/pytvzhen.json 配置文件。

新功能:
    实现了 EasyVideoTransWorkloadClient,用于与 GPU 加速服务交互,包括音频分离和转录。
    添加了 inference.py 脚本,用于处理基于 GPU 的推理任务,提供音频分离和转录的端点。

测试:
    引入了 inference_test.py,用于测试新的推理端点,确保功能的稳健性。
    在 test_workload_client.py 中为 EasyVideoTransWorkloadClient 添加了单元测试,以验证客户端-服务器交互。

其他:
    更新 .gitignore 以排除 .pytest_cache 和其他不必要的文件。
    更新 requirements.txt 以反映 EasyVideoTrans 服务和工作负载的特定依赖项。

优势

性能:通过分离 GPU 工作负载,系统可以更好地分配资源,提高计算密集型任务的性能。
可维护性:新的目录结构和代码组织便于维护和未来的增强。
可扩展性:这些更改为扩展 EasyVideoTrans 系统奠定了基础,允许更复杂的工作负载和服务。

@HanFa HanFa force-pushed the separate-gpu-components branch from 8494611 to dd698d3 Compare February 15, 2025 04:04
@HanFa HanFa force-pushed the separate-gpu-components branch from dd698d3 to 091ae8f Compare February 15, 2025 04:07
@HanFa HanFa marked this pull request as ready for review February 15, 2025 06:31
@HanFa HanFa merged commit 8f99d7f into master Feb 15, 2025
2 checks passed
@HanFa HanFa deleted the separate-gpu-components branch February 15, 2025 08:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant