mirror of
https://github.com/StanGirard/quivr.git
synced 2024-12-24 20:03:41 +03:00
parent
3922d8ca83
commit
d9b2be19d7
@ -9,17 +9,10 @@ COPY ./requirements.txt /code/requirements.txt
|
||||
|
||||
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt --timeout 100
|
||||
|
||||
# Install additional dependencies
|
||||
RUN apt-get install -y liblzma-dev cmake
|
||||
|
||||
# Build GPT4All from source (required for GPT4All langchain bindings)
|
||||
RUN cd /tmp && git clone --recurse-submodules https://github.com/nomic-ai/gpt4all && \
|
||||
cd gpt4all/gpt4all-backend/ && \
|
||||
mkdir build && cd build && \
|
||||
cmake .. && cmake --build . --parallel && \
|
||||
cd ../../gpt4all-bindings/python && \
|
||||
pip3 install -e .
|
||||
#You may need to run `chmod +x ./backend/scripts/start.sh` on your host machine if you get a permission error
|
||||
COPY ./scripts/start.sh /code/scripts/start.sh
|
||||
RUN chmod +x /code/scripts/start.sh
|
||||
|
||||
COPY . /code/
|
||||
|
||||
CMD ["uvicorn", "main:app", "--reload", "--host", "0.0.0.0", "--port", "5050"]
|
||||
ENTRYPOINT ["/code/scripts/start.sh"]
|
||||
|
21
backend/scripts/start.sh
Executable file
21
backend/scripts/start.sh
Executable file
@ -0,0 +1,21 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Check if gpt4all is already installed
|
||||
if ! pip show gpt4all > /dev/null; then
|
||||
if [[ $PRIVATE == "True" ]]; then
|
||||
apt-get install -y liblzma-dev cmake
|
||||
|
||||
cd /tmp && git clone --recurse-submodules https://github.com/nomic-ai/gpt4all
|
||||
cd gpt4all/gpt4all-backend/
|
||||
mkdir build && cd build
|
||||
cmake .. && cmake --build . --parallel
|
||||
cd ../../gpt4all-bindings/python
|
||||
pip3 install -e .
|
||||
fi
|
||||
fi
|
||||
|
||||
# Move to the code directory
|
||||
cd /code
|
||||
|
||||
# Start your app
|
||||
uvicorn main:app --reload --host 0.0.0.0 --port 5050
|
Loading…
Reference in New Issue
Block a user