{"id":13424621,"url":"https://github.com/seabbs/tidyverse-gpu","last_synced_at":"2025-06-20T17:06:57.336Z","repository":{"id":99745324,"uuid":"167585541","full_name":"seabbs/tidyverse-gpu","owner":"seabbs","description":"Adding in support for GPU acceleration via CUDA to rocker/tidyverse","archived":false,"fork":false,"pushed_at":"2019-01-29T10:00:57.000Z","size":20,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-20T17:06:07.789Z","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/seabbs.png","metadata":{"files":{"readme":"README.Rmd","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-01-25T17:23:18.000Z","updated_at":"2022-09-01T19:39:40.000Z","dependencies_parsed_at":null,"dependency_job_id":"d0ddf07f-b1a0-4208-accc-84ee8ea3a41c","html_url":"https://github.com/seabbs/tidyverse-gpu","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/seabbs/tidyverse-gpu","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seabbs%2Ftidyverse-gpu","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seabbs%2Ftidyverse-gpu/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seabbs%2Ftidyverse-gpu/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seabbs%2Ftidyverse-gpu/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/seabbs","download_url":"https://codeload.github.com/seabbs/tidyverse-gpu/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seabbs%2Ftidyverse-gpu/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260985165,"owners_count":23092885,"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-07-31T00:00:57.093Z","updated_at":"2025-06-20T17:06:52.316Z","avatar_url":"https://github.com/seabbs.png","language":"Dockerfile","funding_links":[],"categories":["Dockerfile"],"sub_categories":[],"readme":"---\noutput: github_document\n---\n\n\u003c!-- README.md is generated from README.Rmd. Please edit that file --\u003e\n\n```{r setup, include = FALSE}\nknitr::opts_chunk$set(\n  collapse = TRUE,\n  comment = \"#\u003e\"\n)\n```\n\n# tidyverse-gpu\n\nA Docker image based on [rocker/tidyverse](https://github.com/rocker-org/rocker-versioned) including GPU support via CUDA. Based on [work](zhttps://github.com/ecohealthalliance/reservoir/blob/master/Dockerfile.gpu) done by [Noam Ross](https://github.com/noamross). The Docker image contains `xgboost` built for GPU's in both R and Python as well as the latest stable release of `h2o`. If you wanted to use a different version of CUDA to the one currently installed then change the relevant environment variables in the `Dockerfile` and rebuild the image.\n\n## Usage\n\nUse as [rocker/tidyverse](https://github.com/rocker-org/rocker-versioned) but replace all `docker` commands with [`nvidia-docker`](https://github.com/NVIDIA/nvidia-docker) commands (must have installed [`nvidia-docker`](https://github.com/NVIDIA/nvidia-docker) on the host system).\n\n* Pull/Build\n\n```{bash, eval = FALSE}\ndocker pull seabbs/tidyverse-gpu\n## Or build \n## Clone repo and navigate into the repo in the terminal\ndocker build . -t tidyverse-gpu\n```\n\n* Run\n\n```{bash, eval = FALSE}\nnvidia-docker run -d -p 8787:8787 -e USER=tidyverse-gpu -e PASSWORD=tidyverse-gpu --name tidyverse-gpu seabbs/tidyverse-gpu\n## Or build \nnvidia-docker run -d -p 8787:8787 -e USER=tidyverse-gpu -e PASSWORD=tidyverse-gpu --name tidyverse-gpu tidyverse-gpu\n```\n\n* Login: Go to `localhost:8787` and sign in using the password and username given with the `docker run` command\n\n## Nvidia Test\n\nRun `nvidia-smi` in a bash shell. If GPU support is working correctly it should return GPU usage and temperature information. \n\n```{bash, eval = FALSE}\nnvidia-smi\n```\n## Xgboost GPU Test\n\nIf the following runs without errors `xgboost` is installed and using the GPU.\n\n```{r, eval = FALSE}\nlibrary(xgboost)\n# load data\ndata(agaricus.train, package = 'xgboost')\ndata(agaricus.test, package = 'xgboost')\ntrain \u003c- agaricus.train\ntest \u003c- agaricus.test\n# fit model\nbst \u003c- xgboost(data = train$data, label = train$label, max_depth = 5, eta = 0.001, nrounds = 100,\n               nthread = 2, objective = \"binary:logistic\", tree_method = \"gpu_hist\")\n# predict\npred \u003c- predict(bst, test$data)\n```\n\n\n## Xgboost via H2O Test\n\n`h2o` provides a nice interface to `xgboost`, along with some great tools for hyper-parameter tuning. (*Note: This is not an install of `h2o4gpu` so only `h2o.xgboost` supports GPU acceleration.*)\n\n```{r, eval = FALSE}\n# Init h2o\nlibrary(h2o)\nh2o.init()\n\n# Load test data\naustralia_path \u003c- system.file(\"extdata\", \"australia.csv\", package = \"h2o\")\naustralia \u003c- h2o.uploadFile(path = australia_path)\nindependent \u003c- c(\"premax\", \"salmax\",\"minairtemp\", \"maxairtemp\", \"maxsst\",\n                 \"maxsoilmoist\", \"Max_czcs\")\ndependent \u003c- \"runoffnew\"\n\n# Run xgboost without GPU\nh2o.xgboost(y = dependent, x = independent, training_frame = australia,\n        ntrees = 1000, backend = \"cpu\")\n\n# Run xgboost with GPU\nh2o.xgboost(y = dependent, x = independent, training_frame = australia,\n            ntrees = 1000, backend = \"gpu\")\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseabbs%2Ftidyverse-gpu","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fseabbs%2Ftidyverse-gpu","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseabbs%2Ftidyverse-gpu/lists"}