Skip to content

Commit

Permalink
Some changes to download routines.
Browse files Browse the repository at this point in the history
  • Loading branch information
cgokmen committed Dec 15, 2022
1 parent 7386541 commit 8a6c662
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 18 deletions.
1 change: 1 addition & 0 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ RUN micromamba install -c conda-forge opencv
# Install OmniGibson
RUN pip install -e .

RUN echo "python -m omnigibson.scripts.setup" >> /root/.bashrc
ENTRYPOINT []

CMD ["/bin/bash"]
8 changes: 4 additions & 4 deletions docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ See [here](https://www.pugetsystems.com/labs/hpc/how-to-setup-nvidia-docker-and-
2. Build the container. **From the OmniGibson root**, run: `./docker/build_docker.sh`

3. Run the container
* To get a shell inside a container with GUI: `./docker/run_docker_gui.sh`
* To get a jupyter notebook: `./docker/run_docker_notebook.sh`
* To get access to a shell inside a headless container `./docker/run_docker.sh`
* To get a shell inside a container with GUI: `sudo ./docker/run_docker_gui.sh`
* To get a jupyter notebook: `sudo ./docker/run_docker_notebook.sh`
* To get access to a shell inside a headless container `sudo ./docker/run_docker.sh`

# Development
To push a Docker container, run: `./docker/push_docker.sh`
To push a Docker container, run: `sudo ./docker/push_docker.sh`
22 changes: 10 additions & 12 deletions omnigibson/scripts/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,17 @@ def main():
print()

# Only download if the dataset path doesn't exist
if os.path.exists(og.og_dataset_path):
return

print("Downloading dataset...")
dataset_options = {
"Demo": "Download the demo OmniGibson dataset",
"Full": "Download the full OmniGibson dataset",
}
dataset = choose_from_options(options=dataset_options, name="dataset")
if dataset == "Demo":
if not os.path.exists(og.og_dataset_path):
print("Downloading dataset...")
# dataset_options = {
# "Demo": "Download the demo OmniGibson dataset",
# "Full": "Download the full OmniGibson dataset",
# }
# dataset = choose_from_options(options=dataset_options, name="dataset")
# if dataset == "Demo":
download_demo_data()
else:
download_og_dataset()
# else:
# download_og_dataset()

print("Downloading assets...")
download_assets()
Expand Down
3 changes: 1 addition & 2 deletions omnigibson/utils/asset_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -283,8 +283,7 @@ def download_assets():
Download OmniGibson assets
"""
if os.path.exists(og.assets_path):
print("Assets path already exists. Please either remove or change the asset path location from "
"omnigibson/global_config.yaml")
print("Assets already downloaded.")
else:
tmp_file = os.path.join(tempfile.gettempdir(), "og_assets.tar.gz")
os.makedirs(os.path.dirname(og.assets_path), exist_ok=True)
Expand Down

0 comments on commit 8a6c662

Please sign in to comment.