{"id":13580760,"url":"https://github.com/f4exb/sdrangel-docker","last_synced_at":"2025-04-09T23:14:06.496Z","repository":{"id":42008331,"uuid":"174263756","full_name":"f4exb/sdrangel-docker","owner":"f4exb","description":"Running SDRangel in a Docker container","archived":false,"fork":false,"pushed_at":"2024-11-23T23:54:19.000Z","size":698,"stargazers_count":102,"open_issues_count":11,"forks_count":44,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-04-09T23:13:57.713Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Dockerfile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/f4exb.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-03-07T03:20:21.000Z","updated_at":"2025-04-08T08:26:30.000Z","dependencies_parsed_at":"2023-12-27T06:36:18.647Z","dependency_job_id":"1f0e261d-37cb-40b3-8c51-d16dfb87c16a","html_url":"https://github.com/f4exb/sdrangel-docker","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/f4exb%2Fsdrangel-docker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/f4exb%2Fsdrangel-docker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/f4exb%2Fsdrangel-docker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/f4exb%2Fsdrangel-docker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/f4exb","download_url":"https://codeload.github.com/f4exb/sdrangel-docker/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248125589,"owners_count":21051770,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T15:01:54.871Z","updated_at":"2025-04-09T23:14:06.473Z","avatar_url":"https://github.com/f4exb.png","language":"Dockerfile","funding_links":[],"categories":["Dockerfile"],"sub_categories":[],"readme":"![SDR Angel banner](doc/img/sdrangel_docker.png)\n\n\u003ch1\u003eRunning SDRangel in a Docker container\u003c/h1\u003e\n\n\u0026#9888; This is still experimental.\n\n[SDRangel](https://github.com/f4exb/sdrangel) is  is an Open Source Qt5 / OpenGL 3.0+ SDR and signal analyzer frontend to various hardware. It also supports remote and terminal (no GUI) operation and can be controlled or control other pieces of software with a REST API.\n\n[SDRangelCli](https://github.com/f4exb/sdrangelcli) is a browser based client application to control SDRangel in remote mode using its REST API.\n\nEventually Docker compose could be used to fire up the entire SDRangel and SDRangelCli ecosystem.\n\n**Check the discussion group** [here](https://groups.io/g/sdrangel)\n\n\u0026#9758; If you have already installed Docker and are familiar with it you can skip directly to the \"Docker images\" section at the bottom of the document\n\n\u003ch2\u003eInstall Docker\u003c/h2\u003e\n\nThis is of course the first step. Please check the [Docker related page](https://docs.docker.com/install/) and follow instructions for your distribution.\n\n\u003ch3\u003eWindows\u003c/h3\u003e\n\nYou can of course install Docker on Windows in two ways:\n  - Install Docker Desktop For Windows with Hyper-V activated\n  - Install with Oracle Virtualbox (do not activate Hyper-V)\n\nIt turns out that running Docker Desktop For Windows is not an option because you could display something on screen but there are too many issues with X-Server connection, sound and USB.\n\nThus you will have to run inside a Linux VM in Virtualbox. One important point is to install Virtualbox running the installation program as an administrator else you will not be able to attach USB devices to the virtual machine.\n\nThen things will be the same as when running Docker in a Linux box and thus all the following applies.\n\n\u0026#9888; Please note that this does not work as well as with a Linux native host or may not work at all.\n\n\u003ch2\u003eAdd your user to the docker group\u003c/h2\u003e\n\n**This step is important.** You must \u003cu\u003enot\u003c/u\u003e run the various scripts with `sudo` and therefore run docker commands with `sudo`.\n\nIn order to run docker commands as a normal user you will need to add your user to the `docker` group (using sudo once): `sudo usermod -a -G docker $USER`. Then you have to log out and back in to make it effective.\n\nType `groups` to verify `docker` is in the list of groups your user belongs to.\n\n\u003ch2\u003eGet familiar with Docker\u003c/h2\u003e\n\nAlthough a set of shell scripts are there to help you build images and run containers it is better to have some understanding on how Docker works and know its most used commands. There are tons of tutorials on the net to get familiar with Docker. Please take time to play with Docker a little bit so that you are proficient enough to know how to build and run images, start containers, etc... Be sure that this is not time wasted just to run this project. Docker is a top notch technology (although based on ancient roots) widely used in the computer industry and at the heart of many IT ecosystems.\n\n\u003ch2\u003eGUI tools\u003c/h2\u003e\n\nOptionally you can install a GUI tool to manage and monitor Docker images and containers.\n\n\u003ch3\u003eKitematic\u003c/h3\u003e\n\nKitematic is a GUI application to monitor and configure containers live. You can check the [home page here](https://kitematic.com/). Although flagged as \"legacy\" in Docker documentation it still alive on Github.\n\nYou can check the [Github repository](https://github.com/docker/kitematic) where a .deb package is available. Arch users will find a package in the AUR.\n\n\u003ch3\u003ePortainer\u003c/h3\u003e\n\nKitematic may not be completely functional. Then Portainer can be a good alternative or complement. Moreover Portainer has a richer functionality like showing the subnet to which a container belongs.\n\nPortainer is a web application that is itself started as a container.\n\nFor data persistency you will need to create a volume once with:\n\n`docker volume create portainer_data`\n\n Then you will start it with this Docker command:\n\n`docker run -d -p 9000:9000 --name portainer --privileged -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer --no-auth -H unix:///var/run/docker.sock`\n\nThen you simply open a browser page at: [http://localhost:9000](http://localhost:9000). You can use a different port on the host by changing the port mapping in the Docker run command.\n\nPortainer documentation [here](https://portainer.readthedocs.io/en/stable/deployment.html)\n\n\u003ch3\u003eVS code\u003c/h3\u003e\n\nVisual Studio Code has a plugin from Microsoft (peterjausovec.vscode-docker) that in addition to Dockerfile syntax highlighting facilitates logging into a container and showing the logs. Click on the whale icon in the left toolbar of VS Code to access these functions.\n\n\u003ch2\u003eGetting logs\u003c/h2\u003e\n\nThe GUI tools can access the log (container stdout and stderr) live but in many cases it is truncated and the start of the log is unavailable. To get a full log you will have to use the Docker CLI commands.\n\nFirst get a list of containers and spot the container for which you would like to get the log:\n\n\u003cpre\u003e\u003ccode\u003edocker ps\nCONTAINER ID        IMAGE                          COMMAND                  CREATED             STATUS              PORTS                                                                   NAMES\n8075e65626b1        sdrangelcli:latest             \"http-server\"            35 minutes ago      Up 35 minutes       0.0.0.0:8001-\u003e8080/tcp                                                  sdrangelcli_1\n48ebe711df3e        portainer/portainer            \"/portainer --no-auth\"   2 days ago          Up 31 minutes       0.0.0.0:9000-\u003e9000/tcp                                                  portainer\n2e2b2f97dae9        sdrangel/nvidia:v4.10.4        \"/start.sh\"              2 days ago          Up 8 minutes        0.0.0.0:8091-\u003e8091/tcp, 0.0.0.0:9094-\u003e9094/udp, 0.0.0.0:50022-\u003e22/tcp   sdrangel_1\n\u003c/code\u003e\u003c/pre\u003e\n\nLet's say I would like to get the log of the SDRangel instance. It is the container running the `sdrangel/nvidia:v4.10.4` image and has the ID `2e2b2f97dae9`. I see that it has been running since 8 minutes. I will use the `docker log` command that has a `--since` option to tell since when you want to get the log. I can give it any arbitrary value larger than 8 minutes to get the full log:\n\n\u003cpre\u003e\u003ccode\u003edocker logs --since 10m 2e2b2f97dae9 \u003e ~/sdrangel.log\u003c/code\u003e\u003c/pre\u003e\n\nOr I can pipe it directly into other commands like `less` to browse through it or `grep` to look for something in particular:\n\n\u003cpre\u003e\u003c/code\u003edocker logs --since 10m 2e2b2f97dae9 | grep -i perseus\n2019-03-14 02:33:46.113 (D) PluginManager::loadPluginsDir: fileName:  libinputperseus.so\n2019-03-14 02:33:46.113 (I) PluginManager::loadPluginsDir: loaded plugin libinputperseus.so\n2019-03-14 02:33:46.117 (D) PluginManager::registerSampleSource  Perseus Input  with source name  sdrangel.samplesource.perseus\n2019-03-14 02:33:46.666 (I) DevicePerseusScan::scan: device #0 firmware downloaded\n2019-03-14 02:33:46.666 (D) PerseusPlugin::enumSampleSources: enumerated Perseus device #0\n\u003c/code\u003e\u003c/pre\u003e\n\n\u003ch2\u003eDoing some cleanup\u003c/h2\u003e\n\nTo get the complete map of your docker space you issue the following command: `docker system df -v`.\n\nAt some point you will notice that your docker space has inflated dramatically and that eventually you might run out of space on the volume where the docker folder is hosted. There are two things you can do to do some cleanup.\n\n\u003ch3\u003eCleanup of unused images\u003c/h3\u003e\n\nIn the `Images space usage:` section on the top you will notice that some images have `\u003cnone\u003e` for the `REPOSITORY` and `TAG` references:\n\n\u003cpre\u003e\u003ccode\u003edocker system df -v\nImages space usage:\n\nREPOSITORY            TAG                    IMAGE ID            CREATED             SIZE                SHARED SIZE         UNIQUE SIZE         CONTAINERS\nsdrangel/nvidia       latest                 75f6bb9db0dc        28 hours ago        2.607GB             1.958GB             649.3MB             1\n\u0026lt;none\u0026gt;                \u0026lt;none\u0026gt;                 95a6fee5e547        2 days ago          2.607GB             1.958GB             648.4MB             0\nsdrangelcli           v1.1.4                 b7bcc59c8866        2 days ago          2.607GB             1.951GB             655.8MB             0\n\u003c/code\u003e\u003c/pre\u003e\n\nIn Docker terms these are called \"dangling images\". If an image gets superseded by an image with the same tag by a more recent build this image is still kept in the images repository but its references are set to `\u003cnone\u003e` and they cannot be used directly specifying a tag. A convenient command to get rid of them is:\n\n\u003cpre\u003e\u003ccode\u003edocker rmi $(docker images -q --filter \"dangling=true\")\nDeleted: sha256:95a6fee5e547891b8b3d739b416d46ed59378b019e15b191bb55ba4a99d4ba86\u003c/code\u003e\u003c/pre\u003e\n\nIf a dangling image is still in use by a container (its counter in the `CONTAINERS` column is not 0) then it cannot be deleted. You then have to wait until the container is exited and removed. Some disregarded containers may be left in an exit state. You can purge exited containers with the command\n\n\u003cpre\u003e\u003ccode\u003edocker rm $(docker ps -a -q)\nError response from daemon: You cannot remove a running container babf0aab863a8a4b23e362dac9bb3aed2fa6a2d782198e57a1e1001f635f1a62. Stop the container before attempting removal or force remove\n\u003c/code\u003e\u003c/pre\u003e\n\nAs you can see this command will not delete containers that are running.\n\n\u003ch3\u003eCleanup of the build cache\u003c/h3\u003e\n\nThe BuildKit feature of docker build is used in the various scripts presented here. It is nice because it preserves intermediate images but it keeps the build cache inflating. BuildKit comes with a garbage collector but it is not enabled by default. To enable it you have to edit `/etc/docker/daemon.json` so take your favorite editor (`vim`) and open the file with sudo: `sudo vim /etc/docker/daemon.json`. This is a JSON file and you will have to add this structure at the \"root\" of the JSON document i.e. at the level of the outermost brackets like this\n\n\u003cpre\u003e\u003ccode\u003e{\n    \"you may have something else here\": {...},\n    \"builder\": {\n        \"gc\": {\n            \"enabled\": true,\n            \"policy\": [\n                {\"keepStorage\": \"5GB\", \"all\": true}\n            ]\n        }\n    }\n}\u003c/code\u003e\u003c/pre\u003e\n\nThe `keepStorage` key gives a limit to the build cache. This is a target and actual space will generally be slightly higher and may occasionally be significantly higher but each time you restart Docker the build cache space will be reduced to around this value.\n\nYou have to restart Docker for this to take effect:\n\n  - with `systemctl` do: `sudo systemctl restart docker`\n  - with `service` do: `sudo service docker restart`\n\nYou can also remove dangling items in cache with the command: `docker builder prune`\n\n\u003ch2\u003eDocker images\u003c/h2\u003e\n\n\u003ch3\u003eFFTWisdom section\u003c/h3\u003e\n\nThe files contained in the `fftwisdom` directory are used to build an image to run the `fftw-wisdom` command in a container. This ensures the same environment as in the SDRangel images is used to produce the FFTW wisdom file that can be used with SDRangel. Please check the [readme](fftwisdom/readme.md) inside this folder for further information.\n\n\u003ch3\u003eSDRangel section\u003c/h3\u003e\n\nThe files contained in the `sdrangel` directory are used to build and run SDRangel images. Please check the [readme](sdrangel/readme.md) inside this folder for further information\n\n\u003ch3\u003eSDRangelCli section\u003c/h3\u003e\n\nThe files contained in the `sdrangelcli` directory are used to build and run SDRangelCli images. Please check the [readme](sdrangelcli/readme.md) inside this folder for further information\n\n\u003ch3\u003eSDRangelSpectrum section\u003c/h3\u003e\n\nThe files contained in the `sdrangelspectrum` directory are used to build and run SDRangelSpectrum images. Please check the [readme](sdrangelspectrum/readme.md) inside this folder for further information\n\n\u003ch3\u003eWSJT-X section\u003c/h3\u003e\n\nDue to possible delay in the audio when running SDRangel in a container WSJT-X may fail to decode.\n\nThe files contained in the `wsjtx` directory (see [readme](wsjtx/readme.md)) are used to build and run an image where WSJT-X and the `libfaketime` library are compiled. `libfaketime` is used to change system time as WSJT-X sees it.\n\nNote that this is only for your convenience. It is also possible to use `libfaketime` with WSJT-X in the host without impacting the system clock.\n\n\u003ch3\u003eCompose section\u003c/h3\u003e\n\nThe files contained in the `compose` directory are used to set up and run Docker Compose stacks. Please check the readme inside this folder for further information\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ff4exb%2Fsdrangel-docker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ff4exb%2Fsdrangel-docker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ff4exb%2Fsdrangel-docker/lists"}