Skip to content

Commit

Permalink
Baseline agent Dockerfile update (#298)
Browse files Browse the repository at this point in the history
* added step to download pretrained checkpoints

* updated docs/challenge.md
  • Loading branch information
rpartsey authored Jul 26, 2023
1 parent 0b8d6bc commit 8dc5cbf
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/challenge.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ Make sure you have [Docker](https://docs.docker.com/engine/install/ubuntu/) with
```
docker system prune -a
```
*Note 2:* You can modify submission.sh file if your agent needs any custom modifications (e.g. command-line arguments). For example, agent type may be changed by changing `--agent_type` argument in the in the `./scripts/test_local.sh` or `projects/habitat_ovmm/eval_baselines_agent.py`. Otherwise, nothing to do. Default submission.sh is simply a call to agent in `agent.py`
*Note 2:* You can modify `submission.sh` file if your agent needs any custom modifications (e.g. command-line arguments). For example, agent type may be changed by changing `--agent_type` (and corresponding `--baseline_config_path`) argument in the `./scripts/test_local.sh` or `projects/habitat_ovmm/eval_baselines_agent.py`. Otherwise, nothing to do. Default submission.sh is simply a call to agent in `agent.py`

1. Download all the required data into the `home-robot/data` directory (see [Habitat OVMM readme](projects/habitat_ovmm/README.md)). Then in your `docker run` command mount `home-robot/data` data folder to the `home-robot/data` folder in the Docker image (see `./scripts/test_local.sh` for reference).

Expand Down
13 changes: 12 additions & 1 deletion projects/habitat_ovmm/docker/ovmm_baseline.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,23 @@ RUN /bin/bash -c "\
&& pip install -r src/home_robot/home_robot/perception/detection/detic/Detic/requirements.txt \
"

# download pretrained checkpoint
# download pretrained Detic checkpoint
RUN mkdir -p home-robot/src/home_robot/home_robot/perception/detection/detic/Detic/models && \
wget https://dl.fbaipublicfiles.com/detic/Detic_LCOCOI21k_CLIP_SwinB_896b32_4x_ft4x_max-size.pth \
-O home-robot/src/home_robot/home_robot/perception/detection/detic/Detic/models/Detic_LCOCOI21k_CLIP_SwinB_896b32_4x_ft4x_max-size.pth \
--no-check-certificate

# download pretrained skills
RUN /bin/bash -c "\
mkdir -p home-robot/data/checkpoints \
&& cd home-robot/data/checkpoints \
&& wget https://dl.fbaipublicfiles.com/habitat/data/baselines/v1/ovmm_baseline_home_robot_challenge_2023.zip \
-O ovmm_baseline_home_robot_challenge_2023.zip \
--no-check-certificate \
&& unzip ovmm_baseline_home_robot_challenge_2023.zip \
&& rm ovmm_baseline_home_robot_challenge_2023.zip \
"

# add baseline agent code
ADD eval_baselines_agent.py /home-robot/projects/habitat_ovmm/agent.py

Expand Down

0 comments on commit 8dc5cbf

Please sign in to comment.