-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathDockerfile
More file actions
31 lines (21 loc) · 807 Bytes
/
Copy pathDockerfile
File metadata and controls
31 lines (21 loc) · 807 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
FROM nvcr.io/nvidia/cuda:12.6.3-cudnn-runtime-ubuntu22.04
ENV DEBIAN_FRONTEND=noninteractive
ENV PYTHONUNBUFFERED=1
ENV DISABLE_MODEL_SOURCE_CHECK=True
ENV PADDLE_PDX_DISABLE_MODEL_SOURCE_CHECK=True
RUN apt-get update && apt-get install -y --no-install-recommends \
python3 python3-pip python3-dev \
libgl1-mesa-glx libglib2.0-0 libgomp1 libmagic1 \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
RUN pip3 install --no-cache-dir paddlepaddle-gpu==3.2.2 \
--index-url https://www.paddlepaddle.org.cn/packages/stable/cu126/
COPY requirements.txt .
RUN pip3 install --no-cache-dir -r requirements.txt && \
pip3 install --no-cache-dir "paddlex[ocr]"
COPY app ./app
ENV FLAGS_use_stream_safe_cuda_allocator=false
VOLUME /data
EXPOSE 8000
ENTRYPOINT []
CMD ["python3", "-m", "app.api"]