From 4f1e86d2697c3f81f4a18fc525a4e6fee13b3527 Mon Sep 17 00:00:00 2001
From: Alex
Date: Mon, 6 Mar 2023 18:34:48 +0000
Subject: [PATCH 1/4] slimming
---
application/Dockerfile | 5 +-
application/requirements.txt | 95 ++++++------------------------------
2 files changed, 20 insertions(+), 80 deletions(-)
diff --git a/application/Dockerfile b/application/Dockerfile
index 1e1e16ef..17a67349 100644
--- a/application/Dockerfile
+++ b/application/Dockerfile
@@ -5,6 +5,9 @@ RUN apt-get update && apt-get install -y gcc curl
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y && apt-get install --reinstall libc6-dev -y
ENV PATH="/root/.cargo/bin:${PATH}"
RUN pip install --upgrade pip && pip install tiktoken==0.1.2
+COPY requirements.txt .
+RUN pip install -r requirements.txt
+
FROM python:3.10-slim-bullseye
# Copy pre-built packages from builder stage
@@ -13,7 +16,7 @@ WORKDIR /app
COPY . /app
ENV FLASK_APP=app.py
ENV FLASK_DEBUG=true
-RUN pip install -r requirements.txt
+RUN pip install gunicorn
EXPOSE 5001
diff --git a/application/requirements.txt b/application/requirements.txt
index 2514ed9d..4c4790d5 100644
--- a/application/requirements.txt
+++ b/application/requirements.txt
@@ -1,126 +1,63 @@
aiodns==3.0.0
-aiohttp==3.8.3
+aiohttp==3.8.4
aiohttp-retry==2.8.3
aiosignal==1.3.1
-alabaster==0.7.13
-aleph-alpha-client==2.16.0
-anyio==3.6.2
-argilla==1.3.0
+aleph-alpha-client==2.16.1
async-timeout==4.0.2
attrs==22.2.0
-Babel==2.11.0
-backoff==2.2.1
-blobfile==2.0.1
-boto3==1.26.82
-botocore==1.29.82
+boto3==1.26.84
+botocore==1.29.84
cffi==1.15.1
-charset-normalizer==2.1.1
+charset-normalizer==3.1.0
click==8.1.3
-cohere==3.4.0
dataclasses-json==0.5.7
-decorator==5.1.1
-deeplake==3.2.12
-Deprecated==1.2.13
+deeplake==3.2.13
dill==0.3.6
-docutils==0.19
-docx2txt==0.8
entrypoints==0.4
-escodegen==1.0.10
-esprima==4.0.1
-esutils==1.0.1
-et-xmlfile==1.1.0
faiss-cpu==1.7.3
filelock==3.9.0
-Flask==2.2.2
+Flask==2.2.3
frozenlist==1.3.3
-greenlet==2.0.2
-gunicorn==20.1.0
-h11==0.14.0
-httpcore==0.16.3
-httpx==0.23.3
hub==3.0.1
-huggingface-hub==0.12.0
+huggingface-hub==0.12.1
humbug==0.2.8
idna==3.4
-imagesize==1.4.1
itsdangerous==2.1.2
-javalang==0.13.0
Jinja2==3.1.2
jmespath==1.0.1
-joblib==1.2.0
langchain==0.0.98
-lxml==4.9.2
-manifest-ml==0.1.1
MarkupSafe==2.1.2
marshmallow==3.19.0
marshmallow-enum==1.5.1
-monotonic==1.6
multidict==6.0.4
multiprocess==0.70.14
-mypy-extensions==0.4.3
-nltk==3.8.1
+mypy-extensions==1.0.0
numcodecs==0.11.0
-numpy==1.23.5
+numpy==1.24.2
openai==0.27.0
-openpyxl==3.1.1
packaging==23.0
-pandas==1.5.3
pathos==0.3.0
Pillow==9.4.0
pox==0.3.2
ppft==1.7.6.6
-py==1.11.0
pycares==4.3.0
pycparser==2.21
-pycryptodomex==3.17
-pydantic==1.10.4
-Pygments==2.14.0
+pydantic==1.10.5
PyJWT==2.6.0
-PyPDF2==3.0.1
python-dateutil==2.8.2
-python-docx==0.8.11
-python-dotenv==0.21.1
-python-magic==0.4.27
-python-pptx==0.6.21
-pytz==2022.7.1
+python-dotenv==1.0.0
PyYAML==6.0
-redis==4.5.1
regex==2022.10.31
requests==2.28.2
-retry==0.9.2
-rfc3986==1.5.0
s3transfer==0.6.0
-scikit-learn==1.2.1
-scipy==1.10.0
-sentence-transformers==2.2.2
-sentencepiece==0.1.97
six==1.16.0
-sniffio==1.3.0
-snowballstemmer==2.2.0
-Sphinx==6.1.3
-sphinxcontrib-applehelp==1.0.4
-sphinxcontrib-devhelp==1.0.2
-sphinxcontrib-htmlhelp==2.0.1
-sphinxcontrib-jsmath==1.0.1
-sphinxcontrib-qthelp==1.0.3
-sphinxcontrib-serializinghtml==1.1.5
SQLAlchemy==1.4.46
-sqlitedict==2.1.0
-tenacity==8.2.1
-threadpoolctl==3.1.0
-tiktoken==0.1.2
+tenacity==8.2.2
tokenizers==0.13.2
-torch==1.13.1
-torchvision==0.14.1
-tqdm==4.64.1
-transformers==4.26.0
-typer==0.7.0
+tqdm==4.65.0
+transformers==4.26.1
typing-inspect==0.8.0
-typing_extensions==4.4.0
-unstructured==0.4.11
+typing_extensions==4.5.0
urllib3==1.26.14
Werkzeug==2.2.3
-wrapt==1.14.1
-XlsxWriter==3.0.8
-xxhash==3.2.0
yarl==1.8.2
From 3767b85958c1f0cff9d5d67af66b801c2c71b65b Mon Sep 17 00:00:00 2001
From: Alex
Date: Mon, 6 Mar 2023 19:10:20 +0000
Subject: [PATCH 2/4] Update Dockerfile
---
application/Dockerfile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/application/Dockerfile b/application/Dockerfile
index 17a67349..bc8f6ecb 100644
--- a/application/Dockerfile
+++ b/application/Dockerfile
@@ -20,4 +20,4 @@ RUN pip install gunicorn
EXPOSE 5001
-CMD ["gunicorn", "-w", "6", "--bind", "0.0.0.0:5001", "wsgi:app"]
+CMD ["gunicorn", "-w", "2", "--bind", "0.0.0.0:5001", "wsgi:app"]
From 133863e601a7872cb52440c4e58e180e86f4cdd3 Mon Sep 17 00:00:00 2001
From: Alex
Date: Mon, 6 Mar 2023 19:23:56 +0000
Subject: [PATCH 3/4] Update Dockerfile
---
application/Dockerfile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/application/Dockerfile b/application/Dockerfile
index bc8f6ecb..dcda38bd 100644
--- a/application/Dockerfile
+++ b/application/Dockerfile
@@ -20,4 +20,4 @@ RUN pip install gunicorn
EXPOSE 5001
-CMD ["gunicorn", "-w", "2", "--bind", "0.0.0.0:5001", "wsgi:app"]
+CMD ["gunicorn", "-w", "2","-timeout", "120", "--bind", "0.0.0.0:5001", "wsgi:app"]
From ec61b80fd30b319ec8d4665747e4eab02d31042a Mon Sep 17 00:00:00 2001
From: Alex
Date: Mon, 6 Mar 2023 19:28:22 +0000
Subject: [PATCH 4/4] Update Dockerfile
---
application/Dockerfile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/application/Dockerfile b/application/Dockerfile
index dcda38bd..3e5710ab 100644
--- a/application/Dockerfile
+++ b/application/Dockerfile
@@ -20,4 +20,4 @@ RUN pip install gunicorn
EXPOSE 5001
-CMD ["gunicorn", "-w", "2","-timeout", "120", "--bind", "0.0.0.0:5001", "wsgi:app"]
+CMD ["gunicorn", "-w", "2", "--timeout", "120", "--bind", "0.0.0.0:5001", "wsgi:app"]