Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unable to install dependencies #21

Open
forresti opened this issue Jul 10, 2024 · 1 comment
Open

unable to install dependencies #21

forresti opened this issue Jul 10, 2024 · 1 comment

Comments

@forresti
Copy link

forresti commented Jul 10, 2024

On Linux, I am trying to follow your exact recipe with:

  • cuda 11.6
  • pytorch 1.12.1
conda create -n paint3d python=3.8

conda activate

export CUDA_HOME=/usr/local/cuda-11.6

# following directions from here: https://pytorch.org/get-started/previous-versions/ 
conda install pytorch==1.12.1 torchvision==0.13.1 torchaudio==0.12.1 cudatoolkit=11.6 -c pytorch -c conda-forge

It fails with the following error:

$ conda install pytorch==1.12.1 torchvision==0.13.1 torchaudio==0.12.1 cudatoolkit=11.6 -c pytorch -c conda-forge
Collecting package metadata (current_repodata.json): \ WARNING conda.models.version:get_matcher(546): Using .* with relational operator is superfluous and deprecated and will be removed in a future version of conda. Your spec was 1.7.1.*, but conda is ignoring the .* and treating it as 1.7.1
done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Collecting package metadata (repodata.json): / WARNING conda.models.version:get_matcher(546): Using .* with relational operator is superfluous and deprecated and will be removed in a future version of conda. Your spec was 1.9.0.*, but conda is ignoring the .* and treating it as 1.9.0
WARNING conda.models.version:get_matcher(546): Using .* with relational operator is superfluous and deprecated and will be removed in a future version of conda. Your spec was 1.8.0.*, but conda is ignoring the .* and treating it as 1.8.0
WARNING conda.models.version:get_matcher(546): Using .* with relational operator is superfluous and deprecated and will be removed in a future version of conda. Your spec was 1.6.0.*, but conda is ignoring the .* and treating it as 1.6.0
done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: done
## Package Plan ##
  environment location: /home/ubuntu/anaconda3/envs/paint3d
  added / updated specs:
    - cudatoolkit=11.6
    - pytorch==1.12.1
    - torchaudio==0.12.1
    - torchvision==0.13.1
The following packages will be downloaded:
    package                    |            build
    ---------------------------|-----------------
    blas-2.122                 |              mkl          14 KB  conda-forge
    blas-devel-3.9.0           |   22_linux64_mkl          14 KB  conda-forge
    brotli-python-1.1.0        |   py38h17151c0_1         343 KB  conda-forge
    certifi-2024.7.4           |     pyhd8ed1ab_0         156 KB  conda-forge
    cudatoolkit-11.6.2         |      hfc3e2af_13       598.8 MB  conda-forge
    gmp-6.3.0                  |       hac33072_2         449 KB  conda-forge
    jpeg-9e                    |       h0b41bf4_3         235 KB  conda-forge
    libblas-3.9.0              |   22_linux64_mkl          15 KB  conda-forge
    libcblas-3.9.0             |   22_linux64_mkl          14 KB  conda-forge
    libgfortran-ng-14.1.0      |       h69a702a_0          49 KB  conda-forge
    libgfortran5-14.1.0        |       hc5f4f2c_0         1.4 MB  conda-forge
    libhwloc-2.11.0            |default_h5622ce7_1000         2.3 MB  conda-forge
    liblapack-3.9.0            |   22_linux64_mkl          14 KB  conda-forge
    liblapacke-3.9.0           |   22_linux64_mkl          14 KB  conda-forge
    libxml2-2.12.7             |       hc051c1a_1         688 KB  conda-forge
    llvm-openmp-18.1.7         |       ha31de31_0        55.9 MB  conda-forge
    mkl-2024.1.0               |     ha957f24_693       121.2 MB  conda-forge
    mkl-devel-2024.1.0         |     ha770c72_693          34 KB  conda-forge
    mkl-include-2024.1.0       |     ha957f24_693         680 KB  conda-forge
    numpy-1.24.4               |   py38h59b608b_0         6.4 MB  conda-forge
    openh264-2.1.1             |       h780b84a_0         1.5 MB  conda-forge
    pillow-9.4.0               |   py38hde6dc18_1        43.8 MB  conda-forge
    python_abi-3.8             |           4_cp38           6 KB  conda-forge
    pytorch-1.12.1             |py3.8_cuda11.6_cudnn8.3.2_0        1.20 GB  pytorch
    tbb-2021.12.0              |       h434a139_2         188 KB  conda-forge
    torchaudio-0.12.1          |       py38_cu116         6.2 MB  pytorch
    torchvision-0.13.1         |       py38_cu116         7.7 MB  pytorch
    typing_extensions-4.12.2   |     pyha770c72_0          39 KB  conda-forge
    urllib3-2.2.2              |     pyhd8ed1ab_0          93 KB  conda-forge
    ------------------------------------------------------------
                                           Total:        2.03 GB
