Trying dvc pull in github actions and copying into docker

This commit is contained in:
Khalim Conn-Kowlessar 2023-10-03 16:30:44 +01:00
parent fd11114674
commit 9501130419
2 changed files with 11 additions and 2 deletions

View file

@ -22,6 +22,10 @@ jobs:
npm install -g serverless
npm install -g serverless-domain-manager
- name: Install DVC
run: |
pip install dvc
# Set up all of the secrets required for the deployment
- name: set secret prefix which is used across multiple steps
id: secret_prefix
@ -79,6 +83,11 @@ jobs:
aws-secret-access-key: ${{ secrets.PROD_AWS_SECRET_ACCESS_KEY }}
aws-region: eu-west-2
- name: DVC Pull
run: |
cd modules/ml-pipeline/src/pipeline
dvc pull -r ${{ steps.set_runtime_environment.outputs.runtime_environment }}
- name: Setup Docker
uses: docker/setup-buildx-action@v1

View file

@ -14,12 +14,12 @@ RUN yum install -y gcc python3-devel
# Install python packages
COPY modules/ml-pipeline/src/pipeline/requirements/predictions/requirements.txt ./requirements.txt
RUN pip install --no-cache-dir -r ./requirements.txt
RUN pip install --no-cache-dir -r ./requirements-vc.txt
# Copy the project code
COPY modules/ml-pipeline/src/pipeline ./pipeline
# Copy the handler
COPY deployment/handlers/prediction_app.py prediction_app.py
# Get the model
# RUN dvc pull -r ${RUNTIME_ENVIRONMENT}
CMD [ "prediction_app.handler" ]