Dockerfile.genface 948 B

123456789101112131415161718192021222324252627
  1. FROM ubuntu22.04-cu118-conda:torch2.0.1-py39
  2. # Make RUN commands use the new environment:
  3. SHELL ["conda", "run", "-n", "pytorch", "/bin/bash", "-c"]
  4. RUN conda install conda-forge::ffmpeg # ffmpeg with libx264 codec to turn images to video
  5. # torch2.0.1+cuda11.8 is recommended , cuda11.8 is compatible with RTX 4090.
  6. # And torch=2.1+cuda12.1 will cause error of torch-ngp
  7. RUN conda install pytorch==2.0.1 torchvision==0.15.2 torchaudio==2.0.2 pytorch-cuda=11.8 -c pytorch -c nvidia
  8. # install mmcv by mim
  9. RUN pip install "git+https://github.com/facebookresearch/pytorch3d.git@stable" && \
  10. pip install chardet cython openmim==0.3.9 && \
  11. mim install mmcv==2.1.0
  12. COPY . /workspace
  13. WORKDIR /workspace
  14. # other dependencies
  15. RUN apt update -y && apt-get install -y libasound2-dev portaudio19-dev libgl1 && \
  16. pip install -r docs/prepare_env/requirements.txt -v
  17. # install torch-ngp extension
  18. RUN bash docs/prepare_env/install_ext.sh