Skip to content

Commit

Permalink
Pin sam2 commit (#217)
Browse files Browse the repository at this point in the history
* pin sam2 repo to commit before renaming and path changes

* update repo dependency to match upstream renaming
  • Loading branch information
pschroedl authored and eliteprox committed Oct 2, 2024
1 parent 3698f9c commit 115fe08
Showing 1 changed file with 1 addition and 18 deletions.
19 changes: 1 addition & 18 deletions runner/docker/Dockerfile.segment_anything_2
Original file line number Diff line number Diff line change
@@ -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"]

0 comments on commit 115fe08

Please sign in to comment.