From 115fe0838d1719e8045e1cfd458b1710dec036e4 Mon Sep 17 00:00:00 2001 From: PSchroedl Date: Tue, 1 Oct 2024 17:33:46 -0700 Subject: [PATCH] Pin sam2 commit (#217) * pin sam2 repo to commit before renaming and path changes * update repo dependency to match upstream renaming --- runner/docker/Dockerfile.segment_anything_2 | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/runner/docker/Dockerfile.segment_anything_2 b/runner/docker/Dockerfile.segment_anything_2 index 75fce0b3..1e721ea4 100644 --- a/runner/docker/Dockerfile.segment_anything_2 +++ b/runner/docker/Dockerfile.segment_anything_2 @@ -1,22 +1,5 @@ FROM livepeer/ai-runner:base -RUN pip install --no-cache-dir torch==2.3.1 torchvision==0.18.1 torchaudio==2.3.1 xformers==0.0.27 - -# Clone the segment-anything-2 repo to a temporary directory -RUN git clone https://github.com/facebookresearch/segment-anything-2.git /tmp/segment-anything-2 - -# Set working directory to the cloned repo -WORKDIR /tmp/segment-anything-2 - -# Run the build command -RUN python setup.py build_ext --inplace && \ - pip install . && \ - rm -rf /tmp/segment-anything-2 # Clean up after installation - -# Return to the default working directory -WORKDIR /app - -# Copy your application code -COPY app/ /app/app +RUN pip install --no-cache-dir torch==2.3.1 torchvision==0.18.1 torchaudio==2.3.1 xformers==0.0.27 git+https://github.com/facebookresearch/sam2.git@0f6515ae853c40420ea8e3dd250f8031bbf03023#egg=sam-2 CMD ["uvicorn", "app.main:app", "--log-config", "app/cfg/uvicorn_logging_config.json", "--host", "0.0.0.0", "--port", "8000"]