VGen icon indicating copy to clipboard operation
VGen copied to clipboard

docker image

Open mingzhang1998 opened this issue 1 year ago • 2 comments

Hi Steven, I'm having a lot of trouble building the environment while running the demo. Would you mind provide a docker image in the future? Thanks

mingzhang1998 avatar Jan 17 '24 07:01 mingzhang1998

Hi Steven, I'm having a lot of trouble building the environment while running the demo. Would you mind provide a docker image in the future? Thanks

you can run cog predict

frankchieng avatar Jan 17 '24 08:01 frankchieng

Hi @mingzhang1998 , I created a Dockerfile below, maybe you can give it a try.

FROM nvidia/cuda:11.3.1-cudnn8-devel-ubuntu20.04

ENV DEBIAN_FRONTEND=noninteractive

RUN apt update                  \
    &&                          \
    apt install -y              \
    bash                        \
    build-essential             \
    ca-certificates             \
    curl                        \
    ffmpeg                      \
    git                         \
    git-lfs                     \
    libgl1                      \
    libsndfile1-dev             \
    libsm6                      \
    libxext6                    \
    python3.8                   \
    python3.8-venv              \
    python3-pip                 \
    python3-tk                  \
    wget                        \
    &&                          \
    rm -rf /var/lib/apt/lists

# make sure to use venv
RUN python3 -m venv /opt/venv
ENV PATH="/opt/venv/bin:$PATH"

# pre-install the heavy dependencies (these can later be overridden by the deps from setup.py)
RUN python3 -m pip install --no-cache-dir --upgrade pip uv==0.1.11

# Install setuptools
RUN python3 -m pip install setuptools==69.5.1

RUN python3 -m pip install wheel

RUN python3 -m pip install --no-cache-dir   \
    torch==1.12.0+cu113                     \
    torchaudio==0.12.0                      \
    torchvision==0.13.0+cu113               \               
    --extra-index-url https://download.pytorch.org/whl/cu113

# change the folder for install external programs
RUN mkdir -p /opt/programs
WORKDIR /opt/programs

# install requirements for VGen
RUN git clone https://github.com/ali-vilab/VGen.git
WORKDIR /opt/programs/VGen
RUN python3 -m pip install  \
    -r requirements.txt     \
    -i https://pypi.tuna.tsinghua.edu.cn/simple

# install diffusers
RUN python3 -m pip install diffusers==0.23.0

# change the folder for workspace
RUN mkdir -p /workspace
WORKDIR /workspace

zshyang avatar Jul 08 '24 23:07 zshyang