-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
32 lines (27 loc) · 1.57 KB
/
Copy pathDockerfile
File metadata and controls
32 lines (27 loc) · 1.57 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
FROM registry.insight-centre.org/sit/mps/docker-images/base-services-tf-gpu:latest
## install only the service requirements
ADD ./Pipfile /service/Pipfile
ADD ./requirements.txt /service/requirements.txt
ADD ./requirements-arm64.txt /service/requirements-arm64.txt
ADD ./multi-arch-pip-install.sh /service/multi-arch-pip-install.sh
ADD ./setup.py /service/setup.py
RUN mkdir -p /service/object_detection_service/ && \
touch /service/object_detection_service/__init__.py
WORKDIR /service
# Using requirements only, since pipenv is getting messy in the docker context... oh god, how I wanted to change to Poetry right now...
# RUN rm -f Pipfile.lock && pipenv lock -vvv && pipenv --rm && \
# pipenv install --system && \
# rm -rf /tmp/pip* /root/.cache
# RUN pip install -r requirements.txt -i https://pypi.org/simple --extra-index-url https://${SIT_PYPI_USER}:${SIT_PYPI_PASS}@sit-pypi.herokuapp.com/simple && \
# rm -rf /tmp/pip* /root/.cache
RUN ./multi-arch-pip-install.sh
## add all the rest of the code and install the actual package
## this should keep the cached layer above if no change to the pipfile or setup.py was done.
ADD . /service
RUN cd /service/tf_od_models/object_detection/models && \
wget --no-check-certificate 'https://docs.google.com/uc?export=download&id=16BE5E9VaQNlkwbWx2-bNT5MapT1rJ_OD' -O ssd_mobilenet_v1_coco_2017_11_17_rt.tar.gz && \
tar -xzf ssd_mobilenet_v1_coco_2017_11_17_rt.tar.gz && \
rm -f ssd_mobilenet_v1_coco_2017_11_17_rt.tar.gz
RUN pip install -e . && \
pip install -e ./tf_od_models && \
rm -rf /tmp/pip* /root/.cache