mirror of
https://github.com/arc53/DocsGPT
synced 2024-11-17 21:26:26 +00:00
Update Dockerfile
This commit is contained in:
parent
5c2a537393
commit
46f7dfc568
@ -1,10 +1,19 @@
|
|||||||
FROM python:3.9
|
FROM python:3.11-slim-bullseye as builder
|
||||||
|
|
||||||
|
# Tiktoken requires Rust toolchain, so build it in a separate stage
|
||||||
|
RUN apt-get update && apt-get install -y gcc curl
|
||||||
|
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y && apt-get install --reinstall libc6-dev -y
|
||||||
|
ENV PATH="/root/.cargo/bin:${PATH}"
|
||||||
|
RUN pip install --upgrade pip && pip install tiktoken==0.1.2
|
||||||
|
|
||||||
|
FROM python:3.11-slim-bullseye
|
||||||
|
# Copy pre-built packages from builder stage
|
||||||
|
COPY --from=builder /usr/local/lib/python3.11/site-packages/ /usr/local/lib/python3.11/site-packages/
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY . /app
|
COPY . /app
|
||||||
RUN pip install --no-cache-dir -r requirements.txt
|
|
||||||
ENV FLASK_APP=app.py
|
ENV FLASK_APP=app.py
|
||||||
ENV FLASK_ENV=development
|
ENV FLASK_ENV=development
|
||||||
|
RUN pip install -r requirements.txt
|
||||||
|
|
||||||
EXPOSE 5000
|
EXPOSE 5000
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user