agenticresearch / Dockerfile
sqort's picture
Revert to mudler Q4_K GGUF (Q3_K_M not compatible with locate-anything.cpp)
52659cf
Raw
History Blame Contribute Delete
1.28 kB
FROM python:3.11-slim AS builder
WORKDIR /build
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
cmake \
git \
ca-certificates \
&& rm -rf /var/lib/apt/lists/*
RUN git clone --depth 1 --shallow-submodules \
https://github.com/mudler/locate-anything.cpp.git /src \
&& cd /src && git submodule update --init --depth 1 --recursive
RUN cmake -S /src -B /src/build \
-DCMAKE_BUILD_TYPE=Release \
-DLA_BUILD_CLI=ON \
-DLA_BUILD_TESTS=OFF \
-DLA_SHARED=OFF \
&& cmake --build /src/build -j2 \
&& cp /src/build/examples/cli/locate-anything-cli /usr/local/bin/
FROM python:3.11-slim
RUN apt-get update && apt-get install -y --no-install-recommends \
ca-certificates \
libstdc++6 \
libgomp1 \
&& rm -rf /var/lib/apt/lists/*
COPY --from=builder /usr/local/bin/locate-anything-cli /usr/local/bin/
COPY requirements.txt /app/requirements.txt
RUN pip install --no-cache-dir -r /app/requirements.txt
COPY download_model.py /app/download_model.py
RUN python /app/download_model.py
COPY app.py /app/app.py
WORKDIR /app
ENV MODEL_PATH=/app/models/locate-anything-q4_k.gguf
ENV HOST=0.0.0.0
ENV PORT=7860
EXPOSE 7860
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]