{"id":18057391,"url":"https://github.com/1computer1/myriad","last_synced_at":"2025-04-11T04:41:26.452Z","repository":{"id":50754611,"uuid":"195975344","full_name":"1Computer1/myriad","owner":"1Computer1","description":"Arbitrary code execution","archived":false,"fork":false,"pushed_at":"2021-05-31T04:20:21.000Z","size":102,"stargazers_count":24,"open_issues_count":0,"forks_count":6,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-25T02:43:55.524Z","etag":null,"topics":["code","docker","eval","haskell","servant"],"latest_commit_sha":null,"homepage":null,"language":"Haskell","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/1Computer1.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}},"created_at":"2019-07-09T09:18:31.000Z","updated_at":"2024-07-18T13:54:20.000Z","dependencies_parsed_at":"2022-09-10T18:00:44.370Z","dependency_job_id":null,"html_url":"https://github.com/1Computer1/myriad","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1Computer1%2Fmyriad","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1Computer1%2Fmyriad/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1Computer1%2Fmyriad/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1Computer1%2Fmyriad/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/1Computer1","download_url":"https://codeload.github.com/1Computer1/myriad/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248345276,"owners_count":21088242,"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":["code","docker","eval","haskell","servant"],"created_at":"2024-10-31T02:07:35.675Z","updated_at":"2025-04-11T04:41:26.408Z","avatar_url":"https://github.com/1Computer1.png","language":"Haskell","readme":"# Myriad\n\nArbitrary code execution server using Docker.  \nEach language has its own Docker image and so each evaluation will run in the respective language's locked-down container.  \n\nFeatures include:\n\n- Building images on startup.\n- Preparing containers on startup or on demand.\n- Periodically cleanup running containers.\n- Customizable settings for each image:\n    - Maximum memory usage.\n    - Maximum CPU usage.\n    - Maximum evaluation time.\n    - Maximum concurrent evaluations.\n    - Maximum number of retries.\n    - Maximum output size.\n\nRequires Docker 18+ to operate.  \n\n## Download Pre-Built Binary\n\nCheck the `Releases` tab for pre-built binaries.  \nThe languages folder and an example configuration are also included.  \n\n## Installation from Source\n\nYou can use either `stack` or `cabal`.  \n- `stack` should be \u003e= 2.1.1, `cabal` should be \u003e= 2.4.0.0.\n- GHC 8.8.3 is required if not already installed by `stack` or if using `cabal`.\n\nMake sure the place where `stack` or `cabal` places binaries is in your PATH.  \n- For `stack`, you can get it with `stack path --local-bin`.\n- For `cabal`, you should find it in `$HOME/.cabal/bin` (Linux) or `%APPDATA%\\cabal\\bin` (Windows).\n\nRun `stack install` or `cabal new-install` inside the project folder.  \nOr, to build within the project, run `stack build` or `cabal new-build`.  \n\n## Configure and Run\n\nMake sure the configuration is filled out, see `config.example.yaml` for an example.  \nRun `myriad` (or `stack run` or `cabal new-run` if you built within the project) to start the server.  \nThe config and languages folder will default to `./config.yaml` and `./languages`.  \nYou can configure this with `--config` and `--languages`.  \n\n## Endpoints\n\n### **GET** `/languages`\n\nList of enabled languages.  \nExample response:  \n\n```json\n[\"haskell\", \"javascript\"]\n```\n\n### **POST** `/eval`\n\nEvaluate code.  \nJSON payload with `language` and `code` keys.  \nThe `language` is as in the name of a subfolder in the `languages` directory.  \nExample payload:  \n\n```json\n{ \"language\": \"haskell\", \"code\": \"main = print (1 + 1)\" }\n```\n\nExample response:  \n\n```json\n{ \"result\": \"2\\n\" }\n```\n\nErrors with 404 if `language` is not found, `504` if evaluation timed out, or `500` if evaluation failed for other reasons.  \n\n### **GET** `/containers`\n\nList of containers being handled by Myriad.  \n\n### **POST** `/cleanup`\n\nKill all containers, giving back the names of the containers killed.  \n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F1computer1%2Fmyriad","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F1computer1%2Fmyriad","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F1computer1%2Fmyriad/lists"}