Skip to content

Track Habitat pre-trained models using Git LFS #7

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

Merged
merged 5 commits into from
Sep 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ analyzer/habitat/data/LICENSE
analyzer/habitat/data/NOTICE
analyzer/habitat/data/README.md
analyzer/habitat/data/kernels.sqlite
analyzer/habitat/data/**/*.pth

# Python
*.pyc
Expand Down
17 changes: 4 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,25 +49,18 @@ Prerequsites:
- A system equiped with an Nvidia GPU with properly configured CUDA
- [CUDA Toolkit](https://developer.nvidia.com/cuda-toolkit-archive)
- [cmake v3.17+](https://github.com/Kitware/CMake/releases)
- [Habitat pre-trained models](https://zenodo.org/record/4876277)
- [Git Large File Storage](https://git-lfs.github.com/) - which contains pre-trained habitat models

```zsh
git clone https://github.com/CentML/habitat.git && cd habitat
git submodule init && git submodule update

# Download the pre-trained models
cd analyzer
curl -O https://zenodo.org/record/4876277/files/habitat-models.tar.gz\?download\=1

# Install the models
./extract-models.sh
```

**Note:** Habitat needs access to your GPU's performance counters, which requires special permissions if you are running with a recent driver (418.43 or later). If you encounter a `CUPTI_ERROR_INSUFFICIENT_PRIVILEGES` error when running Habitat, please follow the instructions [here](https://developer.nvidia.com/ERR_NVGPUCTRPERM) and in [issue #5](https://github.com/geoffxy/habitat/issues/5).

### Building with Docker

Habitat has been tested to work on the latest version of [NVIDIA NGC PyTorch containers](https://catalog.ngc.nvidia.com/orgs/nvidia/containers/pytorch).
Habitat has been tested to work on the latest version of [NVIDIA NGC PyTorch containers](https://catalog.ngc.nvidia.com/orgs/nvidia/containers/pytorch).

1. To build Habitat with Docker, first run the NGC container.
```bash
Expand All @@ -78,7 +71,6 @@ docker run --gpus all -it --rm nvcr.io/nvidia/pytorch:22.08-py3
git clone --recursive https://github.com/centml/habitat
./habitat/analyzer/install-dev.sh
```
3. Download and extract the pretrained models by following the steps in the previous section.

### Building without Docker

Expand All @@ -87,10 +79,10 @@ git clone --recursive https://github.com/centml/habitat
CUPTI is a profiling interface required by Habitat. Select the correct version of CUDA [here](https://developer.nvidia.com/cuda-toolkit-archive) and following the instructions to add NVIDIA's repository. Then, install CUPTI with:
```bash
sudo apt-get install cuda-cupti-11-x
```
```
where `11-x` represents the version of CUDA you have installed.

2. Install `CMake` 3.17+.
2. Install `CMake` 3.17+.

Follow these steps to download and install a precompiled version of CMake:
```bash
Expand All @@ -109,7 +101,6 @@ cmake --version
git clone https://github.com/centml/habitat
./habitat/analyzer/install-dev.sh
```
4. Download and extract the pretrained models by following the steps in the previous section.

<h2 id="getting-started">Usage example</h2>

Expand Down
20 changes: 0 additions & 20 deletions analyzer/extract-models.sh

This file was deleted.

1 change: 1 addition & 0 deletions analyzer/habitat/data/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.pth filter=lfs diff=lfs merge=lfs -text
3 changes: 3 additions & 0 deletions analyzer/habitat/data/bmm/model.pth
Git LFS file not shown
8 changes: 4 additions & 4 deletions analyzer/habitat/data/checksums
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
d445af3308bc67a087446bed3d7c160fcde458cb bmm/model.pth
b7c4a4ccd2a447a6a9d63e6658461f1f1a9dc08b conv2d/model.pth
b2c102539c05fd9169774c9fc32f0732a82b679e bmm/model.pth
376bd8d9233c3384be01e638191e842ebc212f5f conv2d/model.pth
659a00c6cff529613b40d5166fe7d93f42e8327d kernels.sqlite
930d5a79b35755ae7a8ab72a9b5585423dc02ab7 linear/model.pth
2da58bcea595de031584da214b29510b9e897466 lstm/model.pth
9f17fb74321fe1a82d9d647cd8c976b724b69a94 linear/model.pth
ef93bb74178d38660b31ac0bef262c39b1e6ba16 lstm/model.pth
3 changes: 3 additions & 0 deletions analyzer/habitat/data/conv2d/model.pth
Git LFS file not shown
3 changes: 3 additions & 0 deletions analyzer/habitat/data/linear/model.pth
Git LFS file not shown
3 changes: 3 additions & 0 deletions analyzer/habitat/data/lstm/model.pth
Git LFS file not shown