Ibraaheem commited on
Commit
98dad5e
·
1 Parent(s): 0a5247e

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +4 -2
Dockerfile CHANGED
@@ -33,13 +33,15 @@ WORKDIR /home/worker/app
33
  # Ensure the worker user has the necessary permissions
34
  RUN mkdir -p local_data/private_gpt/chroma_db && chown -R worker local_data/private_gpt
35
 
 
 
 
 
36
  # Ensure the 'meta.json' file has the correct permissions
37
  RUN touch local_data/private_gpt/chroma_db/meta.json && chown worker local_data/private_gpt/chroma_db/meta.json
38
 
39
  # Allow the user to write to the chroma_db directory
40
  RUN chmod 777 local_data/private_gpt/chroma_db
41
 
42
- USER worker
43
-
44
  # Activate the virtual environment and run uvicorn
45
  CMD [".venv/bin/uvicorn", "private_gpt.main:app", "--host", "0.0.0.0", "--port", "7860"]
 
33
  # Ensure the worker user has the necessary permissions
34
  RUN mkdir -p local_data/private_gpt/chroma_db && chown -R worker local_data/private_gpt
35
 
36
+ # Activate the virtual environment and install dependencies
37
+ USER worker
38
+ RUN poetry install
39
+
40
  # Ensure the 'meta.json' file has the correct permissions
41
  RUN touch local_data/private_gpt/chroma_db/meta.json && chown worker local_data/private_gpt/chroma_db/meta.json
42
 
43
  # Allow the user to write to the chroma_db directory
44
  RUN chmod 777 local_data/private_gpt/chroma_db
45
 
 
 
46
  # Activate the virtual environment and run uvicorn
47
  CMD [".venv/bin/uvicorn", "private_gpt.main:app", "--host", "0.0.0.0", "--port", "7860"]