|
|
FROM nvidia/cuda:12.1.1-cudnn8-runtime-ubuntu22.04 |
|
|
|
|
|
ENV DEBIAN_FRONTEND=noninteractive |
|
|
WORKDIR /opt/app |
|
|
|
|
|
|
|
|
RUN apt-get update && apt-get install -y \ |
|
|
git \ |
|
|
python3 \ |
|
|
python3-pip \ |
|
|
python3-dev \ |
|
|
build-essential \ |
|
|
&& rm -rf /var/lib/apt/lists/* |
|
|
|
|
|
RUN ln -s /usr/bin/python3 /usr/bin/python |
|
|
|
|
|
|
|
|
RUN pip install --upgrade pip setuptools wheel |
|
|
|
|
|
|
|
|
RUN pip install torch torchvision torchaudio \ |
|
|
--index-url https://download.pytorch.org/whl/cu121 |
|
|
|
|
|
|
|
|
ARG HY3D_COMMIT=e2df0625bda7efd5f1daba8f3f2a4cb3d9ac85f8 |
|
|
RUN git clone https://github.com/tencent/Hunyuan3D-2.git && \ |
|
|
cd Hunyuan3D-2 && git checkout ${HY3D_COMMIT} |
|
|
|
|
|
WORKDIR /opt/app/Hunyuan3D-2 |
|
|
|
|
|
|
|
|
RUN pip install -e . |
|
|
|
|
|
|
|
|
RUN pip install ./hy3dgen/texgen/custom_rasterizer/ops |
|
|
RUN pip install ./hy3dgen/texgen/differentiable_renderer/ops |
|
|
|
|
|
|
|
|
WORKDIR /opt/app |
|
|
COPY handler.py . |
|
|
|
|
|
ENV PYTHONPATH=/opt/app/Hunyuan3D-2 |
|
|
|