Skip to content

Commit

Permalink
Use base image to add baseline.
Browse files Browse the repository at this point in the history
  • Loading branch information
kirmorozov committed Apr 1, 2024
1 parent 528574a commit bd995eb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@ name: Docker Image CI

on:
push:
branches: [ "main" ]
pull_request:
paths-ignore:
- build/base.Dockerfile
- .github/workflows/base-docker-image.yml
branches: [ "main" ]

jobs:
Expand Down Expand Up @@ -34,7 +35,10 @@ jobs:
path: 'model/blazeface'

- name: Pull latest from DO
run: docker pull registry.digitalocean.com/thesmile/thesmile:latest
run: docker pull registry.digitalocean.com/thesmile/thesmile-base:latest

- name: Tag for local use
run: docker image tag registry.digitalocean.com/thesmile/thesmile-base:latest thesmile:latest

- name: Build the Docker image
run: docker build . --file build/Dockerfile --tag thesmile:$(date +%Y%m%d-%s) --tag thesmile:latest
Expand Down
8 changes: 1 addition & 7 deletions build/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,9 @@
# start by pulling the python image
FROM python:3.12

# copy the requirements file into the image
COPY ./requirements.txt /app/requirements.txt
FROM thesmile-base:latest

# switch working directory
WORKDIR /app

# install the dependencies and packages in the requirements file
RUN pip install -r requirements.txt

# copy every content from the local file to the image
COPY . /app

Expand Down

0 comments on commit bd995eb

Please sign in to comment.