mirror of
https://github.com/linyqh/NarratoAI.git
synced 2025-12-10 09:52:49 +00:00
新增 MiniCPM-V 的 Dockerfile 文件
This commit is contained in:
parent
d50c6e695c
commit
9f72b1b8bf
@ -433,7 +433,7 @@ def start_subclip(task_id, params: VideoClipParams, subclip_path_videos):
|
||||
|
||||
final_video_path = path.join(utils.task_dir(task_id), f"final-{index}.mp4")
|
||||
|
||||
logger.info(f"\n\n## 6. 生成视频: {index} => {final_video_path}")
|
||||
logger.info(f"\n\n## 6. 最后一步: {index} => {final_video_path}")
|
||||
# 把所有东西合到在一起
|
||||
video.generate_video(video_path=combined_video_path,
|
||||
audio_path=audio_file,
|
||||
|
||||
31
docker/Dockerfile_MiniCPM
Normal file
31
docker/Dockerfile_MiniCPM
Normal file
@ -0,0 +1,31 @@
|
||||
ARG BASE=nvidia/cuda:12.1.0-devel-ubuntu22.04
|
||||
FROM ${BASE}
|
||||
|
||||
# 设置环境变量
|
||||
ENV http_proxy=http://host.docker.internal:7890
|
||||
ENV https_proxy=http://host.docker.internal:7890
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
# 安装系统依赖
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
gcc g++ make git python3 python3-dev python3-pip python3-venv python3-wheel \
|
||||
espeak-ng libsndfile1-dev nano vim unzip wget xz-utils && \
|
||||
apt-get clean && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# 设置工作目录
|
||||
WORKDIR /root/MiniCPM-V/
|
||||
|
||||
# 安装 Python 依赖
|
||||
RUN git clone https://github.com/OpenBMB/MiniCPM-V.git && \
|
||||
cd MiniCPM-V && \
|
||||
pip3 install decord && \
|
||||
pip3 install --no-cache-dir -r requirements.txt && \
|
||||
pip3 install flash_attn
|
||||
|
||||
# 清理代理环境变量
|
||||
ENV http_proxy=""
|
||||
ENV https_proxy=""
|
||||
|
||||
# 设置 PYTHONPATH
|
||||
ENV PYTHONPATH="/root/MiniCPM-V/"
|
||||
@ -732,7 +732,11 @@ start_button = st.button(tr("Generate Video"), use_container_width=True, type="p
|
||||
if start_button:
|
||||
config.save_config()
|
||||
task_id = st.session_state.get('task_id')
|
||||
params.video_clip_json = st.session_state['video_clip_json_path']
|
||||
if st.session_state.get('video_script_json_path') is not None:
|
||||
params.video_clip_json = st.session_state.get('video_script_json_path')
|
||||
|
||||
logger.debug(f"当前的脚本为:{params.video_clip_json}")
|
||||
|
||||
if not task_id:
|
||||
st.error(tr("请先裁剪视频"))
|
||||
scroll_to_bottom()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user