Skip to content

Commit

Permalink
Merge branch 'master' into tf2
Browse files Browse the repository at this point in the history
  • Loading branch information
romi1502 authored Sep 25, 2020
2 parents 1d91e41 + e6aeaa1 commit f6498d5
Show file tree
Hide file tree
Showing 39 changed files with 326 additions and 377 deletions.
285 changes: 0 additions & 285 deletions .circleci/config.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Those are the main contributing guidelines for contributing to this project:
In order to contribute, the safest is to create your [own fork of spleeter](https://help.github.com/en/github/getting-started-with-github/fork-a-repo) first. The following set of commands will clone this new repository, create a virtual environment provisioned with the dependencies and run the tests (will take a few minutes):

```bash
git clone https://github.com/<your_name>/spleeter
git clone https://github.com/<your_name>/spleeter && cd spleeter
python -m venv spleeterenv && source spleeterenv/bin/activate
pip install -r requirements.txt && pip install pytest pytest-xdist
make test
Expand Down
81 changes: 81 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
name: docker
on:
- workflow_dispatch
jobs:
build-test-push:
runs-on: ubuntu-latest
strategy:
matrix:
platform: [cpu, gpu]
distribution: [3.6, 3.7, conda]
model: [modelless, 2stems, 4stems, 5stems]
fail-fast: true
steps:
- uses: actions/checkout@v2
# ----------------------------------------------------------------------
# Note: base image building and env setup.
- name: Setup Python distribution
run: |
echo "::set-env name=base::python:${{ matrix.distribution }}"
echo "::set-env name=tag::${{ matrix.distribution }}"
echo "::set-env name=file::spleeter"
echo "::set-env name=package::spleeter"
- if: ${{ matrix.distribution == 'conda' }}
name: Build Conda base image
run: |
docker build -t python:conda -f docker/conda.dockerfile .
echo "::set-env name=file::spleeter-conda"
- if: ${{ matrix.platform == 'gpu' }}
name: Build CUDA base image
run: |
docker build \
--build-arg BASE=python:${{ matrix.distribution }} \
-t cuda:${{ matrix.distribution }} \
-f docker/cuda-10-0.dockerfile .
echo "::set-env name=base::cuda:${{ matrix.distribution }}"
echo "::set-env name=tag::${{ matrix.distribution }}-gpu"
echo "::set-env name=package::spleeter-gpu"
# ----------------------------------------------------------------------
# Note: image building.
- name: Build deezer/spleeter:${{ env.tag }} image
run: |
docker build \
--build-arg BASE=${{ env.base }} \
--build-arg SPLEETER_PACKAGE=${{ env.package }} \
-t deezer/spleeter:${{ env.tag }} \
-f docker/${{ env.file }}.dockerfile .
echo "::set-env name=modelargs::"
- if: ${{ matrix.model != 'modelless' }}
name: Build deezer/spleeter:${{ env.tag }}-${{ matrix.model }} image
run: |
docker build \
--build-arg BASE=deezer/spleeter:${{ env.tag }} \
--build-arg MODEL=${{ matrix.model }} \
-t deezer/spleeter:${{ env.tag }}-${{ matrix.model }} \
-f docker/spleeter-model.dockerfile .
echo "::set-env name=tag::${{ env.tag }}-${{ matrix.model }}"
echo "::set-env name=modelarg::-p spleeter:${{ matrix.model }}"
# ----------------------------------------------------------------------
# Note: image testing.
- name: Test deezer/spleeter:${{ env.tag }} image
run: |
docker run \
-v $(pwd):/runtime \
deezer/spleeter:${{ env.tag }} \
separate -i /runtime/audio_example.mp3 -o /tmp \${{ env.modelarg }}
# ----------------------------------------------------------------------
# Note: image deploy.
- name: Docker login
run: echo ${{ secrets.DOCKERHUB_PASSWORD }} | docker login -u ${{ secrets.DOCKERHUB_USERNAME }} --password-stdin
- name: Push deezer/spleeter:${{ env.tag }} image
run: docker push deezer/spleeter:${{ env.tag }}
- if: ${{ env.tag == 'spleeter:3.7' }}
name: Push deezer/spleeter:latest image
run: |
docker tag deezer/spleeter:3.7 deezer/spleeter:latest
docker push deezer/spleeter:latest
- if: ${{ env.tag == 'spleeter:3.7-gpu' }}
name: Push deezer/spleeter:gpu image
run: |
docker tag deezer/spleeter:3.7-gpu deezer/spleeter:gpu
docker push deezer/spleeter:gpu
Loading

0 comments on commit f6498d5

Please sign in to comment.