File tree Expand file tree Collapse file tree 1 file changed +13
-3
lines changed
Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Original file line number Diff line number Diff line change 1- FROM pytorch/pytorch:latest
1+ FROM python:3.11-slim AS dependencies
22
33WORKDIR /app
44
55ARG TARGETARCH
66
7+ # apt-update and install dependencies, with cache
8+ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
9+ --mount=type=cache,target=/var/lib/apt,sharing=locked \
10+ apt update && apt-get --no-install-recommends install -y python3-opencv gcc
11+
12+ FROM dependencies
13+
14+ WORKDIR /app
15+
716COPY pyproject.toml ./
817COPY src/ ./src/
18+
919COPY models/best_float32.tflite ./models/
1020
1121# pip install dependencies for the detected architecture, with cache
1222RUN --mount=type=cache,target=/root/.cache \
1323 if [ "$TARGETARCH" = "arm64" ]; then \
1424 apt install -y libcamera; \
15- pip install .[pi] --break-system-packages ; \
25+ pip install .[pi]; \
1626 else \
17- pip install . --break-system-packages ; \
27+ pip install .; \
1828 fi
1929
2030EXPOSE 8080
You can’t perform that action at this time.
0 commit comments