Skip to content

Commit

Permalink
GitHub Actions: checkout with LFS
Browse files Browse the repository at this point in the history
  • Loading branch information
simonszalai committed Jun 13, 2020
1 parent 5662f78 commit 2d19260
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 14 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/aws.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v2
with:
lfs: true
ref: 'master'

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
Expand All @@ -69,6 +72,14 @@ jobs:
id: login-ecr
uses: aws-actions/amazon-ecr-login@v1

# - uses: prewk/s3-cp-action@master
# env:
# AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
# AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
# AWS_REGION: ${{ secrets.DEPLOY_REGION }}
# SOURCE: 's3://sorterbot-weights-fbcggris/model_final.pth'
# DEST: './something-local'

- name: Build, tag, and push image to Amazon ECR
id: build-image
env:
Expand Down
28 changes: 14 additions & 14 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -39,25 +39,25 @@ ENV WEIGHTS_URL=$WEIGHTS_URL_ARG

# RUN \
# Install AWS CLI
RUN curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
RUN unzip awscliv2.zip
RUN ./aws/install
RUN aws s3 cp s3://sorterbot-weights-fbcggris/model_final.pth /sorterbot_cloud/weights/model_final.pth --region ${DEPLOY_REGION_ARG}
RUN echo ls
RUN ls /sorterbot_cloud/weights
RUN stat -f%z /sorterbot_cloud/weights/model_final.pth
# Download weights from S3
# --profile ${AWS_PROFILE} \
# --mount=type=secret,id=aws_credentials,dst=/root/.aws/credentials \
# --mount=type=secret,id=aws_config,dst=/root/.aws/config \
RUN echo WEIGHTS_URL: $WEIGHTS_URL
RUN echo WEIGHTS_URL_ARG: $WEIGHTS_URL_ARG
# RUN curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
# RUN unzip awscliv2.zip
# RUN ./aws/install
# RUN aws s3 cp --region eu-central-1 s3://sorterbot-weights-fbcggris/model_final.pth /sorterbot_cloud/weights/model_final.pth
# RUN echo ls
# RUN ls /sorterbot_cloud/weights
# RUN stat -f%z /sorterbot_cloud/weights/model_final.pth
# # Download weights from S3
# # --profile ${AWS_PROFILE} \
# # --mount=type=secret,id=aws_credentials,dst=/root/.aws/credentials \
# # --mount=type=secret,id=aws_config,dst=/root/.aws/config \
# RUN echo WEIGHTS_URL: $WEIGHTS_URL
# RUN echo WEIGHTS_URL_ARG: $WEIGHTS_URL_ARG

# Copy source code
COPY ./src /sorterbot_cloud/src
COPY ./tests /sorterbot_cloud/tests
COPY ./config.yaml /sorterbot_cloud/config.yaml
# COPY ./weights/model_final.pth /sorterbot_cloud/weights/model_final.pth
COPY ./weights/model_final.pth /sorterbot_cloud/weights/model_final.pth

WORKDIR /sorterbot_cloud
ENV PYTHONUNBUFFERED 1
Expand Down

0 comments on commit 2d19260

Please sign in to comment.