Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Aishwarya Padmakumar
committed
Jan 4, 2022
1 parent
8e257f7
commit 5554f02
Showing
57 changed files
with
4,873 additions
and
78 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,4 +8,5 @@ build | |
dist | ||
*.egg-info/ | ||
src/teach/analysis/.ipynb_checkpoints/ | ||
pip-wheel-metadata/ | ||
pip-wheel-metadata/ | ||
*.pyc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
FROM ubuntu:18.04 | ||
|
||
# install python3.8 | ||
RUN apt update && \ | ||
apt install --no-install-recommends -y build-essential software-properties-common && \ | ||
add-apt-repository -y ppa:deadsnakes/ppa && \ | ||
apt install --no-install-recommends -y python3.8 python3.8-dev python3.8-distutils && \ | ||
apt clean && rm -rf /var/lib/apt/lists/* | ||
|
||
# register the version in alternatives and set higher priority to 3.8 | ||
RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.6 1 | ||
RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.8 2 | ||
|
||
RUN apt update && DEBIAN_FRONTEND=noninteractive apt install -y --no-install-recommends \ | ||
ffmpeg \ | ||
vim \ | ||
curl | ||
|
||
# upgrade pip to latest version | ||
RUN curl -s https://bootstrap.pypa.io/get-pip.py -o get-pip.py && \ | ||
python3 get-pip.py --force-reinstall && \ | ||
rm get-pip.py | ||
|
||
COPY ./requirements.txt ./requirements.txt | ||
RUN pip install -r requirements.txt | ||
|
||
# copy all source code into the image | ||
COPY . . | ||
|
||
ENV PYTHONPATH /src | ||
RUN pip install -e . | ||
|
||
# Download AI2Thor executable | ||
RUN python3 -c "from teach.settings import get_settings; from teach.simulators.simulator_THOR import COMMIT_ID, TEAChController; TEAChController(base_dir=get_settings().AI2THOR_BASE_DIR, download_only=True, commit_id=COMMIT_ID);" | ||
|
||
CMD ["/bin/bash"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
FROM python:3.8 | ||
ARG MODEL_VARIANT et | ||
|
||
# download model files into et_models and copy over | ||
RUN mkdir -p et_models | ||
COPY models/baseline_models/$MODEL_VARIANT et_models | ||
|
||
# Download Faster RCNN and Mask RCNN and copy over | ||
RUN mkdir -p et_pretrained_models | ||
COPY models/et_pretrained_models et_pretrained_models | ||
|
||
# upgrade pip to latest version | ||
RUN curl -s https://bootstrap.pypa.io/get-pip.py -o get-pip.py && \ | ||
python3 get-pip.py --force-reinstall && \ | ||
rm get-pip.py | ||
|
||
COPY ./requirements.txt ./requirements.txt | ||
RUN pip install -r requirements.txt | ||
COPY . . | ||
RUN pip install -e . | ||
EXPOSE 5000 | ||
|
||
ENV ET_ROOT=/src/teach/modeling/ET/ | ||
ENV PYTHONPATH=/src:$ET_ROOT | ||
ENV SPLIT=valid_seen | ||
|
||
CMD teach_api --model_module teach.inference.et_model --model_class ETModel --data_dir /data --images_dir /images \ | ||
--split $SPLIT --visual_checkpoint /et_pretrained_models/fasterrcnn_model.pth \ | ||
--object_predictor /et_pretrained_models/maskrcnn_model.pth --model_dir /et_models |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
FROM python:3.8 | ||
|
||
# upgrade pip to latest version | ||
RUN curl -s https://bootstrap.pypa.io/get-pip.py -o get-pip.py && \ | ||
python3 get-pip.py --force-reinstall && \ | ||
rm get-pip.py | ||
|
||
COPY ./requirements.txt ./requirements.txt | ||
RUN pip install -r requirements.txt | ||
COPY . . | ||
RUN pip install -e . | ||
EXPOSE 5000 | ||
|
||
ENV SPLIT=valid_seen | ||
|
||
CMD teach_api --model_module teach.inference.sample_model --model_class SampleModel --data_dir /data --images_dir /images --split $SPLIT --seed 4 |
Oops, something went wrong.