File tree Expand file tree Collapse file tree 1 file changed +5
-7
lines changed
Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -68,19 +68,17 @@ RUN python3 -m pip install --break-system-packages --no-cache-dir --extra-index-
6868
6969# Install PyTorch based on architecture
7070RUN ARCH=$(uname -m) && \
71- if [ "$ARCH" = "armv7l" ]; then \
72- # Install the armv7l-specific PyTorch wheel
73- python3 -m pip install --break-system-packages --no-cache-dir \
74- https://github.com/maxisoft/pytorch-arm/releases/download/v1.0.0/torch-1.13.0a0+git7c98e70-cp311-cp311-linux_armv7l.whl; \
75- else \
76- # Install PyTorch from the official index for other architectures
71+ if [ "$ARCH" != "armv7l" ]; then \
72+ # PyTorch and opencv not supported on armv7l
7773 python3 -m pip install --break-system-packages --no-cache-dir --index-url https://download.pytorch.org/whl/cpu torch; \
74+ python3 -m pip install --break-system-packages --no-cache-dir --extra-index-url https://www.piwheels.org/simple \
75+ opencv-python opencv-contrib-python; \
7876 fi
7977
8078# copy package source and install
8179COPY . /app/src
8280RUN python3 -m pip install --break-system-packages --no-cache-dir --extra-index-url https://www.piwheels.org/simple \
83- opencv-python scikit-learn==1.4.2 numpy==1.26.4 /app/src[ai]
81+ scikit-learn==1.4.2 numpy==1.26.4 /app/src[ai]
8482
8583# download and cache sentence transformer model
8684RUN python3 -c "\
You can’t perform that action at this time.
0 commit comments