The following NEW packages will be INSTALLED:
  blas               conda-forge/linux-64::blas-2.122-mkl 
  blas-devel         conda-forge/linux-64::blas-devel-3.9.0-22_linux64_mkl 
  brotli-python      conda-forge/linux-64::brotli-python-1.1.0-py38h17151c0_1 
  certifi            conda-forge/noarch::certifi-2024.7.4-pyhd8ed1ab_0 
  charset-normalizer conda-forge/noarch::charset-normalizer-3.3.2-pyhd8ed1ab_0 
  cudatoolkit        conda-forge/linux-64::cudatoolkit-11.6.2-hfc3e2af_13 
  ffmpeg             pytorch/linux-64::ffmpeg-4.3-hf484d3e_0 
  freetype           conda-forge/linux-64::freetype-2.12.1-h267a509_2 
  gmp                conda-forge/linux-64::gmp-6.3.0-hac33072_2 
  gnutls             conda-forge/linux-64::gnutls-3.6.13-h85f3911_1 
  icu                conda-forge/linux-64::icu-73.2-h59595ed_0 
  idna               conda-forge/noarch::idna-3.7-pyhd8ed1ab_0 
  jpeg               conda-forge/linux-64::jpeg-9e-h0b41bf4_3 
  lame               conda-forge/linux-64::lame-3.100-h166bdaf_1003 
  lcms2              conda-forge/linux-64::lcms2-2.15-hfd0df8a_0 
  lerc               conda-forge/linux-64::lerc-4.0.0-h27087fc_0 
  libblas            conda-forge/linux-64::libblas-3.9.0-22_linux64_mkl 
  libcblas           conda-forge/linux-64::libcblas-3.9.0-22_linux64_mkl 
  libdeflate         conda-forge/linux-64::libdeflate-1.17-h0b41bf4_0 
  libgfortran-ng     conda-forge/linux-64::libgfortran-ng-14.1.0-h69a702a_0 
  libgfortran5       conda-forge/linux-64::libgfortran5-14.1.0-hc5f4f2c_0 
  libhwloc           conda-forge/linux-64::libhwloc-2.11.0-default_h5622ce7_1000 
  libiconv           conda-forge/linux-64::libiconv-1.17-hd590300_2 
  liblapack          conda-forge/linux-64::liblapack-3.9.0-22_linux64_mkl 
  liblapacke         conda-forge/linux-64::liblapacke-3.9.0-22_linux64_mkl 
  libpng             conda-forge/linux-64::libpng-1.6.43-h2797004_0 
  libstdcxx-ng       conda-forge/linux-64::libstdcxx-ng-14.1.0-hc0a3c3a_0 
  libtiff            conda-forge/linux-64::libtiff-4.5.0-h6adf6a1_2 
  libwebp-base       conda-forge/linux-64::libwebp-base-1.4.0-hd590300_0 
  libxcb             conda-forge/linux-64::libxcb-1.13-h7f98852_1004 
  libxml2            conda-forge/linux-64::libxml2-2.12.7-hc051c1a_1 
  llvm-openmp        conda-forge/linux-64::llvm-openmp-18.1.7-ha31de31_0 
  mkl                conda-forge/linux-64::mkl-2024.1.0-ha957f24_693 
  mkl-devel          conda-forge/linux-64::mkl-devel-2024.1.0-ha770c72_693 
  mkl-include        conda-forge/linux-64::mkl-include-2024.1.0-ha957f24_693 
  nettle             conda-forge/linux-64::nettle-3.6-he412f7d_0 
  numpy              conda-forge/linux-64::numpy-1.24.4-py38h59b608b_0 
  openh264           conda-forge/linux-64::openh264-2.1.1-h780b84a_0 
  openjpeg           conda-forge/linux-64::openjpeg-2.5.0-hfec8fc6_2 
  pillow             conda-forge/linux-64::pillow-9.4.0-py38hde6dc18_1 
  pthread-stubs      conda-forge/linux-64::pthread-stubs-0.4-h36c2ea0_1001 
  pysocks            conda-forge/noarch::pysocks-1.7.1-pyha2e5f31_6 
  python_abi         conda-forge/linux-64::python_abi-3.8-4_cp38 
  pytorch            pytorch/linux-64::pytorch-1.12.1-py3.8_cuda11.6_cudnn8.3.2_0 
  pytorch-mutex      pytorch/noarch::pytorch-mutex-1.0-cuda 
  requests           conda-forge/noarch::requests-2.32.3-pyhd8ed1ab_0 
  tbb                conda-forge/linux-64::tbb-2021.12.0-h434a139_2 
  torchaudio         pytorch/linux-64::torchaudio-0.12.1-py38_cu116 
  torchvision        pytorch/linux-64::torchvision-0.13.1-py38_cu116 
  typing_extensions  conda-forge/noarch::typing_extensions-4.12.2-pyha770c72_0 
  urllib3            conda-forge/noarch::urllib3-2.2.2-pyhd8ed1ab_0 
  xorg-libxau        conda-forge/linux-64::xorg-libxau-1.0.11-hd590300_0 
  xorg-libxdmcp      conda-forge/linux-64::xorg-libxdmcp-1.1.3-h7f98852_0 
  zlib               conda-forge/linux-64::zlib-1.2.13-h4ab18f5_6 
  zstd               conda-forge/linux-64::zstd-1.5.6-ha6fb4c9_0 
