-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chg: use inscriptis package rather than local build.
- Loading branch information
1 parent
61b93f4
commit 789e0bc
Showing
1 changed file
with
3 additions
and
6 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 |
---|---|---|
|
@@ -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 '{}' \+ | ||
|
||
# | ||
|
@@ -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 |