mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-12-07 00:09:14 +08:00
Make awscli an optional dependency (#3279)
* removed awscli from deps + added warning during attempted download. * update docs to flag manual awscli install to users. * add awscli to dev dependencies * add proper awscli error handling to ns-download-data * minor typing fix for ns-download-data when awscli is not installed
This commit is contained in:
1 parent
f97eb2e5f0
commit
592615ff51
4 files changed
+47
-4
No files matched your search
@@ -17,6 +17,7 @@ ns-download-data blender
|
|||||||
ns-download-data nerfstudio --capture-name nerfstudio-dataset
|
ns-download-data nerfstudio --capture-name nerfstudio-dataset
|
||||||
|
|
||||||
# Download a few room-scale scenes from the EyefulTower dataset at different resolutions
|
# Download a few room-scale scenes from the EyefulTower dataset at different resolutions
|
||||||
|
pip install awscli # Install `awscli` for EyefulTower downloads.
|
||||||
ns-download-data eyefultower --capture-name riverview seating_area apartment --resolution-name jpeg_1k jpeg_2k
|
ns-download-data eyefultower --capture-name riverview seating_area apartment --resolution-name jpeg_1k jpeg_2k
|
||||||
|
|
||||||
# Download the full D-NeRF dataset of dynamic synthetic scenes
|
# Download the full D-NeRF dataset of dynamic synthetic scenes
|
||||||
@@ -87,3 +88,10 @@ In the tables below, each dataset was placed into a bucket based on the table's
|
|||||||
[record3d]: https://record3d.app/
|
[record3d]: https://record3d.app/
|
||||||
[sdfstudio]: https://github.com/autonomousvision/sdfstudio/blob/master/docs/sdfstudio-data.md#Existing-dataset
|
[sdfstudio]: https://github.com/autonomousvision/sdfstudio/blob/master/docs/sdfstudio-data.md#Existing-dataset
|
||||||
[sitcoms3d]: https://github.com/ethanweber/sitcoms3D/blob/master/METADATA.md
|
[sitcoms3d]: https://github.com/ethanweber/sitcoms3D/blob/master/METADATA.md
|
||||||
|
|
||||||
|
### Eyeful Tower
|
||||||
|
Downloading Eyeful Tower scenes requires installing the AWS CLI, an optional dependency. To do so, run:
|
||||||
|
```bash
|
||||||
|
conda activate nerfstudio
|
||||||
|
pip install awscli
|
||||||
|
```
|
||||||
@@ -32,7 +32,6 @@ import tyro
|
|||||||
from typing_extensions import Annotated
|
from typing_extensions import Annotated
|
||||||
|
|
||||||
from nerfstudio.process_data import process_data_utils
|
from nerfstudio.process_data import process_data_utils
|
||||||
from nerfstudio.scripts.downloads.eyeful_tower import EyefulTowerDownload
|
|
||||||
from nerfstudio.scripts.downloads.utils import DatasetDownload
|
from nerfstudio.scripts.downloads.utils import DatasetDownload
|
||||||
from nerfstudio.utils import install_checks
|
from nerfstudio.utils import install_checks
|
||||||
from nerfstudio.utils.scripts import run_command
|
from nerfstudio.utils.scripts import run_command
|
||||||
@@ -551,10 +550,40 @@ Commands = Union[
|
|||||||
Annotated[SDFstudioDemoDownload, tyro.conf.subcommand(name="sdfstudio")],
|
Annotated[SDFstudioDemoDownload, tyro.conf.subcommand(name="sdfstudio")],
|
||||||
Annotated[NeRFOSRDownload, tyro.conf.subcommand(name="nerfosr")],
|
Annotated[NeRFOSRDownload, tyro.conf.subcommand(name="nerfosr")],
|
||||||
Annotated[Mill19Download, tyro.conf.subcommand(name="mill19")],
|
Annotated[Mill19Download, tyro.conf.subcommand(name="mill19")],
|
||||||
Annotated[EyefulTowerDownload, tyro.conf.subcommand(name="eyefultower")],
|
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
@dataclass
|
||||||
|
class NotInstalled(DatasetDownload):
|
||||||
|
def main(self) -> None: ...
|
||||||
|
|
||||||
|
|
||||||
|
# Add eyefultower subcommand if awscli is installed.
|
||||||
|
try:
|
||||||
|
import awscli
|
||||||
|
except ImportError:
|
||||||
|
awscli = None
|
||||||
|
|
||||||
|
if awscli is not None:
|
||||||
|
from nerfstudio.scripts.downloads.eyeful_tower import EyefulTowerDownload
|
||||||
|
|
||||||
|
Commands = Union[
|
||||||
|
Commands,
|
||||||
|
Annotated[EyefulTowerDownload, tyro.conf.subcommand(name="eyefultower")],
|
||||||
|
]
|
||||||
|
else:
|
||||||
|
Commands = Union[
|
||||||
|
Commands,
|
||||||
|
Annotated[
|
||||||
|
NotInstalled,
|
||||||
|
tyro.conf.subcommand(
|
||||||
|
name="eyefultower",
|
||||||
|
description="**Not installed.** Downloading EyefulTower data requires `pip install awscli`.",
|
||||||
|
),
|
||||||
|
],
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
def main(
|
def main(
|
||||||
dataset: DatasetDownload,
|
dataset: DatasetDownload,
|
||||||
):
|
):
|
||||||
|
|||||||
@@ -16,15 +16,21 @@
|
|||||||
import collections
|
import collections
|
||||||
import copy
|
import copy
|
||||||
import json
|
import json
|
||||||
|
import sys
|
||||||
import xml.etree.ElementTree as ET
|
import xml.etree.ElementTree as ET
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from typing import TYPE_CHECKING, Tuple
|
from typing import TYPE_CHECKING, Tuple
|
||||||
|
|
||||||
import awscli.clidriver
|
|
||||||
import numpy as np
|
import numpy as np
|
||||||
import tyro
|
import tyro
|
||||||
|
|
||||||
|
try:
|
||||||
|
import awscli.clidriver
|
||||||
|
except ImportError:
|
||||||
|
print("awscli is required for EyefulTower download. Please install it with `pip install awscli`.")
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
from nerfstudio.scripts.downloads.utils import DatasetDownload
|
from nerfstudio.scripts.downloads.utils import DatasetDownload
|
||||||
from nerfstudio.utils.rich_utils import CONSOLE
|
from nerfstudio.utils.rich_utils import CONSOLE
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -16,7 +16,6 @@ classifiers = [
|
|||||||
dependencies = [
|
dependencies = [
|
||||||
"appdirs>=1.4",
|
"appdirs>=1.4",
|
||||||
"av>=9.2.0",
|
"av>=9.2.0",
|
||||||
"awscli>=1.31.10",
|
|
||||||
"comet_ml>=3.33.8",
|
"comet_ml>=3.33.8",
|
||||||
"cryptography>=38",
|
"cryptography>=38",
|
||||||
"tyro>=0.6.6",
|
"tyro>=0.6.6",
|
||||||
@@ -104,6 +103,7 @@ dev = [
|
|||||||
"projectaria-tools>=1.3.1; sys_platform != 'win32'",
|
"projectaria-tools>=1.3.1; sys_platform != 'win32'",
|
||||||
# pin torch to <=2.1 to fix https://github.com/pytorch/pytorch/issues/118736
|
# pin torch to <=2.1 to fix https://github.com/pytorch/pytorch/issues/118736
|
||||||
"torch>=1.13.1,<2.2",
|
"torch>=1.13.1,<2.2",
|
||||||
|
"awscli==1.33.18"
|
||||||
]
|
]
|
||||||
|
|
||||||
# Documentation related packages
|
# Documentation related packages
|
||||||
|
|||||||
Reference in new issue
Block a user