From 3ef318e68a251fd87db96e1f807646ac041873ef Mon Sep 17 00:00:00 2001 From: fabio vincenzi Date: Mon, 15 Jul 2024 09:58:30 +0000 Subject: [PATCH 01/11] add aws-release job to ci --- .github/workflows/release.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index fce4fcac4..5d8c3f79f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -126,3 +126,15 @@ jobs: secrets: APP_ID: ${{ secrets.APP_ID }} APP_PRIVATE_KEY: ${{ secrets.APP_PRIVATE_KEY }} + + aws-release: + needs: docker-release + runs-on: self-hosted + steps: + - name: Pull docker image + run: docker pull gresearch/fasttrackml + - name: Delete old container + run: docker rm -f + - name: Run docker container go-app-container + run: docker run -d -p 4040:4040 --name go-app-container gresearch/fasttrackml + \ No newline at end of file From 223f0a4af3bbc642329abe28c6fbf48151e4cd1a Mon Sep 17 00:00:00 2001 From: fabio vincenzi Date: Fri, 19 Jul 2024 10:52:59 +0000 Subject: [PATCH 02/11] test --- .github/workflows/release.yml | 120 ---------------------------------- 1 file changed, 120 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5d8c3f79f..aceec99ea 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -7,126 +7,6 @@ permissions: contents: read jobs: - pypi-publish: - name: upload release to PyPI - if: startsWith(github.ref, 'refs/tags/v') - runs-on: ubuntu-latest - environment: release - permissions: - id-token: write - steps: - - name: Download artifact - uses: actions/download-artifact@v4 - with: - pattern: fasttrackml-wheels-* - merge-multiple: true - path: wheelhouse - - - name: Publish package distributions to PyPI - uses: pypa/gh-action-pypi-publish@release/v1 - with: - packages-dir: wheelhouse - - github-release: - name: Publish GitHub release - if: startsWith(github.ref, 'refs/tags/v') - runs-on: ubuntu-latest - permissions: - actions: write - contents: write - steps: - - name: Download artifact - uses: actions/download-artifact@v4 - with: - pattern: fasttrackml-archives-* - merge-multiple: true - path: dist - - - name: Create release - uses: softprops/action-gh-release@v2 - with: - generate_release_notes: true - files: dist/* - prerelease: ${{ contains(github.ref, '-') }} - - - name: Trigger website update - if: ${{ !contains(github.ref, '-') }} - env: - GH_TOKEN: ${{ github.token }} - run: gh workflow run --repo ${{ github.repository }} website.yml - - docker-release: - name: Publish container image to DockerHub - if: startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main' - runs-on: ubuntu-latest - environment: release - steps: - # We need to checkout the repo in order to determine the latest tag. - - name: Checkout - if: startsWith(github.ref, 'refs/tags/v') - uses: actions/checkout@v4 - with: - fetch-tags: 1 - - # The main branch is tagged as "main" and "edge". - # Tags are named after the version, e.g. "v0.1.0" -> "0.1.0". - # The latest non-prerelease version is also tagged as "latest". - # This is achieved by sorting the tags by version number, then filtering - # out prereleases and taking the last tag. - - name: Compute tags - id: tags - run: | - ref='${{ github.ref }}' - case $ref in - refs/heads/main) - tags=("main" "edge") - ;; - refs/tags/v*) - tags=("${ref#refs/tags/v}") - if [ "$(git -c 'versionsort.suffix=-' for-each-ref --sort=version:refname --format='%(refname)' 'refs/tags/v*' | grep -v -- - | tail -n1)" == "$ref" ]; then - tags+=("latest") - fi - esac - echo "ref=${ref#refs/*/}" >> $GITHUB_OUTPUT - echo "tags=${tags[@]}" >> $GITHUB_OUTPUT - - - name: Download artifact - uses: actions/download-artifact@v4 - with: - pattern: fasttrackml-oci-images-* - merge-multiple: true - - - name: Login to Docker Hub - uses: docker/login-action@v3 - with: - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} - - - name: Push to Docker Hub - run: | - tags=(${{ steps.tags.outputs.tags }}) - for image in fasttrackml-oci-*.tar - do - digest=$(tar -xOf $image index.json | jq -r '.manifests[0].digest') - digests+=($digest) - echo "::group::Pushing $image to ${{ vars.DOCKER_REPO }}@$digest" - skopeo copy oci-archive:$image:${{ steps.tags.outputs.ref }} docker://${{ vars.DOCKER_REPO }}@$digest - echo "::endgroup::" - done - echo "::group::Pushing merged manifest to ${{ vars.DOCKER_REPO }} for tags: ${tags[@]}" - docker buildx imagetools create \ - $(printf -- "--tag ${{ vars.DOCKER_REPO }}:%s " ${tags[@]}) \ - $(printf "${{ vars.DOCKER_REPO }}@%s " ${digests[@]}) - echo "::endgroup::" - - chart-release: - name: Publish Helm chart - if: startsWith(github.ref, 'refs/tags/v') - uses: G-Research/charts/.github/workflows/invoke-push.yaml@master - secrets: - APP_ID: ${{ secrets.APP_ID }} - APP_PRIVATE_KEY: ${{ secrets.APP_PRIVATE_KEY }} - aws-release: needs: docker-release runs-on: self-hosted From b6a5a5658907816d21a7a41c69ae58ae99820104 Mon Sep 17 00:00:00 2001 From: fabio vincenzi Date: Thu, 25 Jul 2024 12:32:13 +0000 Subject: [PATCH 03/11] change port --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index aceec99ea..662bc9b5f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -16,5 +16,5 @@ jobs: - name: Delete old container run: docker rm -f - name: Run docker container go-app-container - run: docker run -d -p 4040:4040 --name go-app-container gresearch/fasttrackml + run: docker run -d -p 80:5000 --name go-app-container gresearch/fasttrackml \ No newline at end of file From 628e55a8202c582cc41dfb10a12c5bad5995c23f Mon Sep 17 00:00:00 2001 From: fabio vincenzi Date: Wed, 7 Aug 2024 13:57:51 +0000 Subject: [PATCH 04/11] te --- .github/workflows/release.yml | 34 ++++++++++++++++++++++++---------- 1 file changed, 24 insertions(+), 10 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 662bc9b5f..eddbade61 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -7,14 +7,28 @@ permissions: contents: read jobs: - aws-release: - needs: docker-release - runs-on: self-hosted + deploy: + needs: build + runs-on: ubuntu-latest steps: - - name: Pull docker image - run: docker pull gresearch/fasttrackml - - name: Delete old container - run: docker rm -f - - name: Run docker container go-app-container - run: docker run -d -p 80:5000 --name go-app-container gresearch/fasttrackml - \ No newline at end of file + - name: Checkout code + uses: actions/checkout@v2 + - name: Login to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + - name: Set permissions for private key + run: | + echo "${{ secrets.AWS_PRIVATE_KEY }}" > key.pem + chmod 600 key.pem + - name: Pull Docker image + run: | + ssh -o StrictHostKeyChecking=no -i key.pem ubuntu@ec2-54-204-182-81.compute-1.amazonaws.com 'sudo docker pull gresearch/fasttrackml:latest' + - name: Stop running container + run: | + ssh -o StrictHostKeyChecking=no -i key.pem ubuntu@ec2-54-204-182-81.compute-1.amazonaws.com 'sudo docker stop cddemo || true' + ssh -o StrictHostKeyChecking=no -i key.pem ubuntu@ec2-54-204-182-81.compute-1.amazonaws.com 'sudo docker rm cddemo || true' + - name: Run new container + run: | + ssh -o StrictHostKeyChecking=no -i key.pem ubuntu@ec2-54-204-182-81.compute-1.amazonaws.com 'sudo docker run -d --name cddemo -p 80:3000 your-dockerhub-username/cddemo:latest' \ No newline at end of file From 85e22eae420237155273ed6d9cbabd0388653ce4 Mon Sep 17 00:00:00 2001 From: fabio vincenzi Date: Wed, 7 Aug 2024 14:00:48 +0000 Subject: [PATCH 05/11] fix release workflow --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index eddbade61..725d4a3f2 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -31,4 +31,4 @@ jobs: ssh -o StrictHostKeyChecking=no -i key.pem ubuntu@ec2-54-204-182-81.compute-1.amazonaws.com 'sudo docker rm cddemo || true' - name: Run new container run: | - ssh -o StrictHostKeyChecking=no -i key.pem ubuntu@ec2-54-204-182-81.compute-1.amazonaws.com 'sudo docker run -d --name cddemo -p 80:3000 your-dockerhub-username/cddemo:latest' \ No newline at end of file + ssh -o StrictHostKeyChecking=no -i key.pem ubuntu@ec2-54-204-182-81.compute-1.amazonaws.com 'sudo docker run -d --name fasttrackml -p 80:5000 gresearch/fasttrackml:latest' \ No newline at end of file From 1754e638f40664f92fc9ad762668b057a40080ab Mon Sep 17 00:00:00 2001 From: fabio vincenzi Date: Wed, 7 Aug 2024 14:02:54 +0000 Subject: [PATCH 06/11] fix workflow --- .github/workflows/release.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 725d4a3f2..2ed68cd55 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -8,7 +8,6 @@ permissions: jobs: deploy: - needs: build runs-on: ubuntu-latest steps: - name: Checkout code From f903d5b14305b0147fe23df1d93b296df4a93e27 Mon Sep 17 00:00:00 2001 From: fabio vincenzi Date: Wed, 7 Aug 2024 14:05:46 +0000 Subject: [PATCH 07/11] fix workflow --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2ed68cd55..b64b60990 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,7 +1,7 @@ name: Release on: - workflow_call: + push: permissions: contents: read From 42526c35ec24f37783316e0d4fa27b7aadd75e0d Mon Sep 17 00:00:00 2001 From: fabio vincenzi Date: Wed, 7 Aug 2024 14:06:50 +0000 Subject: [PATCH 08/11] new workflow --- .github/workflows/aws-release.yml | 33 +++++++++++++++++++++++++++++++ .github/workflows/release.yml | 2 +- 2 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/aws-release.yml diff --git a/.github/workflows/aws-release.yml b/.github/workflows/aws-release.yml new file mode 100644 index 000000000..b64b60990 --- /dev/null +++ b/.github/workflows/aws-release.yml @@ -0,0 +1,33 @@ +name: Release + +on: + push: + +permissions: + contents: read + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v2 + - name: Login to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + - name: Set permissions for private key + run: | + echo "${{ secrets.AWS_PRIVATE_KEY }}" > key.pem + chmod 600 key.pem + - name: Pull Docker image + run: | + ssh -o StrictHostKeyChecking=no -i key.pem ubuntu@ec2-54-204-182-81.compute-1.amazonaws.com 'sudo docker pull gresearch/fasttrackml:latest' + - name: Stop running container + run: | + ssh -o StrictHostKeyChecking=no -i key.pem ubuntu@ec2-54-204-182-81.compute-1.amazonaws.com 'sudo docker stop cddemo || true' + ssh -o StrictHostKeyChecking=no -i key.pem ubuntu@ec2-54-204-182-81.compute-1.amazonaws.com 'sudo docker rm cddemo || true' + - name: Run new container + run: | + ssh -o StrictHostKeyChecking=no -i key.pem ubuntu@ec2-54-204-182-81.compute-1.amazonaws.com 'sudo docker run -d --name fasttrackml -p 80:5000 gresearch/fasttrackml:latest' \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b64b60990..2ed68cd55 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,7 +1,7 @@ name: Release on: - push: + workflow_call: permissions: contents: read From dfa1b9bbad51f74163a34e35a6302bd3dd682eef Mon Sep 17 00:00:00 2001 From: fabio vincenzi Date: Wed, 7 Aug 2024 14:08:32 +0000 Subject: [PATCH 09/11] fix workflow --- .github/workflows/aws-release.yml | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/.github/workflows/aws-release.yml b/.github/workflows/aws-release.yml index b64b60990..59b4e2a62 100644 --- a/.github/workflows/aws-release.yml +++ b/.github/workflows/aws-release.yml @@ -12,11 +12,6 @@ jobs: steps: - name: Checkout code uses: actions/checkout@v2 - - name: Login to Docker Hub - uses: docker/login-action@v3 - with: - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} - name: Set permissions for private key run: | echo "${{ secrets.AWS_PRIVATE_KEY }}" > key.pem @@ -26,8 +21,8 @@ jobs: ssh -o StrictHostKeyChecking=no -i key.pem ubuntu@ec2-54-204-182-81.compute-1.amazonaws.com 'sudo docker pull gresearch/fasttrackml:latest' - name: Stop running container run: | - ssh -o StrictHostKeyChecking=no -i key.pem ubuntu@ec2-54-204-182-81.compute-1.amazonaws.com 'sudo docker stop cddemo || true' - ssh -o StrictHostKeyChecking=no -i key.pem ubuntu@ec2-54-204-182-81.compute-1.amazonaws.com 'sudo docker rm cddemo || true' + ssh -o StrictHostKeyChecking=no -i key.pem ubuntu@ec2-54-204-182-81.compute-1.amazonaws.com 'sudo docker stop fasttrackml || true' + ssh -o StrictHostKeyChecking=no -i key.pem ubuntu@ec2-54-204-182-81.compute-1.amazonaws.com 'sudo docker rm fasttrackml || true' - name: Run new container run: | ssh -o StrictHostKeyChecking=no -i key.pem ubuntu@ec2-54-204-182-81.compute-1.amazonaws.com 'sudo docker run -d --name fasttrackml -p 80:5000 gresearch/fasttrackml:latest' \ No newline at end of file From 72ae2235601b3592ae62736d351edd7216dac2b2 Mon Sep 17 00:00:00 2001 From: fabio vincenzi Date: Wed, 7 Aug 2024 14:25:17 +0000 Subject: [PATCH 10/11] fix workflow --- .github/workflows/aws-release.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/aws-release.yml b/.github/workflows/aws-release.yml index 59b4e2a62..baf428e5a 100644 --- a/.github/workflows/aws-release.yml +++ b/.github/workflows/aws-release.yml @@ -21,8 +21,7 @@ jobs: ssh -o StrictHostKeyChecking=no -i key.pem ubuntu@ec2-54-204-182-81.compute-1.amazonaws.com 'sudo docker pull gresearch/fasttrackml:latest' - name: Stop running container run: | - ssh -o StrictHostKeyChecking=no -i key.pem ubuntu@ec2-54-204-182-81.compute-1.amazonaws.com 'sudo docker stop fasttrackml || true' - ssh -o StrictHostKeyChecking=no -i key.pem ubuntu@ec2-54-204-182-81.compute-1.amazonaws.com 'sudo docker rm fasttrackml || true' + ssh -o StrictHostKeyChecking=no -i key.pem ubuntu@ec2-54-204-182-81.compute-1.amazonaws.com 'sudo docker rm -f fasttrackml || true' - name: Run new container run: | - ssh -o StrictHostKeyChecking=no -i key.pem ubuntu@ec2-54-204-182-81.compute-1.amazonaws.com 'sudo docker run -d --name fasttrackml -p 80:5000 gresearch/fasttrackml:latest' \ No newline at end of file + ssh -o StrictHostKeyChecking=no -i key.pem ubuntu@ec2-54-204-182-81.compute-1.amazonaws.com 'sudo docker run -d --name fasttrackml -p 80:5000 gresearch/fasttrackml' \ No newline at end of file From 9659fa64f7ba61d497f51d2ba27b7e6a2bd30ff1 Mon Sep 17 00:00:00 2001 From: fabio vincenzi Date: Wed, 7 Aug 2024 14:54:38 +0000 Subject: [PATCH 11/11] add aws release on release workflow --- .github/workflows/aws-release.yml | 27 ------ .github/workflows/release.yml | 134 ++++++++++++++++++++++++++++-- 2 files changed, 125 insertions(+), 36 deletions(-) delete mode 100644 .github/workflows/aws-release.yml diff --git a/.github/workflows/aws-release.yml b/.github/workflows/aws-release.yml deleted file mode 100644 index baf428e5a..000000000 --- a/.github/workflows/aws-release.yml +++ /dev/null @@ -1,27 +0,0 @@ -name: Release - -on: - push: - -permissions: - contents: read - -jobs: - deploy: - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v2 - - name: Set permissions for private key - run: | - echo "${{ secrets.AWS_PRIVATE_KEY }}" > key.pem - chmod 600 key.pem - - name: Pull Docker image - run: | - ssh -o StrictHostKeyChecking=no -i key.pem ubuntu@ec2-54-204-182-81.compute-1.amazonaws.com 'sudo docker pull gresearch/fasttrackml:latest' - - name: Stop running container - run: | - ssh -o StrictHostKeyChecking=no -i key.pem ubuntu@ec2-54-204-182-81.compute-1.amazonaws.com 'sudo docker rm -f fasttrackml || true' - - name: Run new container - run: | - ssh -o StrictHostKeyChecking=no -i key.pem ubuntu@ec2-54-204-182-81.compute-1.amazonaws.com 'sudo docker run -d --name fasttrackml -p 80:5000 gresearch/fasttrackml' \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2ed68cd55..f010bacc5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -7,16 +7,133 @@ permissions: contents: read jobs: - deploy: + pypi-publish: + name: upload release to PyPI + if: startsWith(github.ref, 'refs/tags/v') runs-on: ubuntu-latest + environment: release + permissions: + id-token: write + steps: + - name: Download artifact + uses: actions/download-artifact@v4 + with: + pattern: fasttrackml-wheels-* + merge-multiple: true + path: wheelhouse + + - name: Publish package distributions to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 + with: + packages-dir: wheelhouse + + github-release: + name: Publish GitHub release + if: startsWith(github.ref, 'refs/tags/v') + runs-on: ubuntu-latest + permissions: + actions: write + contents: write + steps: + - name: Download artifact + uses: actions/download-artifact@v4 + with: + pattern: fasttrackml-archives-* + merge-multiple: true + path: dist + + - name: Create release + uses: softprops/action-gh-release@v2 + with: + generate_release_notes: true + files: dist/* + prerelease: ${{ contains(github.ref, '-') }} + + - name: Trigger website update + if: ${{ !contains(github.ref, '-') }} + env: + GH_TOKEN: ${{ github.token }} + run: gh workflow run --repo ${{ github.repository }} website.yml + + docker-release: + name: Publish container image to DockerHub + if: startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main' + runs-on: ubuntu-latest + environment: release + steps: + # We need to checkout the repo in order to determine the latest tag. + - name: Checkout + if: startsWith(github.ref, 'refs/tags/v') + uses: actions/checkout@v4 + with: + fetch-tags: 1 + + # The main branch is tagged as "main" and "edge". + # Tags are named after the version, e.g. "v0.1.0" -> "0.1.0". + # The latest non-prerelease version is also tagged as "latest". + # This is achieved by sorting the tags by version number, then filtering + # out prereleases and taking the last tag. + - name: Compute tags + id: tags + run: | + ref='${{ github.ref }}' + case $ref in + refs/heads/main) + tags=("main" "edge") + ;; + refs/tags/v*) + tags=("${ref#refs/tags/v}") + if [ "$(git -c 'versionsort.suffix=-' for-each-ref --sort=version:refname --format='%(refname)' 'refs/tags/v*' | grep -v -- - | tail -n1)" == "$ref" ]; then + tags+=("latest") + fi + esac + echo "ref=${ref#refs/*/}" >> $GITHUB_OUTPUT + echo "tags=${tags[@]}" >> $GITHUB_OUTPUT + + - name: Download artifact + uses: actions/download-artifact@v4 + with: + pattern: fasttrackml-oci-images-* + merge-multiple: true + + - name: Login to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + + - name: Push to Docker Hub + run: | + tags=(${{ steps.tags.outputs.tags }}) + for image in fasttrackml-oci-*.tar + do + digest=$(tar -xOf $image index.json | jq -r '.manifests[0].digest') + digests+=($digest) + echo "::group::Pushing $image to ${{ vars.DOCKER_REPO }}@$digest" + skopeo copy oci-archive:$image:${{ steps.tags.outputs.ref }} docker://${{ vars.DOCKER_REPO }}@$digest + echo "::endgroup::" + done + echo "::group::Pushing merged manifest to ${{ vars.DOCKER_REPO }} for tags: ${tags[@]}" + docker buildx imagetools create \ + $(printf -- "--tag ${{ vars.DOCKER_REPO }}:%s " ${tags[@]}) \ + $(printf "${{ vars.DOCKER_REPO }}@%s " ${digests[@]}) + echo "::endgroup::" + + chart-release: + name: Publish Helm chart + if: startsWith(github.ref, 'refs/tags/v') + uses: G-Research/charts/.github/workflows/invoke-push.yaml@master + secrets: + APP_ID: ${{ secrets.APP_ID }} + APP_PRIVATE_KEY: ${{ secrets.APP_PRIVATE_KEY }} + + aws-release: + runs-on: ubuntu-latest + needs: + - docker-release steps: - name: Checkout code uses: actions/checkout@v2 - - name: Login to Docker Hub - uses: docker/login-action@v3 - with: - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} - name: Set permissions for private key run: | echo "${{ secrets.AWS_PRIVATE_KEY }}" > key.pem @@ -26,8 +143,7 @@ jobs: ssh -o StrictHostKeyChecking=no -i key.pem ubuntu@ec2-54-204-182-81.compute-1.amazonaws.com 'sudo docker pull gresearch/fasttrackml:latest' - name: Stop running container run: | - ssh -o StrictHostKeyChecking=no -i key.pem ubuntu@ec2-54-204-182-81.compute-1.amazonaws.com 'sudo docker stop cddemo || true' - ssh -o StrictHostKeyChecking=no -i key.pem ubuntu@ec2-54-204-182-81.compute-1.amazonaws.com 'sudo docker rm cddemo || true' + ssh -o StrictHostKeyChecking=no -i key.pem ubuntu@ec2-54-204-182-81.compute-1.amazonaws.com 'sudo docker rm -f fasttrackml || true' - name: Run new container run: | - ssh -o StrictHostKeyChecking=no -i key.pem ubuntu@ec2-54-204-182-81.compute-1.amazonaws.com 'sudo docker run -d --name fasttrackml -p 80:5000 gresearch/fasttrackml:latest' \ No newline at end of file + ssh -o StrictHostKeyChecking=no -i key.pem ubuntu@ec2-54-204-182-81.compute-1.amazonaws.com 'sudo docker run -d --name fasttrackml -p 80:5000 gresearch/fasttrackml' \ No newline at end of file