-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9 from oguzhan-yilmaz/dev
add dockerfile and cli
- Loading branch information
Showing
20 changed files
with
2,018 additions
and
115 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# pyCrossfade runs on python3.7 | ||
# and only debian buster supports it | ||
FROM debian:buster | ||
|
||
ENV DEBIAN_FRONTEND=noninteractive | ||
|
||
WORKDIR /app | ||
|
||
# install essentia dependencies: https://essentia.upf.edu/installing.html | ||
RUN apt-get update -y \ | ||
&& apt-get install -y build-essential libeigen3-dev libyaml-dev libfftw3-dev libavcodec-dev libavformat-dev libavutil-dev libswresample-dev libsamplerate0-dev libtag1-dev libchromaprint-dev \ | ||
&& apt-get autoremove -y | ||
|
||
RUN apt-get install -y python3.7-dev | ||
RUN apt-get install -y python3-pip | ||
|
||
# install pyCrossfade dependencies | ||
RUN apt-get install -y libsndfile1 rubberband-cli ffmpeg \ | ||
&& apt-get install -y libffi6 libffi-dev \ | ||
&& apt-get autoremove -y | ||
|
||
|
||
# i know this is ugly but its the only configuration that works | ||
RUN pip3 install Cython==0.29.36 setuptools==50.1.0 | ||
RUN pip3 install numpy==1.19.0 | ||
RUN pip3 install pyrubberband | ||
RUN pip3 install essentia | ||
RUN pip3 install yodel | ||
RUN pip3 install typer | ||
RUN pip3 install mido | ||
RUN pip3 install scipy==1.6.3 | ||
RUN pip3 install madmom --no-dependencies | ||
|
||
|
||
# Copy the current directory contents into the container at /app | ||
# COPY pycrossfade/ pycrossfade/ | ||
|
||
# Run pycrossfade/cli.py when the container launches | ||
# ENTRYPOINT ["python", "pycrossfade/cli.py"] | ||
|
||
|
||
CMD ["sleep", "infinity"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
// For format details, see https://aka.ms/devcontainer.json. For config options, see the | ||
// README at: https://github.com/devcontainers/templates/tree/main/src/docker-existing-dockerfile | ||
{ | ||
"name": "Existing Dockerfile", | ||
"build": { | ||
// Sets the run context to one level up instead of the .devcontainer folder. | ||
"context": "..", | ||
// Update the 'dockerFile' property if you aren't using the standard 'Dockerfile' filename. | ||
"dockerfile": "../Dockerfile" | ||
} | ||
|
||
// Features to add to the dev container. More info: https://containers.dev/features. | ||
// "features": {}, | ||
|
||
// Use 'forwardPorts' to make a list of ports inside the container available locally. | ||
// "forwardPorts": [], | ||
|
||
// Uncomment the next line to run commands after the container is created. | ||
// "postCreateCommand": "cat /etc/os-release", | ||
|
||
// Configure tool-specific properties. | ||
// "customizations": {}, | ||
|
||
// Uncomment to connect as an existing user other than the container default. More info: https://aka.ms/dev-containers-non-root. | ||
// "remoteUser": "devcontainer" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# This workflow uses actions that are not certified by GitHub. | ||
# They are provided by a third-party and are governed by | ||
# separate terms of service, privacy policy, and support | ||
# documentation. | ||
|
||
# GitHub recommends pinning actions to a commit SHA. | ||
# To get a newer version, you will need to update the SHA. | ||
# You can also reference a tag or branch, but the action may change without warning. | ||
|
||
name: Build and publish a pyCrossfade Docker image to ghcr.io | ||
on: | ||
# publish on releases, e.g. v2.1.13 (image tagged as "2.1.13" - "v" prefix is removed) | ||
release: | ||
types: [ published ] | ||
|
||
env: | ||
REGISTRY: ghcr.io | ||
IMAGE_NAME: pycrossfade | ||
|
||
jobs: | ||
build-and-push-balcony-docker-image: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
packages: write | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Log in to the Container registry | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: ${{ env.REGISTRY }} | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GHCR_TOKEN }} | ||
|
||
- name: Extract metadata (tags, labels) for Docker | ||
id: meta | ||
uses: docker/metadata-action@v4 | ||
with: | ||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | ||
|
||
- name: Build and push Docker image | ||
uses: docker/build-push-action@v4 | ||
with: | ||
context: . | ||
push: true | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,11 @@ | ||
*.pyc | ||
pycrossfade_annotations/ | ||
.vscode/ | ||
Dockerfile | ||
docker-compose.yml | ||
main.py | ||
multiple_song_mix.wav | ||
output_multiple.wav | ||
*.mp3 | ||
*.wav | ||
audios/ | ||
music-extractor--*.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# pyCrossfade runs on python3.7 | ||
# and only debian buster supports it | ||
FROM debian:buster | ||
|
||
ENV DEBIAN_FRONTEND=noninteractive | ||
|
||
WORKDIR /app | ||
|
||
# install essentia dependencies: https://essentia.upf.edu/installing.html | ||
RUN apt-get update -y \ | ||
&& apt-get install -y build-essential libeigen3-dev libyaml-dev libfftw3-dev libavcodec-dev libavformat-dev libavutil-dev libswresample-dev libsamplerate0-dev libtag1-dev libchromaprint-dev \ | ||
&& apt-get autoremove -y | ||
|
||
RUN apt-get install -y python3.7-dev | ||
RUN apt-get install -y python3-pip | ||
|
||
# install pyCrossfade dependencies | ||
RUN apt-get install -y libsndfile1 rubberband-cli ffmpeg \ | ||
&& apt-get install -y libffi6 libffi-dev \ | ||
&& apt-get autoremove -y | ||
|
||
|
||
# i know this is ugly but its the only configuration that works | ||
RUN pip3 install Cython==0.29.36 setuptools==50.1.0 | ||
RUN pip3 install numpy==1.19.0 | ||
RUN pip3 install pyrubberband==0.4.0 | ||
RUN pip3 install essentia==2.1b6.dev374 | ||
RUN pip3 install yodel==0.3.0 | ||
RUN pip3 install typer==0.14.0 | ||
RUN pip3 install mido==1.3.3 | ||
RUN pip3 install scipy==1.6.3 | ||
RUN pip3 install madmom==0.16.1 --no-dependencies | ||
|
||
|
||
# Copy the current directory contents into the container at /app | ||
COPY pycrossfade/ pycrossfade/ | ||
|
||
# Run pycrossfade/cli.py when the container launches | ||
ENTRYPOINT ["python3", "pycrossfade/cli.py"] | ||
|
||
|
||
# CMD ["sleep", "infinity"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# pyCrossfade on Docker | ||
|
||
```bash | ||
git config --global user.name "Oguzhan Yilmaz" | ||
git config --global user.email "[email protected]" | ||
``` | ||
|
||
|
||
```bash | ||
|
||
|
||
|
||
``` | ||
|
Oops, something went wrong.