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
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!
By default, the cbioportal docker compose setup comes preloaded with the lgg_ucsf_2014
study, which is imported as part of the DOCKER_IMAGE_MYSQL
environment variable here. If you want to load custom studies, run the following commands.
# Start docker compose if not already running
docker compose up
# In a separate terminal, import custom study
docker compose exec cbioportal metaImport.py -u http://cbioportal:8080 -s study/lgg_ucsf_2014/ -o
# Restart cBioPortal
docker compose restart cbioportal
To enable hg38 support. First delete any existing databases and containers:
docker compose down -v
Then run
init_hg38.sh
Followed by:
docker compose up
When loading hg38 data make sure to set reference_genome: hg38
in meta_study.txt. The example study in study/
is hg19
based.
docker compose exec cbioportal-database \
sh -c 'mysql -hcbioportal-database -u"$MYSQL_USER" -p"$MYSQL_PASSWORD" "$MYSQL_DATABASE"'
A different version of cBioPortal can be run using docker compose by declaring the DOCKER_IMAGE_CBIOPORTAL
environmental variable. This variable can point a DockerHub image like so:
export DOCKER_IMAGE_CBIOPORTAL=cbioportal/cbioportal:3.1.0
docker compose up
which will start the v3.1.0 portal version rather than the newer default version.
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"
).