-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
90 additions
and
350 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 |
---|---|---|
@@ -1,5 +1,7 @@ | ||
.idea | ||
data | ||
batch_create_compute_env.json | ||
*~ | ||
|
||
# Byte-compiled / optimized / DLL files | ||
__pycache__/ | ||
|
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,5 @@ | ||
|
||
FROM 015216235264.dkr.ecr.us-west-1.amazonaws.com/pmip:latest | ||
|
||
EXPOSE 8000 | ||
ENTRYPOINT [] | ||
CMD [ "gunicorn", "-w", "3", "-b", ":8000", "wsgi" ] | ||
ENTRYPOINT [ "bash" ] | ||
CMD [ "-c", "gunicorn -w 3 -b :8000 wsgi" ] |
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
Large diffs are not rendered by default.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,4 +5,5 @@ xgboost | |
sklearn | ||
nltk | ||
jupyter | ||
papermill | ||
papermill | ||
awscli |
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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -e | ||
|
||
BUCKET="s3://fwhigh-predictive-models" | ||
MODEL_ID=$(aws s3 ls ${BUCKET}/models/ | awk '$1~/PRE/ {print $2}' | sed 's/\///g' | sort -nr | head -n 1) | ||
S3_DIR=$BUCKET/models/$MODEL_ID | ||
DIR=data | ||
|
||
echo Getting data from $S3_DIR | ||
echo Writing it to $DIR | ||
|
||
mkdir -p $DIR | ||
|
||
aws s3 cp --recursive --exclude "*" --include "model.pkl" $S3_DIR/ $DIR/ |
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,9 +1,11 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -e | ||
S3_DIR=$1 | ||
DIR=$2 | ||
|
||
$DIR=$1 | ||
echo Getting data from $S3_DIR | ||
echo Writing it to $DIR | ||
|
||
aws s3 cp --recursive $S3_DIR/ $DIR/ | ||
cd $DIR | ||
wget https://archive.ics.uci.edu/ml/machine-learning-databases/00380/YouTube-Spam-Collection-v1.zip | ||
unzip YouTube-Spam-Collection-v1.zip | ||
unzip -v *.zip |
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,12 +1,3 @@ | ||
#!/usr/bin/env bash | ||
|
||
if [ "$ENVIRONMENT" == "prod" ]; then | ||
echo "Installing pmip package in prod environment" | ||
pip install -U --upgrade-strategy only-if-needed -e . | ||
elif [ "$ENVIRONMENT" == "staging" ]; then | ||
echo "Installing pmip package in staging environment" | ||
pip install -U --upgrade-strategy only-if-needed . | ||
else | ||
echo "Installing pmip package in dev environment" | ||
pip install -U --upgrade-strategy only-if-needed . | ||
fi | ||
pip install -U --upgrade-strategy only-if-needed -e . |
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,10 @@ | ||
#!/usr/bin/env bash | ||
|
||
ECR_URI=$1 | ||
AWS_REGION=$(aws configure get region) | ||
|
||
IMAGE_TAG=latest | ||
|
||
$(aws ecr get-login --no-include-email --region $AWS_REGION) | ||
docker tag pmip:staging ${ECR_URI}:${IMAGE_TAG} | ||
docker push ${ECR_URI}:${IMAGE_TAG} |
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