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

Problems with dependencies and environment #20

Closed
levnikolaevich opened this issue Apr 12, 2024 · 7 comments
Closed

Problems with dependencies and environment #20

levnikolaevich opened this issue Apr 12, 2024 · 7 comments

Comments

@levnikolaevich
Copy link

levnikolaevich commented Apr 12, 2024

Good afternoon!

I tried to set up the environment on a clean Ubuntu 20.04 (wsl Windows 11), following the instructions:

git clone https://github.com/River-Zhang/SIFU.git
sudo apt-get install libeigen3-dev ffmpeg
cd SIFU
conda env create -f environment.yaml
conda activate sifu
pip install -r requirements.txt

However, I encountered several missing dependencies, conflicts, and other issues. For example, I needed to first install build essentials with:
sudo apt-get install build-essential

And for the mlt package, it is necessary to install version 2024.0.0, otherwise, an error occurs pytorch/pytorch#123097.

Eventually, I forked the repository https://github.com/levnikolaevich/SIFU and tried to fix the packages, but I gave up when I encountered an error trying to execute the command:

python -m apps.infer -cfg ./configs/sifu.yaml -gpu 0 -in_dir ./examples -out_dir ./results -loop_smpl 100 -loop_cloth 200 -hps_type pixie

The error message was:

Traceback (most recent call last):
  File "/home/lev/miniconda3/envs/sifu/lib/python3.8/runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/home/lev/miniconda3/envs/sifu/lib/python3.8/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/home/lev/SIFU/apps/infer.py", line 30, in <module>
    from lib.common.render import query_color, image2vid
  File "/home/lev/SIFU/lib/common/render.py", line 17, in <module>
    from pytorch3d.renderer import (
  File "/home/lev/miniconda3/envs/sifu/lib/python3.8/site-packages/pytorch3d/renderer/__init__.py", line 3, in <module>
    from .blending import (
  File "/home/lev/miniconda3/envs/sifu/lib/python3.8/site-packages/pytorch3d/renderer/blending.py", line 9, in <module>
    from pytorch3d import _C
ImportError: libcudart.so.10.1: cannot open shared object file: No such file or directory

=============

Could you please commit an environment.yml file created with the command in an environment where everything works for you?

conda env export > environment.yml

Then, you can remove the requirements.txt file, which currently lists the package pymeshlab twice.

Thank you in advance, and congratulations on your acceptance to CVPR 2024!

@River-Zhang
Copy link
Owner

River-Zhang commented Apr 14, 2024

Hi @levnikolaevich , I'm sorry that the environment setting wasted you too much time. I'll examine this as soon as possible. Here is the content in environment.yml when I use conda env export > environment.yml:
environment.zip

@levnikolaevich
Copy link
Author

@River-Zhang , thank you very much!!

@levnikolaevich
Copy link
Author

levnikolaevich commented Apr 20, 2024

@River-Zhang, hello! This is what ultimately worked on a clean Ubuntu 20.04. It might be useful if you decide to update the instructions:

sudo apt-get update && \
sudo apt-get upgrade -y && \
sudo apt-get install unzip libeigen3-dev ffmpeg build-essential nvidia-cuda-toolkit
mkdir -p ~/miniconda3 && \
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda3/miniconda.sh && \
bash ~/miniconda3/miniconda.sh -b -u -p ~/miniconda3 && \
rm -rf ~/miniconda3/miniconda.sh && \
~/miniconda3/bin/conda init bash && \
~/miniconda3/bin/conda init zsh

========= close and re-open current shell =========

git clone https://github.com/River-Zhang/SIFU.git
cd SIFU

-->add "mkl=2024.0.0" in the "environment.yaml" pytorch/pytorch#123097

conda env create -f environment.yaml 
conda activate sifu

changes in requirements.txt:
--> delete "pymeshlab" (because there is "pymeshlab==2022.2.post4")
--> change git+https://github.com/YuliangXiu/rembg.git@hf --> git+https://github.com/YuliangXiu/rembg.git (because there is no longer a tag "hf")
--> add open3d==0.17.0 mediapipe einops gdown
--> set numpy==1.24.4
because of "ImportError: numpy.core.multiarray failed to import (auto-generated because you didn't call 'numpy.import_array()' after cimporting numpy; use 'numpy._import_array' to disable if you are certain you don't need it)."

pip install -r requirements.txt

@levnikolaevich
Copy link
Author

And to be honest, I would specify more clearly that you need to run the fetch_hps.sh and fetch_data.sh scripts to download the necessary data. As a newcomer, I honestly didn't understand this right away =))

Thank you in advance!

@River-Zhang
Copy link
Owner

Thanks very much for your valuable suggestions! We'll update that as soon as possible! Thanks very much!

@River-Zhang
Copy link
Owner

@levnikolaevich The installation has been updated. Thanks sincerely again!

@levnikolaevich
Copy link
Author

@River-Zhang , thank you very much! good luck!

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