Upgrade Python to 3.12 and update pip/setuptools in Dockerfile
• Upgrade base image to Python 3.12 • Update pip, setuptools, wheel
This commit is contained in:
parent
bac946fd98
commit
b815e47f7c
1 changed files with 8 additions and 2 deletions
10
Dockerfile
10
Dockerfile
|
|
@ -1,8 +1,11 @@
|
|||
# Build stage
|
||||
FROM python:3.11-slim AS builder
|
||||
FROM python:3.12-slim AS builder
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Upgrade pip、setuptools and wheel to the latest version
|
||||
RUN pip install --upgrade pip setuptools wheel
|
||||
|
||||
# Install Rust and required build dependencies
|
||||
RUN apt-get update && apt-get install -y \
|
||||
curl \
|
||||
|
|
@ -30,10 +33,13 @@ RUN pip install --user --no-cache-dir openai ollama tiktoken
|
|||
RUN pip install --user --no-cache-dir pypdf2 python-docx python-pptx openpyxl
|
||||
|
||||
# Final stage
|
||||
FROM python:3.11-slim
|
||||
FROM python:3.12-slim
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Upgrade pip and setuptools
|
||||
RUN pip install --upgrade pip setuptools wheel
|
||||
|
||||
# Copy only necessary files from builder
|
||||
COPY --from=builder /root/.local /root/.local
|
||||
COPY ./lightrag ./lightrag
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue