{"id":18538158,"url":"https://github.com/emilemathieu/ml-infra","last_synced_at":"2025-05-15T02:11:31.938Z","repository":{"id":88389615,"uuid":"80755493","full_name":"emilemathieu/ML-Infra","owner":"emilemathieu","description":null,"archived":false,"fork":false,"pushed_at":"2017-02-06T11:09:48.000Z","size":1877,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-02-17T07:44:23.775Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","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/emilemathieu.png","metadata":{"files":{"readme":"README.md","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":"2017-02-02T18:29:15.000Z","updated_at":"2017-02-02T18:33:22.000Z","dependencies_parsed_at":null,"dependency_job_id":"f506532d-50b5-47dd-8413-2f596b844688","html_url":"https://github.com/emilemathieu/ML-Infra","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/emilemathieu%2FML-Infra","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emilemathieu%2FML-Infra/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emilemathieu%2FML-Infra/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emilemathieu%2FML-Infra/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/emilemathieu","download_url":"https://codeload.github.com/emilemathieu/ML-Infra/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254259386,"owners_count":22040821,"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-11-06T19:42:32.235Z","updated_at":"2025-05-15T02:11:26.927Z","avatar_url":"https://github.com/emilemathieu.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ML-Infra\n\n*The idea of this project is to predict the probability that a user click on the \"Works\" link on the [emilemathieu.fr](emilemathieu.fr) index webpage.\nTo do so, a logistic regression is regurarly fitted on the server, so as to take into account new data.\nThis dataset is expanded each time someone reach the index page of [emilemathieu.fr](emilemathieu.fr), by sending to the server basic information such as user's OS, browser, timeZone, language, etc.*\n\n## Development\n\nAdd the project address to your hosts:\n```shell\nsudo /bin/bash -c 'echo \"10.0.0.10  ml-infra.dev\" \u003e\u003e /private/etc/hosts'\n```\nYou must have the lastest version of [Vagrant](https://www.vagrantup.com/) installed.\n\n**To run a Vagrant command, you have to go the provisioning folder where the Vagranfile is situated:**\n```\ncd devops/provisioning\n```\n\nInstall roles:\n```\nansible-galaxy install -r requirements.txt --force\n```\n\nThen start and provision a **virtual machine**:\n```\nvagrant up\n```\n\nThe flask app is located under `/home/ML-Infra/current`.\nTo start the server, you can thus run:\n```\nvagrant ssh\nsource ../venvs/myenv/bin/activate\ncd /home/ML-Infra/current\npython main.py\n```\n\nNow, you should be able to see a Hello World when navigating to [http://ml-infra.dev](http://ml-infra.dev).\n\n\n## Production\n\nThe **Production** environment is hosted on AWS.\n\nAdd the project address to your hosts:\n```shell\nsudo /bin/bash -c 'echo \"34.250.87.12  ml-infra.prod\" \u003e\u003e /private/etc/hosts'\n```\n\n### Server Access\n```\nssh-add AWS_KEY.pem\nssh ubuntu@ml-infra.prod\n```\n\n### Provisioning\n\nFirst, go to the provisioning folder:\n```\ncd devops/provisioning\npip install -U ansible\nbrew install node\n```\n\nInstall roles:\n```\nansible-galaxy install -r requirements.txt --force\n```\n\nRun playbook:\n```\nansible-playbook playbook.yml -i inventory/production --user=ubuntu -vvvv\n```\n\n### Deployment\n\n```\nnpm install\nnpm run deploy:production\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femilemathieu%2Fml-infra","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Femilemathieu%2Fml-infra","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femilemathieu%2Fml-infra/lists"}