Skip to content

Commit 609f74e

Browse files
authored
infra: Add PIP_VERSION ARG in dockerfile (#12)
Adding PIP_VERSION as a dockerfile ARG. Docker image has been built successfully locally with this update. Reference: https://unstructured-ai.atlassian.net/browse/CORE-512
1 parent 96c709a commit 609f74e

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

Dockerfile

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ FROM centos:centos7.9.2009
66
# https://mybinder.readthedocs.io/en/latest/tutorials/dockerfile.html
77
ARG NB_USER=notebook-user
88
ARG NB_UID=1000
9+
ARG PIP_VERSION
910

1011
RUN yum -y update && \
1112
yum -y install poppler-utils xz-devel which
@@ -41,9 +42,10 @@ COPY requirements/base.txt requirements-base.txt
4142
COPY unstructured_inference unstructured_inference
4243

4344
# NOTE(crag) - Cannot use an ARG in the dst= path (so it seems), hence no ${NB_USER}, ${NB_UID}
44-
RUN python3.8 -m pip install --no-cache -r requirements-base.txt \
45-
&& python3.8 -m pip install --no-cache -r requirements-dev.txt \
46-
&& python3.8 -m pip install --no-cache "detectron2@git+https://github.com/facebookresearch/[email protected]#egg=detectron2" \
45+
RUN python3.8 -m pip install pip==${PIP_VERSION} \
46+
&& pip3.8 install --no-cache -r requirements-base.txt \
47+
&& pip3.8 install --no-cache -r requirements-dev.txt \
48+
&& pip3.8 install --no-cache "detectron2@git+https://github.com/facebookresearch/[email protected]#egg=detectron2" \
4749
&& python3.8 -c "import unstructured_inference.models.detectron2 as detectron2; detectron2.load_default_model()"
4850

4951
EXPOSE 5000

0 commit comments

Comments
 (0)