File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -53,12 +53,14 @@ RUN pip install --no-cache-dir \
5353 torch torchvision torchaudio \
5454 --index-url https://download.pytorch.org/whl/cu126
5555
56- # Downgrade numpy before SAM 3 (SAM 3 requires numpy<2, pip can't uninstall numpy 2.x cleanly)
57- RUN pip install --no-cache-dir --ignore-installed "numpy>=1.26,<2"
56+ # Downgrade numpy before SAM 3 (SAM 3 requires numpy<2, pip can't uninstall numpy 2.x in-place)
57+ RUN rm -rf $(python3 -c "import numpy; import os; print(os.path.dirname(numpy.__file__))" ) \
58+ && rm -rf /opt/venv/lib/python3.12/site-packages/numpy*.dist-info \
59+ && pip install --no-cache-dir "numpy>=1.26,<2"
5860
5961# SAM 3
6062RUN git clone https://github.com/facebookresearch/sam3.git /opt/sam3 \
61- && pip install --no-cache-dir --no-deps - e /opt/sam3
63+ && pip install --no-cache-dir -e /opt/sam3
6264
6365# Remaining python deps (opencv pinned <4.11 for numpy 1.x compat)
6466RUN pip install --no-cache-dir \
You can’t perform that action at this time.
0 commit comments