diff --git a/server/Dockerfile.aws.lambda b/server/Dockerfile.aws.lambda index 8e5f0560..a25adde4 100644 --- a/server/Dockerfile.aws.lambda +++ b/server/Dockerfile.aws.lambda @@ -8,4 +8,13 @@ COPY . ${LAMBDA_TASK_ROOT} COPY requirements.txt . RUN pip3 install -r requirements.txt --target "${LAMBDA_TASK_ROOT}" -U --no-cache-dir +# Setup NLTK again in system path to execute nltk.downloader +RUN pip install nltk +# Setup directory for NLTK_DATA +RUN mkdir -p ./nltk_data + +# Download NLTK_DATA to build directory +RUN python -W ignore -m nltk.downloader punkt -d ./nltk_data +RUN python -W ignore -m nltk.downloader stopwords -d ./nltk_data + CMD ["python", "main.py"] \ No newline at end of file