Spaces:
Running
Running
FROM docker.io/library/python:3.7.13@sha256:8b743b1af852e554b98e2377f9c92221693225b85d984b23be6b033018f97cc3 | |
RUN useradd -m -u 1000 user | |
RUN pip install --no-cache-dir pip==22.3.1 && pip install --no-cache-dir datasets "huggingface-hub>=0.12.1" "protobuf<4" "click<8.1" "pydantic~=1.0" | |
RUN apt-get update && apt-get install -y git git-lfs ffmpeg libsm6 libxext6 cmake libgl1-mesa-glx && rm -rf /var/lib/apt/lists/* && git lfs install | |
RUN apt-get update && apt-get install -y dkms build-essential gcc g++ libxi6 libxi-dev libglu1-mesa libglu1-mesa-dev libxmu6 linux-headers-amd64 linux-source freeglut3-dev | |
RUN wget -q https://developer.download.nvidia.com/compute/cuda/11.6.0/local_installers/cuda_11.6.0_510.39.01_linux.run && sh cuda_11.6.0_510.39.01_linux.run --silent --toolkit && rm cuda_11.6.0_510.39.01_linux.run | |
WORKDIR /home/user/app | |
RUN --mount=target=pre-requirements.txt,source=pre-requirements.txt pip install --no-cache-dir -r pre-requirements.txt | |
ENV TORCH_CUDA_ARCH_LIST=Turing | |
RUN --mount=target=requirements1.txt,source=requirements1.txt pip install --no-cache-dir -r requirements1.txt | |
RUN --mount=target=requirements2.txt,source=requirements2.txt pip install --no-cache-dir -r requirements2.txt | |
RUN pip install gradio | |
RUN wget -O output.zip -q https://huggingface.co/camenduru/Dynamic3DGaussians/resolve/main/output.zip?download=true && unzip output.zip && rm output.zip | |
RUN apt-get update && apt-get install -y xvfb | |
COPY --chown=user . /home/user/app | |
RUN cp -R /home/user/app/Dynamic3DGaussians /home/user/app/Dynamic3DGaussians_cpu | |
RUN sed -i s/\.cuda\(\)\./\./ /home/user/app/Dynamic3DGaussians_cpu/*.py | |
RUN sed -i s/,\ device="cuda"// /home/user/app/Dynamic3DGaussians_cpu/*.py | |
ENTRYPOINT ["bash", "/home/user/app/runWithXvfb.sh"] |