From 43da4f96b2c7b2395c89eb7dfc461b6a0990095f Mon Sep 17 00:00:00 2001 From: Scott Wyman Neagle Date: Fri, 28 Jan 2022 09:20:37 -0500 Subject: [PATCH] Support for ARM (#27) * Force pip to build without the temp dir in order to avoid issues with future pip changes. * install gcc in Docker image #18 * use buildx to build multiple architectures are push to ECR #18 * version bump * testing workflow on this branch * fixing branch name * removing test flags Co-authored-by: Will Cunningham --- .github/workflows/.publish_master.yml.swp | Bin 12288 -> 0 bytes .github/workflows/publish_master.yml | 20 +++++++++++++++++++- CHANGELOG.md | 12 ++++++++++++ CONTRIBUTING.md | 2 +- Dockerfile | 6 +++++- VERSION | 2 +- requirements.txt | 4 ++-- 7 files changed, 40 insertions(+), 6 deletions(-) delete mode 100644 .github/workflows/.publish_master.yml.swp diff --git a/.github/workflows/.publish_master.yml.swp b/.github/workflows/.publish_master.yml.swp deleted file mode 100644 index 259e8d2d70d7aeb87f739388f9ef53581ff8d228..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 12288 zcmeHNOOM-B6m}7)JX%1oV0*|6s71AtrnEDpYBg?1XQH+-csYJNVj3 zqrNt5*dT#mhg1o%fFFQBLPFvPuz?j)CDc7a?AY>M#|fDh(Jt7aUaQ|k_C4o2=Y03v zL{^Vex!k-&t5(&(^}J#H=KR4vdTnU*4;jW-grR!;pey3Zh&{*%>o*l)d6>jkxSPr{ z>qoIn#d~Ep9F|JY3-v!%XizIY z58U%v-0BalfL1^&pcT*xXa%$aS^=$qRzNGD70?Q31^$N$FwZb{4jRVWPa=8z|Nrd$ z|L${!@hk8>@Es5VuK-KH@6TdR0JsgbfX9KmhhYzV3S0sX0#5+nVvgV&;49!u;0xe0 z;6vaRa1*!+_`n5V4OjvW0KYtA7@q^50Pg}X0e?Pi7s6dn6{lKdD-K(!dX-ab#a}7tOp4fm z*XUd(LXTMF(J+$%i2>{Lc|;=a1~HXT*O_JfDbd-pw7lNzY;@1{8k?6F41KY1Lp1X+ zm)jd#txm7KVeea?KRr`gzE%*zrdC_MQQBu{nt4j5@Z>bP4(sQ+(5q*u?D0`K%EFLN zQyTE-9?ygiV=2-&nV70rnoViaI}3)wCpMNSbS5ZyT)K&H_%yQIXRYcgEgx}NN>=%D zqt$M1Z600B*o)mgo{(vdcp|Yc3z3Q?5&7}LQx*Jv>m-Z*ZiLxht#iz&qGt$wvY)|B zcpt%Plu46g(9}GB&-%1;(JL;O(%j>d+I^kbMn^X~J-c3SwA;N4jotmNj64_Iu^;y{ zz^B)IbJ6Xe8hA>idRAg?Hu6P3OSq|?;&6Ewq7^KZYol2Ov*PPBQ^M(^1=D$@)AKPs z4xkRWyBBBa+NfGs%$d{*VTl5cmj}Xy(cGb&o-`;g&0I<+i_*-TAJYAUyfx!W?7(Ht zJ)Q5(Z=Hli2%i(GQ&ls-hZm6iz!fxjN1zrD1^3BM;(=;kx+q*8NlpVcA%{~RG%5GU znc!?DZos67`oz%2g8@%m$VB1P!!njYcfQ%##MaUItrpp|ZMQnjdiSE;qU~;Ld#l~B zsLjzk3xWJNp+TH*w0z1$D8WPa<}U5nt(Lvn**#5a1C>&I#G~9*42DSBqcKZVdJ~F$ zy3}aZH(+m{YhG-2b}3H4Q!hrMNl5a9OmU(zRgIYP1o2Sif^#HNM8Oe8#n?eV3y%>j zX$RjjTis4xnZpsCg_xfP!CbC55q%M%Syb9loI;CZ`8U}h_JpsJ^hL-e4KkTRvxg(h(E;5v{pJJ0a zesJ79{3s|DSPG(|OFhaWsFEkSzS$+)_jwZ2^gAk~Z8i4p&Ws7!&=D25RJfOpT1p%I i>&#_Ty09cwV$Hf|+S&EFoYhM8IN8P6JvAfOGX4V5@SQ3E diff --git a/.github/workflows/publish_master.yml b/.github/workflows/publish_master.yml index e132e5cc7..6d6dcfb70 100644 --- a/.github/workflows/publish_master.yml +++ b/.github/workflows/publish_master.yml @@ -50,9 +50,27 @@ jobs: TAG=$TAG-$SHORT_SHA fi echo "TAG=$TAG" >> $GITHUB_ENV + - name: Set up QEMU + uses: docker/setup-qemu-action@master + with: + platforms: all + - name: Set up Docker Buildx + id: buildx + uses: docker/setup-buildx-action@master + - name: Login to DockerHub + uses: docker/login-action@v1 + with: + registry: public.ecr.aws + username: ${{ secrets.AWS_KEY_ID }} + password: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - name: Build and push image - uses: pahud/ecr-public-action@8cd826db40befb59b0cd0b60b22a7ba72d06a7f7 + uses: docker/build-push-action@v2 with: + builder: ${{ steps.buildx.outputs.name }} + context: . + file: ./Dockerfile + platforms: linux/amd64,linux/arm64 + push: true tags: | ${{ secrets.AWS_ECR_REPO }}:latest ${{ secrets.AWS_ECR_REPO }}:${{ env.TAG }} diff --git a/CHANGELOG.md b/CHANGELOG.md index 658d44083..167b8ade3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,18 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [0.22.8] - 2022-01-27 + +### Fixed + +- publish workflow, using `docker buildx` to build images for x86 and ARM, prepare manifest and push to ECR so that pulls will match the correct architecture. +- typo in CONTRIBUTING +- installing `gcc` in Docker image so Docker can build wheels for `dask` and other packages that don't provide ARM wheels + +### Changed + +- updated versions in `requirements.txt` for `matplotlib` and `dask` + ## [0.22.7] - 2022-01-27 ### Added diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a39fdd91a..027dd48ef 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -14,7 +14,7 @@ where `my-github` is your personal GitHub account. We recommend using [Conda](https://www.anaconda.com/) to create an environment to install and develop Covalent. After you have [installed](https://docs.anaconda.com/anaconda/install/index.html) `conda`, create an environment: ```shell -conda create -n covalent-dev python:3.8 +conda create -n covalent-dev python=3.8 conda activate covalent-dev ``` diff --git a/Dockerfile b/Dockerfile index 0e8d3758b..295c32580 100644 --- a/Dockerfile +++ b/Dockerfile @@ -20,9 +20,13 @@ FROM python:3.8-slim-buster +RUN apt-get update && apt-get install -y \ + gcc \ + && rm -rf /var/lib/apt/lists/* + RUN mkdir -p /opt/covalent COPY . /opt/covalent -RUN pip install --no-cache-dir /opt/covalent +RUN pip install --no-cache-dir --use-feature=in-tree-build /opt/covalent EXPOSE 80 diff --git a/VERSION b/VERSION index 9e432c86f..eca6a4a43 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.22.7 +0.22.8 diff --git a/requirements.txt b/requirements.txt index 983e998d8..b34eef3c1 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,11 +1,11 @@ cloudpickle==2.0.0 -dask[distributed]==2021.10.0 +dask[distributed]==2022.1.0 eventlet==0.30.2 flask==2.0.1 flask-cors==3.0.10 flask-socketio==5.1.1 gunicorn==20.1.0 -matplotlib==3.3.1 +matplotlib==3.5.1 networkx==2.5 requests==2.24.0 sentinel==0.3.0