How to Host Label Studio on AWS Elastic Beanstalk
--
Label Studio is a great open source data labelling tool. However, if you’re keen on crowdsourcing labels for a supervised machine learning project, running label studio locally isn’t particularly useful. I toyed around with hosting label studio on Heroku but dealt with headaches around (pseudo-)spontaneously losing labels (thank you dynos…) half-way through a labelling effort. If you have access to AWS Elastic Beanstalk and would rather host an instance there, here is a step-by-step guide to hosting:
Set Up
Warning: I’m using the AWS GUI and I won’t go into detail about how you can do this via your terminal.
- Assuming you’ve signed into the AWS console, navigate to Elastic Beanstalk. I just searched it via the search bar:
2. Click ‘Create a new environment’:
3. You will be prompted to answer a series of questions. Select the following:
For Select environment tier, select Web server environment
For Create a web server environment, create an Application name, perhaps related to your specific labelling project or simply generic if you are going to host this instance for multiple labelling projects:
For Environment information, you can choose the name, subdomain, and description for your environment. I left these blank in favour of auto generated values, but if you would like to be more specific, feel free to.
For Platform, select Managed platform. From the Platform drop down menu, select Docker. Platform branch and Platform version will be auto populated as a result of selecting Docker via the Platform drop down menu.
For Application code, select Upload your code.
You will need to first create a Dockerrun.aws.json file that contains the following code:
{
"AWSEBDockerrunVersion": "1",
"Image": {
"Name": "heartexlabs/label-studio",
"Update": "true"
},
"Ports": [
{
"ContainerPort": "8080"
}
]
}
This will allow you to deploy a docker image from a public repository. In this instance, we’re deploying label-studio.
Once you’ve created this file, upload it and click ‘Create Environment’.
et voilà — You should be hosting your own label-studio instance. You don’t need to have label studio installed locally first to interact with this hosted instance.
Resources and final thoughts
- Label Studio as a useful slack channel that you can join if you have other questions to ask
- Here’s the Label Studio documentation
- You can also link up S3 with Label Studio via the Label Studio UI