-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathDockerfile
More file actions
38 lines (29 loc) · 1.03 KB
/
Copy pathDockerfile
File metadata and controls
38 lines (29 loc) · 1.03 KB
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
32
33
34
35
36
37
38
FROM nvidia/cuda:12.5.1-cudnn-runtime-ubuntu22.04
ENV DEBIAN_FRONTEND=noninteractive
ENV TZ=UTC
RUN apt-get update && apt-get install -y \
software-properties-common \
&& add-apt-repository ppa:deadsnakes/ppa \
&& apt-get update && apt-get install -y \
python3.13 \
python3.13-dev \
python3.13-venv \
python3-pip \
curl \
libgl1 \
libglib2.0-0 \
&& rm -rf /var/lib/apt/lists/*
RUN update-alternatives --install /usr/bin/python python /usr/bin/python3.13 1 && \
update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.13 1 && \
python -m ensurepip --upgrade && \
pip install --upgrade pip
RUN pip install --no-cache-dir marearts-anpr
RUN pip install --no-cache-dir onnxruntime-gpu
WORKDIR /app
ENV ANPR_HOST=0.0.0.0
ENV ANPR_PORT=8000
ENV ANPR_BACKEND=auto
EXPOSE 8000
HEALTHCHECK --interval=60s --timeout=30s --start-period=300s --retries=5 \
CMD curl -f http://localhost:8000/api/health || exit 1
CMD ["ma-anpr", "server", "start", "--host", "0.0.0.0", "--port", "8000"]