-
Notifications
You must be signed in to change notification settings - Fork 0
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
1 changed file
with
38 additions
and
0 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,38 @@ | ||
version: 0.2 | ||
|
||
env: | ||
variables: | ||
S3_BUCKET: "recommender-system-model-bucket" # Replace with your S3 bucket name | ||
MODEL_FILE: "best_model_ncf.keras" # Replace with your model file name | ||
|
||
phases: | ||
install: | ||
runtime-versions: | ||
python: 3.9 # Specify the Python version | ||
commands: | ||
- echo Installing dependencies | ||
- pip install -r requirements.txt # Install app dependencies | ||
|
||
build: | ||
commands: | ||
- echo Downloading model from S3... | ||
- aws s3 cp s3://$S3_BUCKET/$MODEL_FILE ./model.pkl # Download model from S3 | ||
- echo Running application tests... | ||
- python -m unittest discover tests # Assuming you have unit tests in a 'tests' folder | ||
- echo Build complete. | ||
|
||
post_build: | ||
commands: | ||
- echo Preparing build artifacts... | ||
- mkdir -p output | ||
- cp -R * ./output # Copy all files to the output folder | ||
- echo Post-build complete. | ||
|
||
artifacts: | ||
files: | ||
- output/**/* # Include all files from the output folder in the build artifacts | ||
discard-paths: no | ||
|
||
cache: | ||
paths: | ||
- '/root/.cache/pip/**/*' # Cache pip dependencies for faster builds |