JPBianchi commited on
Commit
439aec6
1 Parent(s): a6e9cc1

making secrets avail in dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +7 -2
Dockerfile CHANGED
@@ -7,6 +7,11 @@ ENV PYTHONUNBUFFERED 1
7
 
8
  ENV ENVIRONMENT=dev
9
 
 
 
 
 
 
10
  COPY ./app /app
11
  WORKDIR /app
12
  RUN mkdir /data
@@ -14,9 +19,9 @@ RUN mkdir /data
14
  RUN pip install --no-cache-dir --upgrade -r requirements.txt
15
  # ^ no caching of the packages to save space
16
 
17
- RUN python -c "import nltk; nltk.download('stopwords')"
18
  # ^ to fix runtime error, see https://github.com/run-llama/llama_index/issues/10681
19
 
20
- RUN chmod -R 777 /usr/local/lib/python3.10/site-packages
21
 
22
  CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
 
7
 
8
  ENV ENVIRONMENT=dev
9
 
10
+ ENV FINRAG_WEAVIATE_API_KEY=$(cat /run/secrets/FINRAG_WEAVIATE_API_KEY)
11
+ ENV FINRAG_WEAVIATE_ENDPOINT=$(cat /run/secrets/FINRAG_WEAVIATE_ENDPOINT
12
+ ENV LLAMA_PARSE_API_KEY=$(cat /run/secrets/LLAMA_PARSE_API_KEY)
13
+ ENV OPENAI_API_KEY=$(cat /run/secrets/OPENAI_API_KEY)
14
+
15
  COPY ./app /app
16
  WORKDIR /app
17
  RUN mkdir /data
 
19
  RUN pip install --no-cache-dir --upgrade -r requirements.txt
20
  # ^ no caching of the packages to save space
21
 
22
+ # RUN python -c "import nltk; nltk.download('stopwords')"
23
  # ^ to fix runtime error, see https://github.com/run-llama/llama_index/issues/10681
24
 
25
+ RUN chmod -R 777 /usr/local/lib/python3.10/site-packages//llama_index/legacy/_static/nltk_cache
26
 
27
  CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]