update the auto-setup process for docker

This commit is contained in:
cremebrule 2023-08-06 22:57:45 -07:00
parent 42db845e14
commit 520ef3abfe
2 changed files with 21 additions and 18 deletions

View File

@ -8,4 +8,4 @@ WORKDIR /omnigibson-src
RUN micromamba run -n omnigibson pip install -e .
# Add setup to be executed on bash launch
RUN echo "OMNIGIBSON_NO_OMNIVERSE=1 python -m omnigibson.scripts.setup" >> /root/.bashrc
RUN echo "OMNIGIBSON_NO_OMNIVERSE=1 python scripts/download_datasets.py" >> /root/.bashrc

View File

@ -10,25 +10,28 @@ import click
def main():
# Ask user which dataset to install
print(f"OmniGibson will now install data under the following locations:")
print(f" dataset (~22GB): {gm.DATASET_PATH}")
print(f" assets (~1.5GB): {gm.ASSET_PATH}")
print(f"If you want to install data under a different path, please change the DATA_PATH variable in omnigibson/macros.py and rerun scripts/download_dataset.py.")
if click.confirm("Do you want to continue?"):
# Only download if the dataset path doesn't exist
if not os.path.exists(gm.DATASET_PATH):
print("Downloading dataset...")
download_og_dataset()
# Only execute if the dataset path or asset path does not exist
dataset_exists, assets_exist = os.path.exists(gm.DATASET_PATH), os.path.exists(gm.ASSET_PATH)
if not (dataset_exists and assets_exist):
# Ask user which dataset to install
print(f"OmniGibson will now install data under the following locations:")
print(f" dataset (~25GB): {gm.DATASET_PATH}")
print(f" assets (~2.5GB): {gm.ASSET_PATH}")
print(f"If you want to install data under a different path, please change the DATA_PATH variable in omnigibson/macros.py and rerun scripts/download_dataset.py.")
if click.confirm("Do you want to continue?"):
# Only download if the dataset path doesn't exist
if not dataset_exists:
print("Downloading dataset...")
download_og_dataset()
# Only download if the asset path doesn't exist
if not os.path.exists(gm.ASSET_PATH):
print("Downloading assets...")
download_assets()
# Only download if the asset path doesn't exist
if not assets_exist:
print("Downloading assets...")
download_assets()
print("\nOmniGibson setup completed!\n")
else:
print("You chose not to install dataset for now. You can install it later by running python scripts/download_dataset.py.")
print("\nOmniGibson setup completed!\n")
else:
print("You chose not to install dataset for now. You can install it later by running python scripts/download_dataset.py.")
if __name__ == "__main__":