From ecfa5549b1324fb10cac81e384e601226dba9d76 Mon Sep 17 00:00:00 2001 From: "Adam R. Rivers" Date: Mon, 18 Sep 2023 10:34:37 -0400 Subject: [PATCH] updated the Docker and Github container registery deploy action. Bothe AVX and No AVX images now containe the webapp, I dropped the third separate webapp container. Updated the max file upload size of the webapp to 5GB. --- .github/workflows/docker_ghcr_io.yml | 75 ++++++++++++------------ docker-images/{webapp => avx}/Dockerfile | 2 +- docker-images/nonavx/Dockerfile | 10 ++-- 3 files changed, 42 insertions(+), 45 deletions(-) rename docker-images/{webapp => avx}/Dockerfile (98%) diff --git a/.github/workflows/docker_ghcr_io.yml b/.github/workflows/docker_ghcr_io.yml index ba2fcfc..cf5ba9d 100644 --- a/.github/workflows/docker_ghcr_io.yml +++ b/.github/workflows/docker_ghcr_io.yml @@ -1,44 +1,41 @@ -name: Publish Docker image +name: Publish Docker images + on: - release: - branches: main + push: + branches: + - 'main' jobs: - build-and-push-image: + docker: runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v2 - - - name: Get short SHA - id: slug - run: echo "::set-output name=sha12::$(echo ${GITHUB_SHA} | cut -c1-12)" - - - name: Login to GitHub Container Registry - uses: docker/login-action@v1 - with: - registry: ghcr.io - username: ${{ github.repository_owner }} - password: ${{ secrets.MY_GITHUB_RESISTRY_TOKEN }} - - - name: Build AVX container image and push to ghcr - uses: docker/build-push-action@v2 - with: - context: docker-images/avx - push: true - tags: ghcr.io/usda-ars-gbru/guidemaker-avx:sha-${{ steps.slug.outputs.sha12 }} - - - name: Build NON-AVX container image and push to ghcr - uses: docker/build-push-action@v2 - with: - context: docker-images/nonavx - push: true - tags: ghcr.io/usda-ars-gbru/guidemaker-nonavx:sha-${{ steps.slug.outputs.sha12 }} - - - name: Build WEBAPP container image and push to ghcr - uses: docker/build-push-action@v2 - with: - context: docker-images/webapp - push: true - tags: ghcr.io/usda-ars-gbru/guidemaker-webapp:sha-${{ steps.slug.outputs.sha12 }} + - + name: Set up QEMU + uses: docker/setup-qemu-action@v3 + - + name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - + name: Login to Github Container Registry + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: Get short SHA + id: slug + run: echo "::set-output name=sha12::$(echo ${GITHUB_SHA} | cut -c1-12)" + - + name: Build and push AVX version of guidemaker + uses: docker/build-push-action@v5 + with: + context: docker-images/webapp + push: true + tags: ghcr.io/usda-ars-gbru/guidemaker-webapp:sha-${{ steps.slug.outputs.sha12 }} + - + name: Build and push noavx version of guidemaker + uses: docker/build-push-action@v5 + with: + context: docker-images/noavx + push: true + tags: ghcr.io/usda-ars-gbru/guidemaker-noavx:sha-${{ steps.slug.outputs.sha12 }} diff --git a/docker-images/webapp/Dockerfile b/docker-images/avx/Dockerfile similarity index 98% rename from docker-images/webapp/Dockerfile rename to docker-images/avx/Dockerfile index 7f259a6..475980a 100644 --- a/docker-images/webapp/Dockerfile +++ b/docker-images/avx/Dockerfile @@ -34,4 +34,4 @@ RUN cp GuideMaker/guidemaker/data/Pseudomonas_aeruginosa.gbk.gz . RUN cp GuideMaker/guidemaker/data/Carsonella_ruddii.gbk.gz . # run web app -CMD streamlit run GuideMaker/guidemaker/data/app.py --server.maxUploadSize 500 \ No newline at end of file +CMD streamlit run GuideMaker/guidemaker/data/app.py --server.maxUploadSize 5000 \ No newline at end of file diff --git a/docker-images/nonavx/Dockerfile b/docker-images/nonavx/Dockerfile index a9f1414..a74af80 100644 --- a/docker-images/nonavx/Dockerfile +++ b/docker-images/nonavx/Dockerfile @@ -13,10 +13,10 @@ ARG MAMBA_DOCKERFILE_ACTIVATE=1 USER root RUN apt-get update && apt-get install -y --no-install-recommends \ - build-essential \ - python3-dev \ - zlib1g-dev \ - git && apt-get clean \ + build-essential=12.9 \ + python3-dev=3.9 \ + zlib1g-dev=1.2 \ + git=2.30 && apt-get clean \ && rm -rf /var/lib/apt/lists/* USER $MAMBA_USER @@ -34,4 +34,4 @@ RUN cp GuideMaker/guidemaker/data/Pseudomonas_aeruginosa.gbk.gz . RUN cp GuideMaker/guidemaker/data/Carsonella_ruddii.gbk.gz . # run web app -CMD streamlit run GuideMaker/guidemaker/data/app.py --server.maxUploadSize 500 \ No newline at end of file +CMD streamlit run GuideMaker/guidemaker/data/app.py --server.maxUploadSize 5000 \ No newline at end of file