Skip to content

Commit

Permalink
feat: add custom layer
Browse files Browse the repository at this point in the history
  • Loading branch information
RaoHai committed Apr 15, 2024
1 parent 2b9c437 commit 0adc42b
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions server/Dockerfile.aws.lambda
Original file line number Diff line number Diff line change
Expand Up @@ -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"]

0 comments on commit 0adc42b

Please sign in to comment.