Skip to content

Commit

Permalink
[#15] Add build-image.yaml workflow to build and publish to DockerHub…
Browse files Browse the repository at this point in the history
… the latest version
  • Loading branch information
xserrat committed Nov 13, 2022
1 parent 109dd72 commit fef1678
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 1 deletion.
44 changes: 44 additions & 0 deletions .github/workflows/build-image.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: ci

on:
push:
branches:
- 'issue#15-github-action'

jobs:
Build-Docker-Image:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v3
-
name: Set up QEMU
uses: docker/setup-qemu-action@v2
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
with:
platforms: linux/amd64,linux/arm64
-
name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Replace char '#' to '_' from GITHUB_REF_NAME env variable
id: github_ref_name_replacement_step
uses: frabert/[email protected]
with:
pattern: '#'
string: ${{ github.ref_name }}
replace-with: '_'
- run: ls -la
-
name: Build and push
uses: docker/build-push-action@v3
with:
context: .
push: true
tags: xserrat/facebook-demucs:${{ steps.github_ref_name_replacement_step.outputs.replaced }}
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ WORKDIR /lib/demucs
RUN git clone -b main --single-branch https://github.com/facebookresearch/demucs /lib/demucs

RUN python3 -m pip install -e .
RUN python3 -m demucs.separate -d cpu test.mp3 # Trigger model download
RUN python3 -m demucs.separate -d cpu --mp3 test.mp3 # Trigger model download
RUN rm -r separated # cleanup

VOLUME /data/input
Expand Down

0 comments on commit fef1678

Please sign in to comment.