-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from Canadian-Geospatial-Platform/dev
v1-1-1-release
- Loading branch information
Showing
9 changed files
with
146 additions
and
80 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Use a base image provided by AWS for Python 3.9 runtime | ||
FROM public.ecr.aws/lambda/python:3.9-x86_64 | ||
|
||
# Set the working directory | ||
WORKDIR /var/task | ||
|
||
# Copy requirements.txt | ||
COPY requirements.txt ./ | ||
|
||
# Copy function code | ||
COPY app.py ./ | ||
|
||
# Install the specified packages | ||
RUN pip install -r requirements.txt | ||
|
||
# Download the NLTK 'punkt' tokenizer and 'stopwords' data | ||
RUN python -m nltk.downloader -d /var/task/nltk_data punkt stopwords | ||
|
||
# Set the NLTK_DATA environment variable to use the included data | ||
ENV NLTK_DATA=/var/task/nltk_data | ||
|
||
# Set the CMD to your handler (could also be done as a parameter override outside of the Dockerfile) | ||
CMD [ "app.lambda_handler" ] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,4 +2,5 @@ pandas | |
nltk | ||
pyarrow | ||
fastparquet | ||
requests | ||
requests | ||
urllib3<2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/bin/bash | ||
# Build Cloud Formation Zip Package for Similarity Engine using Data Preprocessing | ||
# Author: Xinli Cai | ||
# Date: August 29, 2023 | ||
|
||
|
||
# Navigate to the directory containing `requirements.txt` | ||
cd similarity-engine-data-process/ | ||
|
||
# Install required packages | ||
pip install -t similarity-engine-data-preprocess-20230822-2200/ -r requirements.txt | ||
|
||
# Change to the build directory | ||
cd similarity-engine-data-preprocess-20230822-2200/ | ||
|
||
# Zip the necessary files | ||
zip -r similarity-engine-data-preprocess-20230822-2200.zip ../app.py ../__init.py__ ./* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Use a base image provided by AWS for Python 3.9 runtime | ||
FROM public.ecr.aws/lambda/python:3.9-x86_64 | ||
|
||
# Set the working directory | ||
WORKDIR /var/task | ||
|
||
# Copy requirements.txt | ||
COPY requirements.txt ./ | ||
|
||
# Copy function code | ||
COPY app.py ./ | ||
COPY dynamodb.py ./ | ||
|
||
# Install the specified packages | ||
RUN pip install -r requirements.txt | ||
|
||
# Set the CMD to your handler (could also be done as a parameter override outside of the Dockerfile) | ||
CMD [ "app.lambda_handler" ] | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
gensim==4.1.2 | ||
scikit-learn==1.0 | ||
pyarrow | ||
fastparquet | ||
tqdm | ||
pandas | ||
numpy | ||
scikit-learn | ||
transformers | ||
torch | ||
pyarrow | ||
fastparquet |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/bin/bash | ||
# Build Cloud Formation Package for Similarity Engine using Word2Vec | ||
# Author: Xinli Cai | ||
# Date: August 29, 2023 | ||
|
||
|
||
# Cloud Formation Package for Similarity Engine using Word2Vec | ||
|
||
# Step 1: Navigate to the directory where the `requirements.txt` is | ||
cd similarity-engine-word2vec-model-dev/ | ||
|
||
# Step 2: Install the required packages | ||
pip install -t similarity-engine-word2vec-model-build/ -r requirements.txt | ||
|
||
# Step 3: Change to the build directory | ||
cd similarity-engine-word2vec-model-build/ | ||
|
||
# Step 4: Zip the necessary files | ||
zip -r similarity-engine-word2vec-model.zip ../app.py ../dynamodb.py ../__init.py__ ./* | ||
|
||
# Restore to the initial directory | ||
cd .. |