Code Monkey home page Code Monkey logo

audirvana-docker's Introduction

audirvana-docker

Support me

ko-fi
Please see the Goal
Please note that support goal is limited to cover running costs for subscriptions to music services.

References

This is a set of tools you can use in order to build and run docker images for Audirvana Studio and Audirvana Origin. See here for more information.

Supported Platforms

The Audirvana applications can run on amd64 and on arm64 platforms.
This include Raspberry Pi SBC with a 64 bit version of Raspberry Pi OS.

Prerequisites

Docker

Docker must be installed on your system. Refer to your linux distribution documentation. For debian/ubuntu, you can refer to the next section.

Install Docker on Debian/Ubuntu

On debian and derived distributions (this includes Raspberry Pi OS, DietPi, Moode Audio, Volumio), we can install the necessary packages using the following commands:

sudo apt-get update
sudo apt-get install docker.io docker-compose
sudo usermod -a -G docker $USER

The last command adds the current user to the docker group. This is not mandatory; if you choose to skip this step, you might need to execute docker-compose commands by prepending sudo.
Please note that this method uses the docker packages available on the distro repositories.
If you want to install more up-to-date versions, refer to the guides here

Build

You can build your own images using the convenience scripts available in the root directory of this repository, build-origin.sh and build-studio.sh.
From a terminal, you will need to enter one of the following, depending of the version of Audirvana you want to build:

./build-origin.sh

or

./build-studio.sh

You might want to append --no-cache to these commands in order to force rebuild without caching.
I will not provide pre-built images, in order to avoid to include proprietary binaries.
Initially, I tried installing the binaries at container startup time, but then abandoned that road. It worked, but the delay in the startup phase was a bit too long for my taste.
Also, the resulting images could have been uploaded to docker hub, because they would not contain any binaries, but I believe that these would have provided very little advantage compared to the current solution.

Usage

Environment Variables

VARIABLE DESCRIPTION
ACCEPT_EULA You MUST set this to Y or YES, case insensitive
BINARY_TYPE Set it to either studio or origin
PUID The uid for the user you want to run the application, see User and Group ids
PGID The gid for the user you want to run the application, see User and Group ids
AUDIO_GID The additional gid, should be set to the audio group id, see User and Group ids
MUSIC_DIRECTORY The path to be mounted as /music, defaults to ./music

User and Group ids

Get the current user uid and gid by opening a terminal and entering:

id

This should return something like:

uid=1000(giovanni) gid=1000(giovanni) groups=1000(giovanni),995(audio)

Now you have your uid which is 1000, the gid which is also 1000, and the audio group id which in my case is 995.
Your user might not be in the audio group (albeit this is unlikely in a desktop system), in this case you can obtain the group id using the following:

getent group audio

Again in my case, this would return:

audio:x:995:giovanni,mpd

If the previous command does not return anything, the alsa libraries might not be installed correctly. Refer to your distro documentation to understand how to install alsa.
Please note that I removed all the additional groups just to make things hopefully more readable.

Configure

Configure the application you want to run by copying the sample.env file to a .env file:

cp sample.env .env

Tune the content of the .env file according to the previous table and to the information provided in the sample.env file.

Run

After you have built the image you want to run, and created you configuration, simply run the application using the following:

docker-compose up -d

You can watch the logs using:

docker-compose logs -f

(A bit more) Advanced

Compose file for Studio with builder

Build and start the Studio version of the application using the following command:

docker-compose -f docker-compose-studio.yaml up --build -d

Please note that this might trigger an image (re)build, if needed.

Compose file for Origin with builder

Build and start the Studio version of the application using the following command:

docker-compose -f docker-compose-origin.yaml up --build -d

Please note that this might trigger an image (re)build, if needed.

Renderer

You can easily add a player on mostly any device with audio capabilities using this example using my images for mpd, upmpdcli and yams.
Credit to the individual underlying projects can be found on the documentation of each repository.

audirvana-docker's People

Contributors

giof71 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.