Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/docker container #413

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
FROM python:3.10-bookworm

SHELL [ "/bin/bash", "-c" ]

ENV SHELL=/bin/bash
ENV POETRY_HOME=/etc/poetry
ENV PATH="$POETRY_HOME/venv/bin:$PATH"

RUN apt update && apt upgrade -y
RUN apt install libgl1 -y

RUN apt install python3-pip pipx -y
RUN apt autoremove -y
RUN apt autoclean -y
RUN curl -sSL https://install.python-poetry.org | POETRY_HOME=/etc/poetry python3 -

WORKDIR /usr/src/marker
COPY marker marker
COPY pyproject.toml .
RUN poetry env use $(which python3)
RUN poetry install --verbose -v

COPY marker_server.py .

EXPOSE 80
CMD ["poetry", "run", "python", "marker_server.py", "--port","80"]
10 changes: 10 additions & 0 deletions compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: "3"

services:
marker-pdf:
image: datalab/maker:latest
container_name: marker-pdf
build:
context: .
ports:
- "8080:80"
Loading