gavinzli commited on
Commit
5d5142b
·
1 Parent(s): a171580

Update Dockerfile to install libgl1-mesa-glx and enhance email logging in mail controller

Browse files
Files changed (2) hide show
  1. Dockerfile +3 -0
  2. app/controllers/mail.py +1 -0
Dockerfile CHANGED
@@ -10,6 +10,9 @@ WORKDIR /app
10
  # Create a cache directory and set permissions
11
  RUN mkdir -p /app/cache && chmod -R 777 /app/cache
12
 
 
 
 
13
  # Install requirements.txt
14
  RUN pip install --no-cache-dir --upgrade -r requirements.txt
15
  RUN python3 -c "import nltk; nltk.download('averaged_perceptron_tagger_eng', download_dir='/usr/local/nltk_data')"
 
10
  # Create a cache directory and set permissions
11
  RUN mkdir -p /app/cache && chmod -R 777 /app/cache
12
 
13
+ RUN apt-get update
14
+ RUN apt-get install libgl1-mesa-glx
15
+
16
  # Install requirements.txt
17
  RUN pip install --no-cache-dir --upgrade -r requirements.txt
18
  RUN python3 -c "import nltk; nltk.download('averaged_perceptron_tagger_eng', download_dir='/usr/local/nltk_data')"
app/controllers/mail.py CHANGED
@@ -77,6 +77,7 @@ def list_emails(service, messages):
77
  msg = service.users().messages().get(userId="me", id=message["id"], format="full").execute()
78
  metadata = {}
79
  logger.info("vectorstore.index_to_docstore_id: %s", vectorstore.index_to_docstore_id)
 
80
  if msg["id"] in vectorstore.index_to_docstore_id:
81
  logger.info("Email already exists in the database.")
82
  continue
 
77
  msg = service.users().messages().get(userId="me", id=message["id"], format="full").execute()
78
  metadata = {}
79
  logger.info("vectorstore.index_to_docstore_id: %s", vectorstore.index_to_docstore_id)
80
+ logger.info("type: %s", type(vectorstore.index_to_docstore_id))
81
  if msg["id"] in vectorstore.index_to_docstore_id:
82
  logger.info("Email already exists in the database.")
83
  continue