forked from dusty-nv/jetson-containers
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.sh
More file actions
executable file
·34 lines (28 loc) · 1.23 KB
/
build.sh
File metadata and controls
executable file
·34 lines (28 loc) · 1.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/usr/bin/env bash
set -ex
# Clone the repository if it doesn't exist
if [ ! -d /opt/nerfstudio ]; then
echo "Cloning Nerfstudio version ${NERFSTUDIO_VERSION}"
git clone --branch=v${NERFSTUDIO_VERSION} --depth=1 --recursive https://github.com/nerfstudio-project/nerfstudio /opt/nerfstudio ||
git clone --depth=1 --recursive https://github.com/nerfstudio-project/nerfstudio /opt/nerfstudio
fi
echo "Installing build dependencies..."
uv pip install scikit-build-core ninja # ninja is often needed too
cd /opt/nerfstudio
uv pip install --reinstall blinker
sed -i 's/==/>=/g' pyproject.toml
uv pip install cmake open3d
uv pip install --reinstall blinker
uv build --wheel . --out-dir /opt/nerfstudio/wheels # Create the wheel package
# Verify the contents of the /opt directory
ls /opt/nerfstudio/wheels
# Return to the root directory
cd /
uv pip install manifold3d vhacdx openexr
uv pip install --reinstall blinker
uv pip install /opt/nerfstudio/wheels/nerfstudio*.whl
ns-install-cli --mode install
cd /opt/nerfstudio
uv pip install -U --force-reinstall opencv-python-contrib
# Optionally upload to a repository using Twine
twine upload --verbose /opt/nerfstudio/wheels/nerfstudio*.whl || echo "Failed to upload wheel to ${TWINE_REPOSITORY_URL}"