DEPRESSION-DETECTION
Browse files- Dockerfile +4 -4
- source_code/requirements.txt +2 -2
Dockerfile
CHANGED
|
@@ -8,7 +8,7 @@ FROM python:3.9-slim
|
|
| 8 |
# Set environment variables
|
| 9 |
ENV PYTHONDONTWRITEBYTECODE 1
|
| 10 |
ENV PYTHONUNBUFFERED 1
|
| 11 |
-
# Force legacy setuptools behavior
|
| 12 |
ENV SETUPTOOLS_USE_DISTUTILS=stdlib
|
| 13 |
|
| 14 |
# Set work directory
|
|
@@ -19,15 +19,15 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
| 19 |
build-essential \
|
| 20 |
&& rm -rf /var/lib/apt/lists/*
|
| 21 |
|
| 22 |
-
#
|
| 23 |
-
# This is required to handle the outdated syntax in spacy 2.2.0's sub-dependencies
|
| 24 |
RUN pip install --upgrade "pip<23.1" "setuptools<58.0" "wheel<0.41.0"
|
| 25 |
RUN pip install "packaging<22.0" "cython<3.0"
|
| 26 |
|
| 27 |
# Install project dependencies
|
| 28 |
# Note: Path is relative to the repository root where Dockerfile resides
|
| 29 |
COPY source_code/requirements.txt ./
|
| 30 |
-
|
|
|
|
| 31 |
|
| 32 |
# Download spaCy model required for the NLP pipeline
|
| 33 |
RUN python -m spacy download en_core_web_lg
|
|
|
|
| 8 |
# Set environment variables
|
| 9 |
ENV PYTHONDONTWRITEBYTECODE 1
|
| 10 |
ENV PYTHONUNBUFFERED 1
|
| 11 |
+
# Force legacy setuptools behavior
|
| 12 |
ENV SETUPTOOLS_USE_DISTUTILS=stdlib
|
| 13 |
|
| 14 |
# Set work directory
|
|
|
|
| 19 |
build-essential \
|
| 20 |
&& rm -rf /var/lib/apt/lists/*
|
| 21 |
|
| 22 |
+
# Fix for legacy builds: downgrade tools and disable build isolation
|
|
|
|
| 23 |
RUN pip install --upgrade "pip<23.1" "setuptools<58.0" "wheel<0.41.0"
|
| 24 |
RUN pip install "packaging<22.0" "cython<3.0"
|
| 25 |
|
| 26 |
# Install project dependencies
|
| 27 |
# Note: Path is relative to the repository root where Dockerfile resides
|
| 28 |
COPY source_code/requirements.txt ./
|
| 29 |
+
# --no-build-isolation is critical to allow our downgraded tools to handle legacy metadata
|
| 30 |
+
RUN pip install --no-cache-dir --no-build-isolation -r requirements.txt
|
| 31 |
|
| 32 |
# Download spaCy model required for the NLP pipeline
|
| 33 |
RUN python -m spacy download en_core_web_lg
|
source_code/requirements.txt
CHANGED
|
@@ -23,12 +23,12 @@ python-dateutil==2.8.2
|
|
| 23 |
pytz==2021.3
|
| 24 |
regex==2021.11.10
|
| 25 |
requests==2.26.0
|
| 26 |
-
scikit-learn==1.0.
|
| 27 |
scipy==1.7.2
|
| 28 |
seaborn==0.11.2
|
| 29 |
setuptools-scm==6.3.2
|
| 30 |
six==1.16.0
|
| 31 |
-
spacy==2.
|
| 32 |
srsly==1.0.5
|
| 33 |
thinc==7.1.1
|
| 34 |
threadpoolctl==3.0.0
|
|
|
|
| 23 |
pytz==2021.3
|
| 24 |
regex==2021.11.10
|
| 25 |
requests==2.26.0
|
| 26 |
+
scikit-learn==1.0.2
|
| 27 |
scipy==1.7.2
|
| 28 |
seaborn==0.11.2
|
| 29 |
setuptools-scm==6.3.2
|
| 30 |
six==1.16.0
|
| 31 |
+
spacy==2.3.5
|
| 32 |
srsly==1.0.5
|
| 33 |
thinc==7.1.1
|
| 34 |
threadpoolctl==3.0.0
|