champ_preprocess / Dockerfile
yoyozs11's picture
Upload folder using huggingface_hub
cd47a59 verified
Raw
History Blame Contribute Delete
1.24 kB
# 使用 NVIDIA CUDA 官方基礎映像檔 (包含 cudnn)
FROM nvidia/cuda:11.8.0-cudnn8-runtime-ubuntu22.04
# 設定環境變數避免互動式安裝卡住
ENV DEBIAN_FRONTEND=noninteractive
ENV PYTHONUNBUFFERED=1
# 安裝系統必要套件 (包含 ffmpeg)
RUN apt-get update && apt-get install -y \
python3.10 python3-pip python3.10-venv \
ffmpeg \
wget xz-utils \
libgl1 libglib2.0-0 \
libx11-dev libxi-dev libxxf86vm-dev libxrender-dev \
&& rm -rf /var/lib/apt/lists/*
# 建立 python 指向 python3.10 的軟連結
RUN ln -s /usr/bin/python3.10 /usr/bin/python
# 設定工作目錄
WORKDIR /app
# 下載並安裝 Linux 版 Blender 3.6.0
RUN wget https://download.blender.org/release/Blender3.6/blender-3.6.0-linux-x64.tar.xz \
&& tar -xf blender-3.6.0-linux-x64.tar.xz \
&& rm blender-3.6.0-linux-x64.tar.xz \
&& mv blender-3.6.0-linux-x64 blender
# 複製前處理專用依賴並安裝
COPY requirements-preprocess.txt /app/
RUN pip3 install --no-cache-dir -r requirements-preprocess.txt
# 複製專案原始碼 (champ-master 內的檔案)
COPY . /app/
# 設定預設指令 (僅供測試前處理使用,組員可以覆寫此指令來啟動 Gradio)
CMD ["python", "process_single_video.py"]