|
|
|
FROM python:3.9-slim |
|
|
|
|
|
RUN useradd -m -u 1000 user |
|
|
|
|
|
WORKDIR /app |
|
|
|
|
|
RUN apt-get update && \ |
|
apt-get install -y gcc python3-dev python3-venv && \ |
|
apt-get clean && \ |
|
rm -rf /var/lib/apt/lists/* |
|
|
|
|
|
COPY --chown=user ./requirements.txt requirements.txt |
|
|
|
|
|
RUN python3 -m venv env && \ |
|
/bin/bash -c "source env/bin/activate && pip install --no-cache-dir --upgrade -r requirements.txt" && \ |
|
/bin/bash -c "source env/bin/activate && pip install chainlit langchain_community" |
|
|
|
|
|
EXPOSE 7680 |
|
|
|
|
|
COPY --chown=user . /app |
|
|
|
|
|
CMD ["/bin/bash", "-c", "source env/bin/activate && uvicorn app:app --host 0.0.0.0 --port 7680 && python3 downloadLLM.py && python3 ingest.py && chainlit run app.py --host 0.0.0.0 --port 7680"] |
|
|