update dockerfile to support onnxruntime
parent
cda0ea2f1a
commit
8d5c888cf9
16
Dockerfile
16
Dockerfile
|
@ -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"]
|
||||||
|
|
Loading…
Reference in New Issue