Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions docker/accompaniator-dev/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
FROM accompaniator

RUN git clone https://github.com/nzinov/accompaniator
3 changes: 3 additions & 0 deletions docker/accompaniator-prod/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
FROM accompaniator

RUN git clone https://github.com/nzinov/accompaniator accompaniator
3 changes: 3 additions & 0 deletions docker/accompaniator/.bashrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
microphone-test () {
arecord -vvv -f dat /dev/null
}
30 changes: 30 additions & 0 deletions docker/accompaniator/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
FROM base/devel

RUN mkdir /build
WORKDIR /build

RUN pacman -Syu --noconfirm
RUN pacman -S --noconfirm alsa-lib alsa-utils alsa-plugins

RUN pacman -S --noconfirm fluidsynth soundfont-fluid mpg123 rtmidi

RUN pacman -S --noconfirm python python-pip python-virtualenv git htop \
&& mkdir env \
&& python3 -m venv env/ \
&& source env/bin/activate

RUN paccache -rk 0

# By copying over requirements first, we make sure that Docker will cache
# our installed requirements rather than reinstall them on every build
ADD requirements.txt /build/

RUN pip install --upgrade pip \
&& pip install -r requirements.txt

ADD . /build/

RUN mv asound.conf /etc/asound.conf
RUN cat ./.bashrc >> ~/.bashrc

CMD ./startup.sh
8 changes: 8 additions & 0 deletions docker/accompaniator/asound.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
pcm.!default {
type hw
card 1
}
ctl.!default {
type hw
card 1
}
6 changes: 6 additions & 0 deletions docker/accompaniator/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
aubio
pyaudio
mido
python-rtmidi
sklearn
tensorflow
13 changes: 13 additions & 0 deletions docker/accompaniator/startup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/bash

# Start the first process
nohup fluidsynth -a alsa -m alsa_seq -l -s -i /usr/share/soundfonts/FluidR3_GM.sf2 &
status=$?
if [ $status -ne 0 ]; then
echo "Failed to start fluidsynth: $status"
exit $status
else
echo "Fluidsynth ran successfully"
fi

bash
34 changes: 34 additions & 0 deletions docker/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
version: '3.1'

services:

accompaniator:
image: accompaniator
build: accompaniator
devices:
- /dev/snd:/dev/snd
volumes:
- /tmp/.X11-unix:/tmp/.X11-unix
- /run/dbus/:/run/dbus/:rw
- /dev/shm:/dev/shm

accompaniator-dev:
image: accompaniator-dev
build: accompaniator-dev
devices:
- /dev/snd:/dev/snd
volumes:
- /tmp/.X11-unix:/tmp/.X11-unix
- /run/dbus/:/run/dbus/:rw
- /dev/shm:/dev/shm
- ./../:/build/accompaniator

accompaniator-prod:
image: accompaniator-prod
build: accompaniator-prod
devices:
- /dev/snd:/dev/snd
volumes:
- /tmp/.X11-unix:/tmp/.X11-unix
- /run/dbus/:/run/dbus/:rw
- /dev/shm:/dev/shm
File renamed without changes.
File renamed without changes.