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

Deploy the environment on the cpu #29

Open
tqlhq opened this issue Jul 18, 2023 · 5 comments
Open

Deploy the environment on the cpu #29

tqlhq opened this issue Jul 18, 2023 · 5 comments
Assignees
Labels
enhancement New feature or request

Comments

@tqlhq
Copy link

tqlhq commented Jul 18, 2023

How do I install nksr if I only have a cpu (no gpu) on my computer?

When I run the following code, I get the wrong nksr:

pip install -U nksr -f https://nksr.huangjh.tech/whl/torch-2.0.0+cpu.html

@heiwang1997
Copy link
Collaborator

Hey could you please let us know what are the error messages? What does pip tell you?

@tqlhq
Copy link
Author

tqlhq commented Jul 19, 2023

为了方便描述,我还是用中文吧。
我运行上面说的那行代码之后,终端显示下载成功,但显示下载的nksr版本是0.0.0 这个里面是没有代码里需要的库的。
但是如果我根据readme中提供的指令去下载:
pip install -U nksr -f https://nksr.huangjh.tech/whl/torch-2.0.0+cu118.html
我能得到正确的版本,但即使我根据文档内提供的代码:
device = torch.device("cpu")
reconstructor = nksr.Reconstructor(device)
reconstructor.chunk_tmp_device = torch.device("cpu")

input_xyz = ...
input_sensor = ...

field = reconstructor.reconstruct(
input_xyz, sensor=input_sensor, ...,
chunk_size=50.0, # This could be smaller
preprocess_fn=nksr.get_estimate_normal_preprocess_fn(64, 85.0)
)

Put everything onto CPU.

field.to_("cpu")
reconstructor.network.to("cpu")

[WARNING] Slow operation...

mesh = field.extract_dual_mesh(mise_iter=1)

即使我这样修改代码,运行后终端也会报错,大意是找不到nvidia驱动文件。
所以求问大佬,在只有cpu的机器上要怎么部署/运行nksr项目

@heiwang1997
Copy link
Collaborator

感谢你的描述哈,我大概明白了,确实我们写的时候没有考虑只有cpu的情况
我这几天试着弄个cpu的版本哈,稍等

@tqlhq
Copy link
Author

tqlhq commented Jul 19, 2023

好的好的
多谢大佬提供的帮助!!!!

@heiwang1997 heiwang1997 self-assigned this Jul 19, 2023
@heiwang1997 heiwang1997 added the enhancement New feature or request label Jul 19, 2023
@onesahbi
Copy link

onesahbi commented Oct 7, 2023

你好,我也遇到了下载了0.0.0的版本,然后不能使用的问题,请问对环境有跟电脑的配置有要求吗?例如只能在linux下运行或者pytorch和cude的版本要求

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

No branches or pull requests

3 participants