Skip to content

Commit

Permalink
chg: use inscriptis package rather than local build.
Browse files Browse the repository at this point in the history
  • Loading branch information
AlbertWeichselbraun committed Jan 16, 2024
1 parent 61b93f4 commit 789e0bc
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,8 @@
FROM python:3.11-slim-bullseye AS builder

WORKDIR /inscriptis
COPY requirements.txt .
RUN python -m venv .venv && .venv/bin/python -m pip install --upgrade pip
RUN .venv/bin/pip install --no-cache-dir -r requirements.txt && \
.venv/bin/pip install --no-cache-dir Flask waitress && \
RUN .venv/bin/pip install --no-cache-dir inscriptis[web-service] && \
find /inscriptis/.venv \( -type d -a -name test -o -name tests \) -o \( -type f -a -name '*.pyc' -o -name '*.pyo' \) -exec rm -rf '{}' \+

#
Expand All @@ -18,10 +16,9 @@ LABEL maintainer="[email protected]"

# Note: only copy the src directory, to prevent bloating the image with
# irrelevant files from the project directory.
WORKDIR /inscriptis/src
WORKDIR /inscriptis
COPY --from=builder /inscriptis /inscriptis
COPY ./src /inscriptis/src

ENV PATH="/inscriptis/.venv/bin:$PATH"
CMD ["waitress-serve", "inscriptis.service.web:app", "--port=5000", "--host=0.0.0.0"]
CMD ["uvicorn", "inscriptis.service.web:app", "--port=5000", "--host=0.0.0.0"]
EXPOSE 5000

0 comments on commit 789e0bc

Please sign in to comment.