Skip to content

Commit

Permalink
Fix docker compose deprecation issue (#10939)
Browse files Browse the repository at this point in the history
* Fix docker package in integration tests
* Update related documentation
  • Loading branch information
dippindots authored Aug 14, 2024
1 parent 53d6679 commit 6bac584
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 21 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/integration-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
- name: 'Start cbioportal-docker-compose'
working-directory: ./cbioportal-docker-compose
run: |
docker-compose -f docker-compose.yml -f $PORTAL_SOURCE_DIR/test/integration/docker-compose-localbuild.yml up -d
docker compose -f docker-compose.yml -f $PORTAL_SOURCE_DIR/test/integration/docker-compose-localbuild.yml up -d
- name: 'Wait for cbioportal to initialize ...'
id: startup
uses: nev7n/wait_for_response@v1
Expand All @@ -66,7 +66,7 @@ jobs:
- name: Log cBioPortal Service
if: ${{ failure() && steps.startup.conclusion == 'failure' }}
working-directory: ./cbioportal-docker-compose
run: docker-compose logs cbioportal
run: docker compose logs cbioportal
- name: 'TEST - Validate and load study_es_0'
if: steps.startup.conclusion == 'success'
working-directory: ./cbioportal-docker-compose
Expand Down
4 changes: 2 additions & 2 deletions docs/Study-Curation-Guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ After having followed the steps in the [Docker Deployment instructions](docker/R

1. Choose another example study from the [datahub](https://github.com/cBioPortal/datahub/tree/master/public). Note the name of the folder which is identical to the study id defined in [meta_study.txt](https://github.com/cBioPortal/datahub/blob/master/public/lgg_ucsf_2014/meta_study.txt#L2).
2. From the root of the `cbioportal-docker-compose` folder run `DATAHUB_STUDIES=my_study_id ./study/init.sh`. Change `my_study_id` to the study you picked in 1. The study should now be downloaded in `./study/`.
3. Import the study by running `docker-compose exec cbioportal metaImport.py -u http://cbioportal:8080 -s study/my_study_id/ -o`. Again change `my_study_id` to the study you picked in 1. This should import the study.
4. Restart the cbioportal instance `docker-compose restart cbioportal` and see if the new study shows up on http://localhost:8080
3. Import the study by running `docker compose exec cbioportal metaImport.py -u http://cbioportal:8080 -s study/my_study_id/ -o`. Again change `my_study_id` to the study you picked in 1. This should import the study.
4. Restart the cbioportal instance `docker compose restart cbioportal` and see if the new study shows up on http://localhost:8080

## Curate a new study
The cBioPortal team has curated many published studies in formats suitable for import in cBioPortal. These can
Expand Down
14 changes: 7 additions & 7 deletions docs/deployment/docker/example_commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Use this command to import a gene panel. Specify the gene panel file by replacin
gene panel files in `./study` which is mounted inside the container on `/study/.

```shell
docker-compose run \
docker compose run \
-v <path_to_genepanel_file>:/gene_panels/gene_panel.txt:ro \
cbioportal \
bash -c 'cd /cbioportal/core/src/main/scripts/ && ./importGenePanel.pl --data /gene_panels/gene_panel.txt'
Expand All @@ -19,13 +19,13 @@ the study in its associated database. Make sure to replace `<path_to_report_fold
the absolute path were the html report of the validation will be saved.

```shell
docker-compose run \
docker compose run \
-v "<path_to_report_folder>:/report" \
cbioportal \
metaImport.py -u http://cbioportal:8080 -s /study/name_of_study --html=/report/report.html
```
:warning: after importing a study, remember to restart `cbioportal-container`
to see the study on the home page. Run `docker-compose restart cbioportal`.
to see the study on the home page. Run `docker compose restart cbioportal`.

To load data incrementally, specify `-d` instead of `-s` option.
For more details on incremental data loading, see [this page](./Incremental-Data-Loading.md).
Expand All @@ -35,7 +35,7 @@ For more details on incremental data loading, see [this page](./Incremental-Data
In some setups the data validation step may not have direct access to the web API, for instance when the web API is only accessible to authenticated browser sessions. You can use this command to generate a cached folder of files that the validation script can use instead. Make sure to replace `<path_to_portalinfo>` with the absolute path where the cached folder is going to be generated.

```shell
docker-compose run \
docker compose run \
-v "<path_to_portalinfo>/portalinfo:/portalinfo" \
-w /cbioportal/core/src/main/scripts \
cbioportal \
Expand All @@ -45,7 +45,7 @@ docker-compose run \
Then, grant the validation/loading command access to this folder and tell the script it to use it instead of the API:

```shell
docker-compose run \
docker compose run \
-v "<path_to_report_folder>:/report" \
-v "<path_to_portalinfo>/portalinfo:/portalinfo:ro" \
cbioportal \
Expand All @@ -55,7 +55,7 @@ docker-compose run \
### Inspecting or adjusting the database ###

```shell
docker-compose run cbioportal_database \
docker compose run cbioportal_database \
sh -c 'mysql -hcbioportal_database -u"$MYSQL_USER" -p"$MYSQL_PASSWORD" "$MYSQL_DATABASE"'
```

Expand All @@ -64,7 +64,7 @@ docker-compose run cbioportal_database \
To remove a study, run:

```shell
docker-compose run \
docker compose run \
cbioportal \
cbioportalImporter.py -c remove-study -id study_id
```
Expand Down
10 changes: 5 additions & 5 deletions docs/deployment/docker/import_data.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ To import gene panels for your study, please reference the example commands in [
These are the commands for importing `study_es_0` gene panels (`data_gene_panel_testpanel1` and `data_gene_panel_testpanel2`):

```shell
docker-compose run \
docker compose run \
cbioportal \
bash -c 'cd /cbioportal/core/src/main/scripts/ && ./importGenePanel.pl --data /cbioportal/core/src/test/scripts/test_data/study_es_0/data_gene_panel_testpanel1.txt'
```

```shell
docker-compose run \
docker compose run \
cbioportal \
bash -c 'cd /cbioportal/core/src/main/scripts/ && ./importGenePanel.pl --data /cbioportal/core/src/test/scripts/test_data/study_es_0/data_gene_panel_testpanel2.txt'
```
Expand All @@ -32,10 +32,10 @@ To import data for your study, please reference the example commands in [this fi
Command for importing `study_es_0` data:

```shell
docker-compose run cbioportal metaImport.py -u http://cbioportal:8080 -s /cbioportal/core/src/test/scripts/test_data/study_es_0 -o
docker compose run cbioportal metaImport.py -u http://cbioportal:8080 -s /cbioportal/core/src/test/scripts/test_data/study_es_0 -o
```

:warning: after importing a study, remember to restart `cbioportal` to see the study on the home page. Run `docker-compose restart cbioportal`.
:warning: after importing a study, remember to restart `cbioportal` to see the study on the home page. Run `docker compose restart cbioportal`.

You have now imported the test study `study_es_0`. Note that this study is included inside the cbioportal container. The process for adding a study that is outside of the container is similar. Just make sure to add the data files in the `./study` folder. This folder is mounted as `/study/` inside of the container.

Expand All @@ -57,7 +57,7 @@ Please make sure the seed database was correctly imported.
Remember to restart the `cbioportal` after data imported.

```shell
docker-compose restart cbioportal
docker compose restart cbioportal
```

#### Import GRCh38 data
Expand Down
4 changes: 2 additions & 2 deletions test/integration/test_integration_test_oncokb_import.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ set -e
run_in_service() {
service=$1
shift
docker-compose -f docker-compose.yml -f $PORTAL_SOURCE_DIR/test/integration/docker-compose-localbuild.yml \
docker compose -f docker-compose.yml -f $PORTAL_SOURCE_DIR/test/integration/docker-compose-localbuild.yml \
run --rm \
"$service" bash -c "$@"
}

run_in_service cbioportal "cd /cbioportal && ./integration_test_oncokb_import.sh"
run_in_service cbioportal "cd /cbioportal && ./integration_test_oncokb_import.sh"
2 changes: 1 addition & 1 deletion test/integration/test_load_study.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ set -e
run_in_service() {
service=$1
shift
docker-compose -f docker-compose.yml -f $PORTAL_SOURCE_DIR/test/integration/docker-compose-localbuild.yml \
docker compose -f docker-compose.yml -f $PORTAL_SOURCE_DIR/test/integration/docker-compose-localbuild.yml \
run --rm \
"$service" bash -c "$@"
}
Expand Down
4 changes: 2 additions & 2 deletions test/integration/test_update_oncokb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ set -e
run_in_service() {
service=$1
shift
docker-compose -f docker-compose.yml -f $PORTAL_SOURCE_DIR/test/integration/docker-compose-localbuild.yml \
docker compose -f docker-compose.yml -f $PORTAL_SOURCE_DIR/test/integration/docker-compose-localbuild.yml \
run --rm \
"$service" bash -c "$@"
}
Expand All @@ -19,4 +19,4 @@ run_in_service cbioportal 'python3 /core/scripts/importer/updateOncokbAnnotation

# Check that mutation annotations have been updated
# 2 annotations should be changed to "Putative_Driver" (depends on OncoKB version)
test `run_in_service cbioportal 'mysql -hcbioportal-database -ucbio_user -psomepassword cbioportal -e "SELECT alteration_driver_annotation.DRIVER_FILTER from cbioportal.alteration_driver_annotation inner join genetic_profile on genetic_profile.GENETIC_PROFILE_ID = alteration_driver_annotation.GENETIC_PROFILE_ID inner join cancer_study on cancer_study.CANCER_STUDY_ID = genetic_profile.CANCER_STUDY_ID WHERE cancer_study.CANCER_STUDY_IDENTIFIER = \"study_es_0\";"' | cat | grep -c 'Putative_Driver'` -eq 2
test `run_in_service cbioportal 'mysql -hcbioportal-database -ucbio_user -psomepassword cbioportal -e "SELECT alteration_driver_annotation.DRIVER_FILTER from cbioportal.alteration_driver_annotation inner join genetic_profile on genetic_profile.GENETIC_PROFILE_ID = alteration_driver_annotation.GENETIC_PROFILE_ID inner join cancer_study on cancer_study.CANCER_STUDY_ID = genetic_profile.CANCER_STUDY_ID WHERE cancer_study.CANCER_STUDY_IDENTIFIER = \"study_es_0\";"' | cat | grep -c 'Putative_Driver'` -eq 2

0 comments on commit 6bac584

Please sign in to comment.