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

Add Nerf Studio Example #724

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft

Add Nerf Studio Example #724

wants to merge 3 commits into from

Conversation

nbardy
Copy link

@nbardy nbardy commented Apr 29, 2024

This adds a nerf studio example to modal.

Setting this up for myself and the build setup got a little complicated.

Type of Change

  • New example
  • Example updates (Bug fixes, new features, etc.)
  • Other (changes to the codebase, but not to examples)

Checklist

  • Example is testable in synthetic monitoring system, or lambda-test: false is added to example frontmatter (---)
    • Example is tested by executing with modal run or an alternative cmd is provided in the example frontmatter (e.g. cmd: ["modal", "deploy"])
    • Example is tested by running with no arguments or the args are provided in the example frontmatter (e.g. args: ["--prompt", "Formula for room temperature superconductor:"]
  • Example is documented with comments throughout, in a Literate Programming style.
  • Example does not require third-party dependencies to be installed locally
  • Example pins its dependencies
    • Example pins container images to a stable tag, not a dynamic tag like latest
    • Example specifies a python_version for the base image, if it is used
    • Example pins all dependencies to at least minor version, ~=x.y.z or ==x.y
    • Example dependencies with version < 1 are pinned to patch version, ==0.y.z

Outside contributors

You're great! Thanks for your contribution.

"pip install --upgrade pip",
)
.conda_install(
"nvidia::cuda-toolkit=12.4.1",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm kinda surprised this works? The host driver is 12.2.

Is a later step maybe installing the CUDA toolkit at <=12.2?

@charlesfrye
Copy link
Collaborator

Would love to get a NeRF example in!

The install does seem kinda messy though.

Looking at their docs, I see

pip install torch==2.1.2+cu118 torchvision==0.16.2+cu118 --extra-index-url https://download.pytorch.org/whl/cu118

Torch now bundles the CUDA toolkit, including nvcc, so the above should work to get you everything. Maybe it's just a matter of setting CUDA_HOME and symlinking?

I also don't think we to install the editable version of the library, since folks won't be editing the library on Modal.

So I think we can shrink this down to a few pip_installs -- one for main deps (torch, transformers, ninja), one for tiny-cuda-nn, one for nerfstudio, and maybe one more for kplanes-nerfstudio.

HMU in the Modal Slack if you want to pair on it for a bit.

@nbardy
Copy link
Author

nbardy commented Apr 29, 2024

dromni/nerfstudio

I ended up finding a docker image. I think this is probably the better way to do it.

I also don't think we to install the editable version of the library, since folks won't be editing the library on Modal.

I do want to fork the repo and develop on it from this setup. Probably should move that out to an optional flag to use a local version.

@charlesfrye
Hoping to pick this up in the evenings after work this week. But not so much time this week.

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

Successfully merging this pull request may close these issues.

None yet

2 participants