|
FROM python:3.10-slim |
|
|
|
ENV PYTHONDONTWRITEBYTECODE 1 |
|
|
|
ENV PYTHONUNBUFFERED 1 |
|
|
|
|
|
ENV ENVIRONMENT=dev |
|
|
|
ENV $(cat /run/secrets/FINRAG_WEAVIATE_API_KEY) |
|
ENV $(cat /run/secrets/FINRAG_WEAVIATE_ENDPOINT) |
|
ENV $(cat /run/secrets/LLAMA_PARSE_API_KEY) |
|
ENV $(cat /run/secrets/OPENAI_API_KEY) |
|
|
|
|
|
COPY ./app /app |
|
WORKDIR /app |
|
RUN mkdir /data |
|
|
|
RUN pip install --no-cache-dir --upgrade -r requirements.txt |
|
|
|
|
|
|
|
|
|
|
|
RUN chmod -R 777 /usr/local/lib/python3.10/site-packages//llama_index/legacy/_static/nltk_cache |
|
|
|
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"] |