Upgrade Label Studio
When upgrading Label Studio, keep the following in mind:
- Backup Your Data: Before starting the upgrade, make sure to back up your existing projects, databases, and any custom configurations.
- Review Release Notes: Check the release notes for the version you’re upgrading to. Pay attention to any breaking changes or migration steps that may be required.
- Python Compatibility: Ensure that your Python version is compatible with the new Label Studio release. Label Studio supports Python 3.9 through 3.13. Using an incompatible Python version can lead to installation errors.
- Check for Dependency Issues: After upgrading, verify that all dependencies are correctly installed. If you encounter missing package errors, you might need to install those packages manually. Running Label Studio in a clean Python environment or virtual environment can reduce the likelihood of package conflicts.
- Test Your Setup: After upgrading, test your Label Studio instance to ensure everything works as expected. Check key functionalities like task loading, labeling interfaces, data export, and any integrations you use.
- Troubleshoot Installation Issues: If you encounter any issues during the upgrade, see Troubleshoot installation issues.
Upgrade using pip
pip install --upgrade label-studio
Upgrade using Docker
Stop the existing Label Studio container:
docker ps # Find the container ID or name docker stop <container_id_or_name>
Pull the latest Label Studio Docker image:
docker pull heartexlabs/label-studio:latest
Start a new container with the latest image, using the same volume mappings as before:
docker run -it -p 8080:8080 \ -v /path/to/yourdata:/label-studio/data \ -v /path/to/yourfiles:/label-studio/files \ heartexlabs/label-studio:latest
Replace
/path/to/yourdata
and /path/to/yourfiles
with the actual paths you used previously.Run database migrations (if necessary).
If you encounter any issues after upgrading, you might need to run database migrations:
docker exec -it <container_id_or_name> bash cd /label-studio python manage.py migrate
Open Label Studio in your browser at
http://localhost:8080
and check that your projects and data are accessible.
Upgrade after installing from source
If you installed Label Studio using the source in Github, you can upgrade using the following steps.
If you’re using Poetry (see these instructions), upgrade with the following steps:
- Navigate to your Label Studio directory (where you cloned the repository).
- Fetch the latest changes from the repository:
git pull
- If you want to upgrade to a specific version, list available tags and checkout the desired one. For example, to upgrade to version 1.14.0:
git fetch --tags git checkout v1.14.0
- Install updated dependencies using Poetry:
poetry install
- Run database migrations to apply any updates to the database schema:
poetry run python label_studio/manage.py migrate
- Collect static files:
poetry run python label_studio/manage.py collectstatic
- Restart Label Studio:
poetry run python label_studio/manage.py runserver
- Navigate to your Label Studio directory (where you cloned the repository).
- Fetch the latest changes from the repository:
git pull
- If you want to upgrade to a specific version, list available tags and checkout the desired one. For example, to upgrade to version 1.14.0:
git fetch --tags git checkout v1.14.0
- Install updated dependencies:
pip install -r requirements.txt
- Run database migrations to apply any updates to the database schema:
python label_studio/manage.py migrate
- Collect static files:
python label_studio/manage.py collectstatic
- Restart Label Studio:
python label_studio/manage.py runserver