{"id":23058365,"url":"https://github.com/patrickfrank1/lc0-docker","last_synced_at":"2026-04-29T16:04:16.685Z","repository":{"id":113550661,"uuid":"394731792","full_name":"patrickfrank1/lc0-docker","owner":"patrickfrank1","description":"Containerize Leela Chess Zero (lc0) for use on CPU devices. Also provides a simple python middleware for analyzing queued positions. Tested on raspberry pi 4. Some containers also include stockfish 14.","archived":false,"fork":false,"pushed_at":"2021-08-22T20:59:12.000Z","size":90309,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-08T20:12:44.628Z","etag":null,"topics":["chess","docker-image","lc0","raspberry-pi","stockfish"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/patrickfrank1.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2021-08-10T17:37:19.000Z","updated_at":"2024-02-22T02:52:24.000Z","dependencies_parsed_at":"2023-05-26T04:45:43.837Z","dependency_job_id":null,"html_url":"https://github.com/patrickfrank1/lc0-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/patrickfrank1%2Flc0-docker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patrickfrank1%2Flc0-docker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patrickfrank1%2Flc0-docker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patrickfrank1%2Flc0-docker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/patrickfrank1","download_url":"https://codeload.github.com/patrickfrank1/lc0-docker/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246944385,"owners_count":20858772,"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":["chess","docker-image","lc0","raspberry-pi","stockfish"],"created_at":"2024-12-16T02:15:13.112Z","updated_at":"2025-10-30T15:48:24.098Z","avatar_url":"https://github.com/patrickfrank1.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# lc0-docker\n\nRun [Leela Chess Zero](https://github.com/LeelaChessZero/lc0) anywhere in a docker container on CPU\n\n## Requirements\n\nThis repository requires a working docker installation on your host system. If you don't have docker installed, please follow the [official installation guide](https://docs.docker.com/engine/install/ubuntu/). Afterwards you can perform the following steps to get lc0 running.\n\n## Build an image and run a container\n\nFirst you need to clone the git repository:\n\n```bash\ngit clone https://github.com/patrickfrank1/lc0-docker.git\n```\n\nNext you select a git branch, each branch lets you build a different image. The images are described in detail in the subsections below. To build the image and run a container, simply execute the ./build.sh script. Scripts to stop and remove the container are also available.\n\n### lc0 base image\n\nThis image is implemented on the `master` branch. It installs lc0 and preconfigures it with the Leelenstein 15 network. Build the image and run the container with default settings:\n\n``` bash\n./build.sh\n```\n\nThe engine should now be accessible via command line.\n\n![image](https://user-images.githubusercontent.com/25801668/130368968-eabf85fe-549d-4fea-8a50-6dcb666c4311.png)\n\nCommunicate via [UCI Protocol](http://wbec-ridderkerk.nl/html/UCIProtocol.html), for example to analyse a position to depth 10 first set up the position, then strat the analysis.\n\n```\nposition fen rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR\ngo depth 10\n```\n\nThe console output should look something like this:\n\n![image](https://user-images.githubusercontent.com/25801668/130369155-39819e86-7506-4256-8bf5-8a0410683e36.png)\n\nExit the engine by sending the `quit` command, then exit the container by sending the `exit` command. Logs are by default saved to `./settings/log.txt` in your local directory.\n\n### lc0 and stockfish base image\n\nThis image is somewhat similar to the lc0 base image, with the exception that here two UCI compliant chess engines are available: lc0 and stockfish 14. To build the image check out the git branch `lc0-and-stockfish-command-line`.\n\n``` bash\ngit checkout lc0-and-stockfish-command-line\n```\n\nAfter building the image with the build script\n\n``` bash\n./build.sh\n```\n\nthe container provides the standard shell. To start lc0 execute the command\n\n``` bash\nlc0 --config=/lc0/settings/lc0.config \n```\n\nthis will set the correct path to the configuration and network files. To analyze with stockfish execute the command\n\n``` bash\nstockfish_14_x64_popcnt\n```\n\n### lc0 analysis with fie input and output\n\nThis image implements a service that analyses a set of positions and prints the analysis results to file. The container runs silently in the background. Check out the git branch `lc0-file-io`\n\n``` bash\ngit checkout lc0-file-io\n```\n\nand build the image\n\n``` bash\n./build.sh\n```\n\nnow navigate to `./analysis/queue.txt` in your workspace and follow the instructions therein. For example the following input, which runs an analysis for exactly one position\n\n![image](https://user-images.githubusercontent.com/25801668/130369628-1af28025-fbcd-4cbf-bb97-ed000ea2f261.png)\n\nresults in the following output file (truncated)\n\n![image](https://user-images.githubusercontent.com/25801668/130369674-54c51bd8-fd3f-4b03-84a2-9b8c4415ea8c.png)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpatrickfrank1%2Flc0-docker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpatrickfrank1%2Flc0-docker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpatrickfrank1%2Flc0-docker/lists"}