{"id":19174943,"url":"https://github.com/dtaniwaki/ucrspawner","last_synced_at":"2025-11-11T19:37:48.524Z","repository":{"id":144101938,"uuid":"120160735","full_name":"dtaniwaki/ucrspawner","owner":"dtaniwaki","description":"JupyterHub spawner for Marathon Universal Containerizer Runtime (UCR)","archived":false,"fork":false,"pushed_at":"2018-04-18T15:24:13.000Z","size":75,"stargazers_count":7,"open_issues_count":1,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-07-13T23:04:31.015Z","etag":null,"topics":["gpu","jupyter","jupyterhub","marathon","mesos","spawner","ucr"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dtaniwaki.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}},"created_at":"2018-02-04T06:23:45.000Z","updated_at":"2019-09-03T07:54:39.000Z","dependencies_parsed_at":"2024-01-14T00:21:20.217Z","dependency_job_id":"c7e73508-f49a-48ea-94f7-42ad4b97add5","html_url":"https://github.com/dtaniwaki/ucrspawner","commit_stats":{"total_commits":70,"total_committers":1,"mean_commits":70.0,"dds":0.0,"last_synced_commit":"e8fb5c507e3f3c6b38913dfee8a9f84bb36403af"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/dtaniwaki/ucrspawner","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dtaniwaki%2Fucrspawner","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dtaniwaki%2Fucrspawner/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dtaniwaki%2Fucrspawner/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dtaniwaki%2Fucrspawner/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dtaniwaki","download_url":"https://codeload.github.com/dtaniwaki/ucrspawner/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dtaniwaki%2Fucrspawner/sbom","scorecard":{"id":358273,"data":{"date":"2025-08-11","repo":{"name":"github.com/dtaniwaki/ucrspawner","commit":"e8fb5c507e3f3c6b38913dfee8a9f84bb36403af"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.8,"checks":[{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":0,"reason":"Found 0/29 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: containerImage not pinned by hash: Dockerfile:2","Warn: pipCommand not pinned by hash: Dockerfile:5","Warn: pipCommand not pinned by hash: Dockerfile:8-10","Info:   0 out of   1 containerImage dependencies pinned","Info:   0 out of   2 pipCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 2 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-18T10:09:03.665Z","repository_id":144101938,"created_at":"2025-08-18T10:09:03.665Z","updated_at":"2025-08-18T10:09:03.665Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":283921118,"owners_count":26916743,"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","status":"online","status_checked_at":"2025-11-11T02:00:06.610Z","response_time":65,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["gpu","jupyter","jupyterhub","marathon","mesos","spawner","ucr"],"created_at":"2024-11-09T10:19:54.312Z","updated_at":"2025-11-11T19:37:48.508Z","avatar_url":"https://github.com/dtaniwaki.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"**[Prerequisites](#prerequisites)** |\n**[Installation](#installation)** |\n**[Configuration](#configuration)** |\n**[Contributing](#contributing)** |\n**[Test](#test)** |\n**[License](#license)** |\n\n\n# UCRSpawner\n\n[![PyPI][pypi-image]][pypi-link]\n[![GitHub license][license-image]][license-link]\n[![PyVersions][pyversions-image]][pypi-link]\n[![Build Status][build-image]][build-link]\n[![codecov][cov-image]][cov-link]\n\n\nThe [JupyterHub](http://jupyterhub.readthedocs.io/en/latest/) spawner which utilizes [Universal Containerizer Runtime (UCR)](http://mesos.apache.org/documentation/latest/container-image/) in [Marathon](https://docs.mesosphere.com/1.9/deploying-services/containerizers/ucr/) so that you can use GPU.\n\nThe original idea of the Marathon integration is taken from https://github.com/vigsterkr/marathonspawner which uses Docker containerizer in Marathon.\n\n## Prerequisites\n\nJupyterHub 0.7 or above is required, which also means Python 3.3 or above.\n\n## Installation\n\nInstall ucrspawner to the system:\n\n```sh\npip install ucrspawner\n```\n\n## Installation from GitHub\n\n```sh\ngit clone https://github.com/dtaniwaki/ucrspawner\ncd ucrspawner\npython setup.py install\n```\n\n## Configuration\n\nTell JupyterHub to use `UCRSpawner` by adding the following line to your `jupyterhub_config.py`:\n\n\n```python\nc.JupyterHub.spawner_class = 'ucrspawner.UCRSpawner'\n```\n\nThen, specify the endpoint of Marathon.\n\n```python\nc.UCRSpawner.marathon_host = \"MARATHON_HOST\"\n```\n\n### App Image\n\nUsers can use any Docker image of [Jupyter docker stack](https://github.com/jupyter/docker-stacks) with `UCRSpawner`.\n\nSet the default app image if you want to change.\n\n```python\nc.UCRSpawner.app_image = 'jupyterhub/singleuser'\n```\n\nUsers can choose their own app image in the spawn option form as well.\n\nSpecify a user in Mesos slaves whose `UID` is the same as a user in your Docker image.\n\n```python\nc.UCRSpawner.mesos_user = 'jovyan_in_mesos'\n```\n\nIn the default user of docker stacks `jovyan`'s `UID` is `1000`, so you must have a user whose `UID` is `1000` in Mesos slaves as well. Otherwise, you need to change the `UID` of jovyan in Docker image instead.\n\nYou can also change the app ID prefix of Marathon.\n\n```python\nc.UCRSpawner.app_prefix = 'jupyter'\n```\n\n### Resource Limits\n\nWhile UCRSpawner has minimum computing resource limits, you can configure default and maximum resource limits.\n\n```python\nc.UCRSpawner.cpu = 1\nc.UCRSpawner.max_cpu = 4\nc.UCRSpawner.mem = 256 # in MB\nc.UCRSpawner.max_mem = 1024 # in MB\nc.UCRSpawner.disk = 1000 # in MB\nc.UCRSpawner.max_disk = 5000 # in MB\nc.UCRSpawner.gpu = 0\nc.UCRSpawner.max_gpu = 2\n```\n\n### Mesos Slaves\n\nYou can get available resources of meso slaves in your handlers, which inherit `BaseHandler` through this spawner.\n\n```python\nself.get_current_user().spawner.get_mesos_slaves()\n```\n\nSpecify Mesos master host in `jupyterhub_config.py` if the endpoint is different from the one which Marathon reports.\n\n```python\nc.UCRSpawner.mesos_master_host = 'MESOS_MASTER_HOST'\n```\n\n## Test\n\n```sh\npython setup.py test\n```\n\nOr use `tox` to test this package in multiple python versions.\n\n```sh\ntox\n```\n\n### Test UCRSpawner on JupyterHub\n\nYou can launch JupyterHub and the dependencies with UCRSpawner by docker-compose.\n\n```sh\ndocker-compose --project-name=ucrspawner up\n```\n\nWait for a while until all the services up, then, you will get access to JupyterHub at `http://localhost:8000`, Marathon at `http://localhost:8080` and Mesos Master at `http://localhost:5050`.\n\n## Contributing\n\n1. Fork it\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create new [Pull Request](../../pull/new/master)\n\n## Copyright\n\nCopyright (c) 2018 Daisuke Taniwaki. See [LICENSE](LICENSE) for details.\n\n\n[pypi-image]:  https://img.shields.io/pypi/v/ucrspawner.svg\n[pypi-link]:   https://pypi.python.org/pypi/ucrspawner\n[license-image]: https://img.shields.io/github/license/dtaniwaki/ucrspawner.svg\n[license-link]:  https://github.com/dtaniwaki/ucrspawner\n[pyversions-image]: https://img.shields.io/pypi/pyversions/ucrspawner.svg\n[build-image]: https://travis-ci.org/dtaniwaki/ucrspawner.svg\n[build-link]:  https://travis-ci.org/dtaniwaki/ucrspawner\n[cov-image]:   https://codecov.io/gh/dtaniwaki/ucrspawner/branch/master/graph/badge.svg\n[cov-link]:    https://codecov.io/gh/dtaniwaki/ucrspawner\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdtaniwaki%2Fucrspawner","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdtaniwaki%2Fucrspawner","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdtaniwaki%2Fucrspawner/lists"}