Skip to content

Commit

Permalink
Initial attempt at configuring conda package
Browse files Browse the repository at this point in the history
  • Loading branch information
beveradb committed Dec 23, 2023
1 parent f389911 commit b74cf17
Show file tree
Hide file tree
Showing 5 changed files with 101 additions and 17 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/publish-to-conda.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: publish-to-conda

on:
release:
types: [published]

jobs:
setup:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setting up anaconda for channels
uses: s-weigand/setup-conda@v1
with:
update-conda: true
conda-channels: anaconda, conda-forge
publish:
runs-on: ubuntu-latest
needs: setup
steps:
- uses: actions/checkout@v4
- name: Publish to anaconda.org
uses: fcakyon/[email protected]
with:
subdir: 'conda'
anacondatoken: ${{ secrets.ANACONDA_TOKEN }}
platforms: 'win osx linux'
Original file line number Diff line number Diff line change
@@ -1,23 +1,10 @@
name: Auto-publish
name: publish-to-docker

on: [push, workflow_dispatch]
on:
release:
types: [published]

jobs:
# Auto-publish when version is increased
publish-pypi:
# Only publish on `main` branch
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
permissions: # Don't forget permissions
contents: write

steps:
- uses: etils-actions/pypi-auto-publish@v1
with:
pypi-token: ${{ secrets.PYPI_API_TOKEN }}
gh-token: ${{ secrets.GITHUB_TOKEN }}
parse-changelog: false

build-and-push-docker:
runs-on: ubuntu-latest
steps:
Expand Down
19 changes: 19 additions & 0 deletions .github/workflows/publish-to-pypi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: publish-to-pypi

on: [push, workflow_dispatch]

jobs:
# Auto-publish when version is increased
publish-pypi:
# Only publish on `main` branch
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
permissions: # Don't forget permissions
contents: write

steps:
- uses: etils-actions/pypi-auto-publish@v1
with:
pypi-token: ${{ secrets.PYPI_API_TOKEN }}
gh-token: ${{ secrets.GITHUB_TOKEN }}
parse-changelog: false
34 changes: 34 additions & 0 deletions conda/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{% set name = "audio-separator" %}
{% set version = "0.9.6"%}

package:
name: "{{ name|lower }}"
version: "{{ version }}"

source:
path: ..

build:
number: 0
script: "{{ PYTHON }} -m pip install . -vv"

requirements:
host:
- python>=3.9
- pip
run:
- python>=3.9

about:
home: "https://github.com/karaokenerds/python-audio-separator"
license: "MIT"
license_family: MIT
summary: "Easy to use vocal separation on CLI or as a python package, using the amazing MDX-Net models from UVR."
description: |
Audio Separator is a Python package that allows you to separate an audio file into two stems, primary and secondary, using a model in the ONNX format trained by @Anjok07 for use with UVR (https://github.com/Anjok07/ultimatevocalremovergui).
doc_url: "https://github.com/karaokenerds/python-audio-separator"
dev_url: "https://github.com/karaokenerds/python-audio-separator"

extra:
recipe-maintainers:
- 757713
17 changes: 17 additions & 0 deletions environment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: audio-separator
channels:
- pytorch
- conda-forge
# We want to have a reproducible setup, so we don't want default channels,
# which may be different for different users. All required channels should
# be listed explicitly here.
- nodefaults
dependencies:
- python >=3.9
- mamba
- pip # pip must be mentioned explicitly, or conda-lock will fail
- poetry
- pytorch
- torchaudio
- onnxruntime
- ffmpeg

0 comments on commit b74cf17

Please sign in to comment.