The following packages will be DOWNGRADED:
  _openmp_mutex                                   4.5-2_gnu --> 4.5-2_kmp_llvm 
  libzlib                                  1.3.1-h4ab18f5_1 --> 1.2.13-h4ab18f5_6 
Proceed ([y]/n)? y
Downloading and Extracting Packages
                                                                                                                    
                                                                                                                    
InvalidArchiveError('Error with archive /home/ubuntu/anaconda3/pkgs/llvm-openmp-18.1.7-ha31de31_0.conda.  You probably need to delete and re-download or re-create this file.  Message was:\n\nfailed with error: File is not a zip file')    

Any suggestions on this? Or, are there any tips on how to get the right version of pytorch, compiled with the right version of cuda?

@mrtpk
Copy link

mrtpk commented Sep 5, 2024

Try the following. It worked for me.

# update the path and hugging face API key
export WORKSPACE_DIR=/your/workspace/dir
export LD_LIBRARY_PATH=/usr/local/cuda/lib64/

cd $WORKSPACE_DIR/repos
git clone https://github.com/OpenTexture/Paint3D.git
cd $WORKSPACE_DIR/repos/Paint3D/

conda create -y -n paint3d python=3.8.5
conda activate paint3d
export LD_LIBRARY_PATH=/usr/local/cuda/lib64/
pip3 install torch==2.0.0 torchvision==0.15.1 torchaudio==2.0.1 --index-url https://download.pytorch.org/whl/cu118
pip3 install kaolin==0.14.0 -f https://nvidia-kaolin.s3.us-east-2.amazonaws.com/torch-2.0.0_cu118.html
pip3 install albumentations==1.3.0
pip3 install opencv-python==4.6.0.66
pip3 install imageio==2.9.0
pip3 install imageio-ffmpeg==0.4.2
pip3 install pytorch-lightning==1.4.2
pip3 install omegaconf==2.1.1
pip3 install test-tube>=0.7.5
pip3 install streamlit==1.12.1
pip3 install einops==0.3.0
pip3 install transformers==4.27.1
pip3 install webdataset==0.2.5
pip3 install kornia==0.6
pip3 install open_clip_torch==2.0.2
pip3 install invisible-watermark>=0.1.5
pip3 install streamlit-drawable-canvas==0.8.0
pip3 install torchmetrics==0.6.0
pip3 install diffusers==0.25.0
pip3 install accelerate==0.29.2
pip3 install loguru==0.7.2
pip3 install trimesh==3.20.2
pip3 install xatlas==0.0.7
pip3 install "huggingface_hub[cli]"
python3 -c "from huggingface_hub.hf_api import HfFolder; HfFolder.save_token('Your hugging face api key')"

python pipeline_paint3d_stage1.py  --sd_config controlnet/config/depth_based_inpaint_template.yaml  --render_config paint3d/config/train_config_paint3d.py  --mesh_path demo/objs/Suzanne_monkey/Suzanne_monkey.obj  --outdir outputs/stage1
python pipeline_paint3d_stage2.py --sd_config controlnet/config/UV_based_inpaint_template.yaml --render_config paint3d/config/train_config_paint3d.py --mesh_path demo/objs/Suzanne_monkey/Suzanne_monkey.obj --texture_path outputs/stage1/res-0/albedo.png --outdir outputs/stage2
python pipeline_UV_only.py  --sd_config controlnet/config/UV_gen_template.yaml  --render_config paint3d/config/train_config_paint3d.py  --mesh_path demo/objs/teapot/scene.obj  --outdir outputs/test_teapot
python pipeline_paint3d_stage1.py  --sd_config controlnet/config/depth_based_inpaint_template.yaml  --render_config paint3d/config/train_config_paint3d.py  --mesh_path demo/objs/Suzanne_monkey/Suzanne_monkey.obj  --prompt " "  --ip_adapter_image_path demo/objs/Suzanne_monkey/img_prompt.png  --outdir outputs/img_stage1
python pipeline_paint3d_stage2.py --sd_config controlnet/config/UV_based_inpaint_template.yaml --render_config paint3d/config/train_config_paint3d.py --mesh_path demo/objs/Suzanne_monkey/Suzanne_monkey.obj --texture_path outputs/img_stage1/res-0/albedo.png --prompt " "  --ip_adapter_image_path demo/objs/Suzanne_monkey/img_prompt.png --outdir outputs/img_stage2
conda deactivate

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants