rebuild hnswlib on Docker launch

This commit is contained in:
Luke VanderHart
2023-02-17 12:28:33 -08:00
parent a1ac68b0fa
commit b92b3196e6
2 changed files with 7 additions and 1 deletions

View File

@@ -9,8 +9,9 @@ COPY ./requirements.txt requirements.txt
RUN pip install --no-cache-dir --upgrade -r requirements.txt
COPY ./bin/docker_entrypoint.sh /docker_entrypoint.sh
COPY ./ /chroma
EXPOSE 8000
CMD ["uvicorn", "chromadb.app:app", "--host", "0.0.0.0", "--port", "8000", "--workers", "1", "--proxy-headers"]
CMD ["/docker_entrypoint.sh"]

5
bin/docker_entrypoint.sh Executable file
View File

@@ -0,0 +1,5 @@
#!/bin/bash
echo "Rebuilding hnsw to ensure architecture compatibility"
pip install --force-reinstall --no-cache-dir hnswlib
uvicorn chromadb.app:app --workers 1 --host 0.0.0.0 --port 8000