update dockerfile to support onnxruntime

pull/15/head
Bruce MacDonald 2024-03-03 23:04:34 -05:00
parent cda0ea2f1a
commit 8d5c888cf9
1 changed files with 13 additions and 3 deletions

View File

@ -1,11 +1,21 @@
FROM python:3.11.6-alpine FROM python:3.12.2-slim-bookworm
# Install system dependencies required for Python packages
RUN apt-get update && apt-get install -y \
build-essential \
libffi-dev \
&& rm -rf /var/lib/apt/lists/*
RUN apk add --no-cache build-base libffi-dev
RUN pip install poetry RUN pip install poetry
WORKDIR /mnt WORKDIR /mnt
COPY pyproject.toml poetry.lock .
# Copy only the files needed for the poetry installation to avoid cache invalidation
COPY pyproject.toml poetry.lock ./
RUN poetry install --no-root --only main RUN poetry install --no-root --only main
# Copy the application
COPY . . COPY . .
ENTRYPOINT ["poetry", "run", "python", "discollama.py"] ENTRYPOINT ["poetry", "run", "python", "discollama.py"]