{"id":16284423,"url":"https://github.com/nuest/rocker-lightgbm","last_synced_at":"2026-02-17T18:03:46.412Z","repository":{"id":146971650,"uuid":"200210205","full_name":"nuest/rocker-lightgbm","owner":"nuest","description":"Add Microsofts LightGBM to a Rocker image including Python","archived":false,"fork":false,"pushed_at":"2019-08-08T09:24:54.000Z","size":15,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-10-08T13:49:54.582Z","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":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nuest.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":"2019-08-02T09:49:01.000Z","updated_at":"2019-08-08T09:24:56.000Z","dependencies_parsed_at":null,"dependency_job_id":"166bfcd3-d1ea-4f87-921a-795a85100517","html_url":"https://github.com/nuest/rocker-lightgbm","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/nuest/rocker-lightgbm","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nuest%2Frocker-lightgbm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nuest%2Frocker-lightgbm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nuest%2Frocker-lightgbm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nuest%2Frocker-lightgbm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nuest","download_url":"https://codeload.github.com/nuest/rocker-lightgbm/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nuest%2Frocker-lightgbm/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29552251,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-17T17:56:56.811Z","status":"ssl_error","status_checked_at":"2026-02-17T17:56:55.544Z","response_time":100,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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-10-10T19:19:30.439Z","updated_at":"2026-02-17T18:03:46.394Z","avatar_url":"https://github.com/nuest.png","language":"Dockerfile","readme":"# rocker-lightgbm\n\nAdd Microsoft's [LightGBM](https://github.com/microsoft/LightGBM) to a [Rocker](https://www.rocker-project.org/) Docker image.\n\n[![](https://img.shields.io/docker/cloud/automated/nuest/rocker-lightgbm)](https://hub.docker.com/r/nuest/rocker-lightgbm \"Automated build on Docker Hub\")\n [![](https://images.microbadger.com/badges/image/nuest/rocker-lightgbm.svg)](https://microbadger.com/images/nuest/rocker-lightgbm \"rocker-lightgbm on microbadger.com\")\n\n## About\n\nThe image includes Python and installs both the [LightGBM R package](https://github.com/microsoft/LightGBM/tree/master/R-package) and the [LightGBM Python](https://github.com/microsoft/LightGBM/tree/master/python-package) and the LigthGBM CLI.\n\nAs the base image we use `rocker/verse` so that the user has RStudio, and we have `git` for the installation.\nThe installation instructions were taken from the [LightGBM `Dockerfile`s](https://github.com/microsoft/LightGBM/tree/master/docker).\n\nThe `Dockerfile` in this repo uses the latest available R version for _demonstration_, though for _production_ and _reproducibility_ workflows should be build on the [version-stable `r-ver` stack of images](https://github.com/rocker-org/rocker-versioned/).\n\n## tl;dr\n\n```bash\ndocker run --rm -it -e PASSWORD=lightgbm -p 8787:8787 nuest/rocker-lightgbm\n```\n\n## Build locally\n\n```bash\ndocker build --tag rocker-lightgbm .\n```\n\n## R Example\n\n```R\ndaniel@gin-nuest:~/git/rocker-lightgbm$ docker run --rm -it rocker-lightgbm R\n\nR version 3.6.1 (2019-07-05) -- \"Action of the Toes\"\nCopyright (C) 2019 The R Foundation for Statistical Computing\nPlatform: x86_64-pc-linux-gnu (64-bit)\n\nR is free software and comes with ABSOLUTELY NO WARRANTY.\nYou are welcome to redistribute it under certain conditions.\nType 'license()' or 'licence()' for distribution details.\n\nR is a collaborative project with many contributors.\nType 'contributors()' for more information and\n'citation()' on how to cite R or R packages in publications.\n\nType 'demo()' for some demos, 'help()' for on-line help, or\n'help.start()' for an HTML browser interface to help.\nType 'q()' to quit R.\n\n\u003e library(lightgbm)\nLoading required package: R6\n\u003e data(agaricus.train, package='lightgbm')\n\u003e train \u003c- agaricus.train\n\u003e dtrain \u003c- lgb.Dataset(train$data, label=train$label)\nLoading required package: Matrix\n\u003e params \u003c- list(objective=\"regression\", metric=\"l2\")\n\u003e model \u003c- lgb.cv(params, dtrain, 10, nfold=5, min_data=1, learning_rate=1, early_stopping_rounds=10)\n[LightGBM] [Info] Total Bins 137\n[LightGBM] [Info] Number of data: 5211, number of used features: 116\n[LightGBM] [Info] Total Bins 137\n[LightGBM] [Info] Number of data: 5211, number of used features: 116\n[LightGBM] [Info] Total Bins 137\n[LightGBM] [Info] Number of data: 5210, number of used features: 116\n[LightGBM] [Info] Total Bins 137\n[LightGBM] [Info] Number of data: 5210, number of used features: 116\n[LightGBM] [Info] Total Bins 137\n[LightGBM] [Info] Number of data: 5210, number of used features: 116\n[LightGBM] [Info] Start training from score 0.483976\n[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n[LightGBM] [Info] Start training from score 0.482633\n[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n[LightGBM] [Info] Start training from score 0.486180\n[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n[LightGBM] [Info] Start training from score 0.476775\n[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n[LightGBM] [Info] Start training from score 0.480998\n[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n[1]:    valid's l2:0.00030722+0.000614439 \n[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n[2]:    valid's l2:0.00030722+0.000614439 \n[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n[3]:    valid's l2:0.00030722+0.000614439 \n[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n[LightGBM] [Warning] Stopped training because there are no more leaves that meet the split requirements\n[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n[4]:    valid's l2:0.00030722+0.000614439 \n[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n[LightGBM] [Warning] Stopped training because there are no more leaves that meet the split requirements\n[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n[5]:    valid's l2:0.00030722+0.000614439 \n[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n[LightGBM] [Warning] Stopped training because there are no more leaves that meet the split requirements\n[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n[6]:    valid's l2:0.00030722+0.000614439 \n[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n[LightGBM] [Warning] Stopped training because there are no more leaves that meet the split requirements\n[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n[LightGBM] [Warning] Stopped training because there are no more leaves that meet the split requirements\n[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n[7]:    valid's l2:0.00030722+0.000614439 \n[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n[LightGBM] [Warning] Stopped training because there are no more leaves that meet the split requirements\n[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n[LightGBM] [Warning] Stopped training because there are no more leaves that meet the split requirements\n[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n[LightGBM] [Warning] Stopped training because there are no more leaves that meet the split requirements\n[8]:    valid's l2:0.00030722+0.000614439 \n[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n[LightGBM] [Warning] Stopped training because there are no more leaves that meet the split requirements\n[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n[LightGBM] [Warning] Stopped training because there are no more leaves that meet the split requirements\n[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n[LightGBM] [Warning] Stopped training because there are no more leaves that meet the split requirements\n[9]:    valid's l2:0.00030722+0.000614439 \n[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n[LightGBM] [Warning] Stopped training because there are no more leaves that meet the split requirements\n[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n[LightGBM] [Warning] Stopped training because there are no more leaves that meet the split requirements\n[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n[LightGBM] [Warning] Stopped training because there are no more leaves that meet the split requirements\n[10]:   valid's l2:0.00030722+0.000614439 \n\u003e model\n\u003clgb.CVBooster\u003e\n  Public:\n    best_iter: 2\n    best_score: -0.000307219662058372\n    boosters: list\n    initialize: function (x) \n    record_evals: list\n    reset_parameter: function (new_params) \n\u003e \n```\n\n## Python\n\n```python\ndaniel@gin-nuest:~/git/rocker-lightgbm$ docker run --rm -it rocker-lightgbm python\nPython 3.7.3 (default, Mar 27 2019, 22:11:17) \n[GCC 7.3.0] :: Anaconda, Inc. on linux\nType \"help\", \"copyright\", \"credits\" or \"license\" for more information.\n\u003e\u003e\u003e import lightgbm as lgb\n\u003e\u003e\u003e lgb.\nlgb.Booster(              lgb.LGBMRanker(           lgb.callback              lgb.dir_path              lgb.os                    lgb.plotting              lgb.sklearn\nlgb.Dataset(              lgb.LGBMRegressor(        lgb.compat                lgb.early_stopping(       lgb.plot_importance(      lgb.print_evaluation(     lgb.system(\nlgb.LGBMClassifier(       lgb.absolute_import       lgb.create_tree_digraph(  lgb.engine                lgb.plot_metric(          lgb.record_evaluation(    lgb.train(\nlgb.LGBMModel(            lgb.basic                 lgb.cv(                   lgb.libpath               lgb.plot_tree(            lgb.reset_parameter(      lgb.warnings\n```\n\n## CLI Example\n\n```bash\ndaniel@gin-nuest:~/git/rocker-lightgbm$ docker run --rm -it rocker-lightgbm /bin/bash\nroot@f9d36b4f40d4:/# cd /lgbm/LightGBM/examples/binary_classification/\nroot@f9d36b4f40d4:/lgbm/LightGBM/examples/binary_classification# \nroot@f9d36b4f40d4:/lgbm/LightGBM/examples/binary_classification# lightgbm config=train.conf\n[LightGBM] [Info] Finished loading parameters\n[LightGBM] [Info] Loading weights...\n[LightGBM] [Info] Loading weights...\n[LightGBM] [Info] Finished loading data in 0.108329 seconds\n[LightGBM] [Warning] Starting from the 2.1.2 version, default value for the \"boost_from_average\" parameter in \"binary\" objective is true.\nThis may cause significantly different results comparing to the previous versions of LightGBM.\nTry to set boost_from_average=false, if your old models produce bad results\n[LightGBM] [Info] Number of positive: 3716, number of negative: 3284\n[LightGBM] [Info] Total Bins 6143\n[LightGBM] [Info] Number of data: 7000, number of used features: 28\n[LightGBM] [Info] Finished initializing training\n[LightGBM] [Info] Started training...\n[LightGBM] [Info] [binary:BoostFromScore]: pavg=0.530857 -\u003e initscore=0.123586\n[LightGBM] [Info] Start training from score 0.123586\n[LightGBM] [Info] Iteration:1, training auc : 0.779921\n[LightGBM] [Info] Iteration:1, training binary_logloss : 0.667427\n[LightGBM] [Info] Iteration:1, valid_1 auc : 0.718121\n[LightGBM] [Info] Iteration:1, valid_1 binary_logloss : 0.671716\n[LightGBM] [Info] 0.027388 seconds elapsed, finished iteration 1\n[LightGBM] [Info] Iteration:2, training auc : 0.801456\n[LightGBM] [Info] Iteration:2, training binary_logloss : 0.649324\n[LightGBM] [Info] Iteration:2, valid_1 auc : 0.734415\n[LightGBM] [Info] Iteration:2, valid_1 binary_logloss : 0.658775\n[LightGBM] [Info] 0.084440 seconds elapsed, finished iteration 2\n[LightGBM] [Info] Iteration:3, training auc : 0.823854\n\n[...]\n\n[LightGBM] [Info] 5.936735 seconds elapsed, finished iteration 99\n[LightGBM] [Info] Iteration:100, training auc : 0.997261\n[LightGBM] [Info] Iteration:100, training binary_logloss : 0.223612\n[LightGBM] [Info] Iteration:100, valid_1 auc : 0.823642\n[LightGBM] [Info] Iteration:100, valid_1 binary_logloss : 0.51086\n[LightGBM] [Info] 5.993593 seconds elapsed, finished iteration 100\n[LightGBM] [Info] Finished training\nroot@f9d36b4f40d4:/lgbm/LightGBM/examples/binary_classification# lightgbm config=predict.conf\n[LightGBM] [Info] Finished loading parameters\n[LightGBM] [Info] Finished initializing prediction, total used 100 iterations\n[LightGBM] [Info] Finished prediction\nroot@f9d36b4f40d4:/lgbm/LightGBM/examples/binary_classification# ls\nbinary.test  binary.test.weight  binary.train  binary.train.weight  forced_splits.json  LightGBM_model.txt  LightGBM_predict_result.txt  predict.conf  README.md  train.conf\n```\n\n## License\n\nCopyright 2019 Daniel Nüst, published under GPL v2.","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnuest%2Frocker-lightgbm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnuest%2Frocker-lightgbm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnuest%2Frocker-lightgbm/lists"}