Download necessary files (seed data, example config and example study from datahub):
./init.sh
Start docker containers. This can take a few minutes the first time because the database needs to import some data.
docker compose up
The cbioportal application should now be running at localhost:8080, with the one of the studies already loaded in it.
If you are developing and want to expose the MySQL database for inspection through a program like Sequel Pro, run:
docker compose -f docker-compose.yml -f dev/open-ports.yml up
In a different terminal import a study
docker-compose exec cbioportal metaImport.py -u http://cbioportal:8080 -s study/lgg_ucsf_2014/ -o
The example study in the study/ directory is based on hg19. When importing hg38 data, be sure to set reference_genome: hg38 in the meta_study.txt.
Restart the cbioportal container after importing
docker-compose restart cbioportal
The compose file uses docker volumes which persist data between reboots. To completely remove all data run:
docker compose down -v
If you were able to successfully set up a local installation of cBioPortal, please add it here: https://www.cbioportal.org/installations. Thank you!
docker compose exec cbioportal-database \
sh -c 'mysql -hcbioportal-database -u"$MYSQL_USER" -p"$MYSQL_PASSWORD" "$MYSQL_DATABASE"'
This cBioPortal Docker Compose setup runs the latest release of cBioPortal. If you want to run more recent pre-releases, follow the steps below:
- Modify
DOCKER_IMAGE_CBIOPORTALenvironmental variable to point to a valid cBioPortal Docker Image.export DOCKER_IMAGE_CBIOPORTAL=cbioportal/cbioportal:6.2.0 - Restart cbioportal
docker compose restart cbioportal
A web-only version of cBioPortal (suffixed -web-shenandoah) can be run using docker compose by declaring the DOCKER_IMAGE_CBIOPORTAL
environmental variable to point to the corresponding image:
export DOCKER_IMAGE_CBIOPORTAL=cbioportal/cbioportal:6.0.20-web-shenandoah
docker compose -f docker-compose.yml -f dev/docker-compose.web.yml up
which will start the v6.0.20-web-shenandoah version rather than the newest default version.
To set up a keycloak server with your cBioPortal instance for development purposes, check out the documentation.
You can change the heap size in the command section of the cbioportal container
For the importer you can't directly edit the java command used to import a study. Instead add JAVA_TOOL_OPTIONS as an environment variable to the cbioportal container and set the desired JVM parameters there (e.g. JAVA_TOOL_OPTIONS: "-Xms4g -Xmx8g").