diff --git a/.github/workflows/push-image.yml b/.github/workflows/push-image.yml index c047b01..448f70e 100644 --- a/.github/workflows/push-image.yml +++ b/.github/workflows/push-image.yml @@ -58,33 +58,12 @@ jobs: if: inputs.build_image uses: actions/checkout@v4 - # Improve building performance by pulling image from GHCR, if it exists - # https://stackoverflow.com/questions/77494739/github-action-gha-docker-cache-much-slower-than-recreating-the-image - - name: "Login to GHCR (GitHub Container Registry) for caching image" - uses: docker/login-action@v3 - with: - registry: ghcr.io - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - name: "Pull cached image" - if: inputs.build_image - run: | - { docker pull "$GHCR_PATH" && docker tag "$GHCR_PATH" ${{ inputs.image_name }}:${{ inputs.image_tag }} - } || exit 0 - - name: "Build image ${{ inputs.image_name }} with tag '${{ inputs.image_tag }}'" if: inputs.build_image run: | cd ${{ inputs.dockerfile_folder }} docker build -t "${{ inputs.image_name }}:${{ inputs.image_tag }}" . - - name: "Cache image in GHCR for future runs" - if: inputs.build_image - run: | - # echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u ${{ github.actor }} --password-stdin - docker tag ${{ inputs.image_name }}:${{ inputs.image_tag }} "$GHCR_PATH" - docker push "$GHCR_PATH" - - name: "Publish image to AWS ECR'" if: inputs.build_image env: diff --git a/02-household-queries/Dockerfile b/02-household-queries/Dockerfile index b916654..90aab86 100644 --- a/02-household-queries/Dockerfile +++ b/02-household-queries/Dockerfile @@ -2,18 +2,15 @@ FROM python:3.11-slim WORKDIR /app -RUN apt-get update && apt-get install -y \ - build-essential \ - curl \ - software-properties-common \ - git \ - && rm -rf /var/lib/apt/lists/* - -RUN git clone https://github.com/navapbc/labs-gen-ai-experiments.git . -WORKDIR /app/02-household-queries -RUN pip3 install -r requirements.txt +# RUN apt-get update && apt-get install -y \ +# build-essential \ +# curl \ +# software-properties-common \ +# git \ +# && rm -rf /var/lib/apt/lists/* COPY . . +RUN pip3 install -r requirements.txt # Associate GHCR package with GitHub repo; otherwise, it's associated with the navapbc GitHub organization # See https://github.com/orgs/navapbc/packages?repo_name=labs-gen-ai-experiments