Skip to content

Commit

Permalink
updated the Docker and Github container registery deploy action. Both…
Browse files Browse the repository at this point in the history
…e 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.
  • Loading branch information
Adam R. Rivers committed Sep 18, 2023
1 parent 2003834 commit ecfa554
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 45 deletions.
75 changes: 36 additions & 39 deletions .github/workflows/docker_ghcr_io.yml
Original file line number Diff line number Diff line change
@@ -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 }}
Original file line number Diff line number Diff line change
Expand Up @@ -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
CMD streamlit run GuideMaker/guidemaker/data/app.py --server.maxUploadSize 5000
10 changes: 5 additions & 5 deletions docker-images/nonavx/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
CMD streamlit run GuideMaker/guidemaker/data/app.py --server.maxUploadSize 5000

0 comments on commit ecfa554

Please sign in to comment.