From ebe9a96ed58f5ff6c3a9b9e10e3d5e260d61ccf1 Mon Sep 17 00:00:00 2001 From: Roman Donchenko Date: Mon, 5 Dec 2022 17:15:44 +0300 Subject: [PATCH 1/3] Migrate to Docker Compose V2 Compose V1 is EOL: . --- .github/workflows/full.yml | 8 ++-- .github/workflows/main.yml | 8 ++-- .github/workflows/publish_docker_images.yml | 2 +- .github/workflows/schedule.yml | 14 +++--- README.md | 2 +- components/serverless/README.md | 2 +- helm-chart/values.yaml | 2 +- .../docs/administration/advanced/analytics.md | 4 +- .../administration/advanced/backup_guide.md | 8 ++-- .../installation_automatic_annotation.md | 12 ++--- .../advanced/k8s_deployment_with_helm.md | 2 +- .../administration/advanced/upgrade_guide.md | 18 ++++---- .../administration/basics/installation.md | 45 ++++++++----------- .../basics/social-accounts-configuration.md | 4 +- .../en/docs/api_sdk/sdk/developer-guide.md | 2 +- .../en/docs/contributing/running-tests.md | 6 +-- site/content/en/docs/faq.md | 4 +- .../manual/advanced/serverless-tutorial.md | 6 +-- ssh/README.md | 2 +- tests/python/shared/fixtures/init.py | 6 ++- 20 files changed, 76 insertions(+), 81 deletions(-) diff --git a/.github/workflows/full.yml b/.github/workflows/full.yml index a60ccdba7052..6974af631494 100644 --- a/.github/workflows/full.yml +++ b/.github/workflows/full.yml @@ -255,14 +255,14 @@ jobs: HOST_COVERAGE_DATA_DIR: ${{ github.workspace }} CONTAINER_COVERAGE_DATA_DIR: "/coverage_data" run: | - docker-compose -f docker-compose.yml -f docker-compose.dev.yml up -d cvat_opa cvat_server + docker compose -f docker-compose.yml -f docker-compose.dev.yml up -d cvat_opa cvat_server max_tries=12 while [[ $(curl -s -o /dev/null -w "%{http_code}" localhost:8181/health?bundles) != "200" && max_tries -gt 0 ]]; do (( max_tries-- )); sleep 5; done - docker-compose -f docker-compose.yml -f docker-compose.dev.yml -f docker-compose.ci.yml run cvat_ci /bin/bash \ + docker compose -f docker-compose.yml -f docker-compose.dev.yml -f docker-compose.ci.yml run cvat_ci /bin/bash \ -c 'python manage.py test cvat/apps -v 2' - docker-compose -f docker-compose.yml -f docker-compose.dev.yml -f docker-compose.ci.yml run cvat_ci /bin/bash \ + docker compose -f docker-compose.yml -f docker-compose.dev.yml -f docker-compose.ci.yml run cvat_ci /bin/bash \ -c 'yarn --frozen-lockfile --ignore-scripts && yarn workspace cvat-core run test' - name: Creating a log file from cvat containers @@ -325,7 +325,7 @@ jobs: - name: Run CVAT instance run: | - docker-compose \ + docker compose \ -f docker-compose.yml \ -f docker-compose.dev.yml \ -f components/serverless/docker-compose.serverless.yml \ diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c9f6635fcefb..71658c94baae 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -222,15 +222,15 @@ jobs: HOST_COVERAGE_DATA_DIR: ${{ github.workspace }} CONTAINER_COVERAGE_DATA_DIR: "/coverage_data" run: | - docker-compose -f docker-compose.yml -f docker-compose.dev.yml up -d cvat_opa cvat_server + docker compose -f docker-compose.yml -f docker-compose.dev.yml up -d cvat_opa cvat_server max_tries=12 while [[ $(curl -s -o /dev/null -w "%{http_code}" localhost:8181/health?bundles) != "200" && max_tries -gt 0 ]]; do (( max_tries-- )); sleep 5; done - docker-compose -f docker-compose.yml -f docker-compose.dev.yml -f docker-compose.ci.yml run cvat_ci /bin/bash \ + docker compose -f docker-compose.yml -f docker-compose.dev.yml -f docker-compose.ci.yml run cvat_ci /bin/bash \ -c 'python manage.py test cvat/apps -v 2' - docker-compose -f docker-compose.yml -f docker-compose.dev.yml -f docker-compose.ci.yml run cvat_ci /bin/bash \ + docker compose -f docker-compose.yml -f docker-compose.dev.yml -f docker-compose.ci.yml run cvat_ci /bin/bash \ -c 'yarn --frozen-lockfile --ignore-scripts && yarn workspace cvat-core run test' - name: Creating a log file from cvat containers @@ -292,7 +292,7 @@ jobs: - name: Run CVAT instance run: | - docker-compose \ + docker compose \ -f docker-compose.yml \ -f docker-compose.dev.yml \ -f components/serverless/docker-compose.serverless.yml \ diff --git a/.github/workflows/publish_docker_images.yml b/.github/workflows/publish_docker_images.yml index 7be307139c80..ea4b78cfdf86 100644 --- a/.github/workflows/publish_docker_images.yml +++ b/.github/workflows/publish_docker_images.yml @@ -10,7 +10,7 @@ jobs: - uses: actions/checkout@v3 - name: Build images run: | - CVAT_VERSION=latest CLAM_AV=yes INSTALL_SOURCES=yes docker-compose -f docker-compose.yml -f docker-compose.dev.yml build + CVAT_VERSION=latest CLAM_AV=yes INSTALL_SOURCES=yes docker compose -f docker-compose.yml -f docker-compose.dev.yml build - name: Login to Docker Hub uses: docker/login-action@v1 with: diff --git a/.github/workflows/schedule.yml b/.github/workflows/schedule.yml index 05b946cecf53..619cdf44791f 100644 --- a/.github/workflows/schedule.yml +++ b/.github/workflows/schedule.yml @@ -246,17 +246,17 @@ jobs: HOST_COVERAGE_DATA_DIR: ${{ github.workspace }} CONTAINER_COVERAGE_DATA_DIR: "/coverage_data" run: | - docker-compose -f docker-compose.yml -f docker-compose.dev.yml up -d cvat_opa cvat_server + docker compose -f docker-compose.yml -f docker-compose.dev.yml up -d cvat_opa cvat_server max_tries=12 while [[ $(curl -s -o /dev/null -w "%{http_code}" localhost:8181/health?bundles) != "200" && max_tries -gt 0 ]]; do (( max_tries-- )); sleep 5; done - docker-compose -f docker-compose.yml -f docker-compose.dev.yml -f docker-compose.ci.yml run cvat_ci /bin/bash \ + docker compose -f docker-compose.yml -f docker-compose.dev.yml -f docker-compose.ci.yml run cvat_ci /bin/bash \ -c 'coverage run -a manage.py test cvat/apps && mv .coverage ${CONTAINER_COVERAGE_DATA_DIR}' - docker-compose -f docker-compose.yml -f docker-compose.dev.yml -f docker-compose.ci.yml run cvat_ci /bin/bash \ + docker compose -f docker-compose.yml -f docker-compose.dev.yml -f docker-compose.ci.yml run cvat_ci /bin/bash \ -c 'yarn --frozen-lockfile --ignore-scripts && yarn workspace cvat-core run test' - docker-compose -f docker-compose.yml -f docker-compose.dev.yml -f docker-compose.ci.yml down -v + docker compose -f docker-compose.yml -f docker-compose.dev.yml -f docker-compose.ci.yml down -v - name: Uploading code coverage results as an artifact uses: actions/upload-artifact@v3.1.1 @@ -318,7 +318,7 @@ jobs: - name: Run CVAT instance run: | - docker-compose \ + docker compose \ -f docker-compose.yml \ -f docker-compose.dev.yml \ -f tests/docker-compose.file_share.yml \ @@ -458,13 +458,13 @@ jobs: run: | npx nyc report --reporter=text-lcov >> ${HOST_COVERAGE_DATA_DIR}/lcov.info - docker-compose \ + docker compose \ -f docker-compose.yml \ -f docker-compose.dev.yml \ -f docker-compose.ci.yml \ run cvat_ci /bin/bash -c 'cd ${CONTAINER_COVERAGE_DATA_DIR} && coveralls-lcov -v -n lcov.info > ${CONTAINER_COVERAGE_DATA_DIR}/coverage.json' - docker-compose \ + docker compose \ -f docker-compose.yml \ -f docker-compose.dev.yml \ -f docker-compose.ci.yml \ diff --git a/README.md b/README.md index b642d5f25c02..e1dce92a1da4 100644 --- a/README.md +++ b/README.md @@ -98,7 +98,7 @@ Here are some screencasts showing how to use CVAT. [Computer Vision Annotation Course](https://www.youtube.com/playlist?list=PL0to7Ng4PuuYQT4eXlHb_oIlq_RPeuasN): we introduce our course series designed to help you annotate data faster and better using CVAT. This course is about CVAT deployment and integrations, it includes presentations and covers the following topics: - **Speeding up your data annotation process: introduction to CVAT and Datumaro**. What problems do CVAT and Datumaro solve, and how they can speed up your model training process. Some resources you can use to learn more about how to use them. -- **Deployment and use CVAT**. Use the app online at [app.cvat.ai](app.cvat.ai). A local deployment. A containerized local deployment with docker-compose (for regular use), and a local cluster deployment with Kubernetes (for enterprise users). A 2-minute tour of the interface, a breakdown of CVAT’s internals, and a demonstration of how to deploy CVAT using docker-compose. +- **Deployment and use CVAT**. Use the app online at [app.cvat.ai](app.cvat.ai). A local deployment. A containerized local deployment with Docker Compose (for regular use), and a local cluster deployment with Kubernetes (for enterprise users). A 2-minute tour of the interface, a breakdown of CVAT’s internals, and a demonstration of how to deploy CVAT using Docker Compose. [Product tour](https://www.youtube.com/playlist?list=PL0to7Ng4Puua37NJVMIShl_pzqJTigFzg): in this course, we show how to use CVAT, and help to get familiar with CVAT functionality and interfaces. This course does not cover integrations and is dedicated solely to CVAT. It covers the following topics: diff --git a/components/serverless/README.md b/components/serverless/README.md index 94edd9af100f..30cc53fc5e47 100644 --- a/components/serverless/README.md +++ b/components/serverless/README.md @@ -4,5 +4,5 @@ ```bash # From project root directory -docker-compose -f docker-compose.yml -f components/serverless/docker-compose.serverless.yml up -d +docker compose -f docker-compose.yml -f components/serverless/docker-compose.serverless.yml up -d ``` diff --git a/helm-chart/values.yaml b/helm-chart/values.yaml index a37d6fd53a18..568af28e729b 100644 --- a/helm-chart/values.yaml +++ b/helm-chart/values.yaml @@ -170,7 +170,7 @@ cvat: # - mountPath: /tmp # name: tmp # subPath: test - composeCompatibleServiceName: true # Sets service name to opa in order to be docker-compose compatible. Necessary because changing IAM_OPA_DATA_URL via environment variables in current images. Hinders multiple deployment due to duplicate name + composeCompatibleServiceName: true # Sets service name to opa in order to be compatible with Docker Compose. Necessary because changing IAM_OPA_DATA_URL via environment variables in current images. Hinders multiple deployment due to duplicate name service: type: ClusterIP ports: diff --git a/site/content/en/docs/administration/advanced/analytics.md b/site/content/en/docs/administration/advanced/analytics.md index 92a8dc2e28de..87f15c9625ff 100644 --- a/site/content/en/docs/administration/advanced/analytics.md +++ b/site/content/en/docs/administration/advanced/analytics.md @@ -19,14 +19,14 @@ It is possible to proxy annotation logs from client to ELK. To do that run the f ```bash # From project root directory -docker-compose -f docker-compose.yml -f components/analytics/docker-compose.analytics.yml build +docker compose -f docker-compose.yml -f components/analytics/docker-compose.analytics.yml build ``` ### Run docker container ```bash # From project root directory -docker-compose -f docker-compose.yml -f components/analytics/docker-compose.analytics.yml up -d +docker compose -f docker-compose.yml -f components/analytics/docker-compose.analytics.yml up -d ``` At the moment it is not possible to save advanced settings. Below values should be specified manually. diff --git a/site/content/en/docs/administration/advanced/backup_guide.md b/site/content/en/docs/administration/advanced/backup_guide.md index 3b5cad6f005a..0f223f16f76d 100644 --- a/site/content/en/docs/administration/advanced/backup_guide.md +++ b/site/content/en/docs/administration/advanced/backup_guide.md @@ -32,10 +32,10 @@ Docker volumes are used to store all CVAT data: All CVAT containers should be stopped before backup: ```shell -docker-compose stop +docker compose stop ``` -Please don't forget to include all the compose config files that were used in the docker-compose command +Please don't forget to include all the compose config files that were used in the `docker compose` command using the `-f` parameter. Backup data: @@ -66,7 +66,7 @@ Note: CVAT containers must exist (if no, please follow the [installation guide]( Stop all CVAT containers: ```shell -docker-compose stop +docker compose stop ``` Restore data: @@ -82,7 +82,7 @@ docker run --rm --name temp_backup --volumes-from cvat_elasticsearch -v $(pwd):/ After that run CVAT as usual: ```shell -docker-compose up -d +docker compose up -d ``` ## Additional resources diff --git a/site/content/en/docs/administration/advanced/installation_automatic_annotation.md b/site/content/en/docs/administration/advanced/installation_automatic_annotation.md index 8e0bed35194c..b6c4f2558e1b 100644 --- a/site/content/en/docs/administration/advanced/installation_automatic_annotation.md +++ b/site/content/en/docs/administration/advanced/installation_automatic_annotation.md @@ -11,21 +11,21 @@ description: 'Information about the installation of components needed for semi-a -> **⚠ WARNING: Do not use `docker-compose up`** -> If you did, make sure all containers are stopped by `docker-compose down`. +> **⚠ WARNING: Do not use `docker compose up`** +> If you did, make sure all containers are stopped by `docker compose down`. - To bring up cvat with auto annotation tool, from cvat root directory, you need to run: ```bash - docker-compose -f docker-compose.yml -f components/serverless/docker-compose.serverless.yml up -d + docker compose -f docker-compose.yml -f components/serverless/docker-compose.serverless.yml up -d ``` - If you did any changes to the docker-compose files, make sure to add `--build` at the end. + If you did any changes to the Docker Compose files, make sure to add `--build` at the end. To stop the containers, simply run: ```bash - docker-compose -f docker-compose.yml -f components/serverless/docker-compose.serverless.yml down + docker compose -f docker-compose.yml -f components/serverless/docker-compose.serverless.yml down ``` - You have to install `nuctl` command line tool to build and deploy serverless @@ -47,7 +47,7 @@ description: 'Information about the installation of components needed for semi-a - Create `cvat` project inside nuclio dashboard where you will deploy new serverless functions and deploy a couple of DL models. Commands below should be run only after CVAT has been installed - using `docker-compose` because it runs nuclio dashboard which manages all serverless functions. + using `docker compose` because it runs nuclio dashboard which manages all serverless functions. ```bash nuctl create project cvat diff --git a/site/content/en/docs/administration/advanced/k8s_deployment_with_helm.md b/site/content/en/docs/administration/advanced/k8s_deployment_with_helm.md index f70031480f96..34558c764bf9 100644 --- a/site/content/en/docs/administration/advanced/k8s_deployment_with_helm.md +++ b/site/content/en/docs/administration/advanced/k8s_deployment_with_helm.md @@ -149,7 +149,7 @@ Before starting, ensure that the following prerequisites are met: - Let's build custom elasticsearch, logstash and kibana images with the following command ```shell - docker-compose -f docker-compose.yml -f components/analytics/docker-compose.analytics.yml build + docker compose -f docker-compose.yml -f components/analytics/docker-compose.analytics.yml build ``` - Tag images: diff --git a/site/content/en/docs/administration/advanced/upgrade_guide.md b/site/content/en/docs/administration/advanced/upgrade_guide.md index eb790654dbcb..ca895827e753 100644 --- a/site/content/en/docs/administration/advanced/upgrade_guide.md +++ b/site/content/en/docs/administration/advanced/upgrade_guide.md @@ -19,16 +19,16 @@ To upgrade CVAT, follow these steps: - Go to the previously cloned CVAT directory and stop all CVAT containers with: ```shell - docker-compose down + docker compose down ``` If you have included [additional components](/docs/administration/basics/installation/#additional-components), include all compose configuration files that are used, e.g.: ```shell - docker-compose -f docker-compose.yml -f components/analytics/docker-compose.analytics.yml down + docker compose -f docker-compose.yml -f components/analytics/docker-compose.analytics.yml down ``` - Update CVAT source code by any preferable way: clone with git or download zip file from GitHub. - Note that you need to download the entire source code, not just the `docker-compose` configuration file. + Note that you need to download the entire source code, not just the Docker Compose configuration file. Check the [installation guide](/docs/administration/basics/installation/#how-to-get-cvat-source-code) for details. @@ -44,7 +44,7 @@ To upgrade CVAT, follow these steps: - Start CVAT with: ```shell - docker-compose up -d + docker compose up -d ``` When CVAT starts, it will upgrade its DB in accordance with the latest schema. It can take time especially if you have a lot of data. @@ -60,7 +60,7 @@ Step by step commands how to udgrade CVAT from v1.7.0 to v2.1.0. Let's assume that you have CVAT v1.7.0 working. ```shell cd cvat -docker-compose down +docker compose down cd .. mv cvat cvat_old wget https://github.com/opencv/cvat/archive/refs/tags/v2.1.0.zip @@ -70,7 +70,7 @@ docker pull cvat/server:v2.1.0 docker tag cvat/server:v2.1.0 openvino/cvat_server:latest docker pull cvat/ui:v2.1.0 docker tag cvat/ui:v2.1.0 openvino/cvat_ui:latest -docker-compose up -d +docker compose up -d ``` ## How to upgrade PostgreSQL database base image @@ -86,7 +86,7 @@ docker-compose up -d 1. Stop CVAT: ```shell - docker-compose down + docker compose down ``` 1. Delete current PostrgeSQL’s volume, that's why it's important to have a backup: @@ -100,7 +100,7 @@ docker-compose up -d 1. Start database container only: ```shell - docker-compose up -d cvat_db + docker compose up -d cvat_db ``` 1. Import PostgreSQL dump into new DB container: @@ -110,5 +110,5 @@ docker-compose up -d 1. Start CVAT: ```shell - docker-compose up -d + docker compose up -d ``` diff --git a/site/content/en/docs/administration/basics/installation.md b/site/content/en/docs/administration/basics/installation.md index fb586087d9ba..9266e6630dc0 100644 --- a/site/content/en/docs/administration/basics/installation.md +++ b/site/content/en/docs/administration/basics/installation.md @@ -28,7 +28,7 @@ For access from China, read [sources for users from China](#sources-for-users-fr - Open a terminal window. If you don't know how to open a terminal window on Ubuntu please read [the answer](https://askubuntu.com/questions/183775/how-do-i-open-a-terminal). -- Type commands below into the terminal window to install `docker`. More +- Type commands below into the terminal window to install Docker and Docker Compose. More instructions can be found [here](https://docs.docker.com/install/linux/docker-ce/ubuntu/). ```shell @@ -45,7 +45,8 @@ For access from China, read [sources for users from China](#sources-for-users-fr $(lsb_release -cs) \ stable" sudo apt-get update - sudo apt-get --no-install-recommends install -y docker-ce docker-ce-cli containerd.io + sudo apt-get --no-install-recommends install -y \ + docker-ce docker-ce-cli containerd.io docker-compose-plugin ``` - Perform [post-installation steps](https://docs.docker.com/install/linux/linux-postinstall/) @@ -60,14 +61,6 @@ For access from China, read [sources for users from China](#sources-for-users-fr re-evaluated. You can type `groups` command in a terminal window after that and check if `docker` group is in its output. -- Install docker-compose (1.19.0 or newer). Compose is a tool for - defining and running multi-container docker applications. - - ```shell - sudo apt-get --no-install-recommends install -y python3-pip python3-setuptools - sudo python3 -m pip install setuptools docker-compose - ``` - - Clone _CVAT_ source code from the [GitHub repository](https://github.com/opencv/cvat) with Git. @@ -90,7 +83,7 @@ For access from China, read [sources for users from China](#sources-for-users-fr release and other required images like postgres, redis, etc. from DockerHub and create containers. ```shell - docker-compose up -d + docker compose up -d ``` - (Optional) Use `CVAT_VERSION` environment variable to specify the version of CVAT you want to @@ -98,7 +91,7 @@ For access from China, read [sources for users from China](#sources-for-users-fr Default behavior: `dev` images will be pulled for develop branch, and corresponding release images for release versions. ```shell - CVAT_VERSION=dev docker-compose up -d + CVAT_VERSION=dev docker compose up -d ``` - Alternative: if you want to build the images locally with unreleased changes @@ -170,7 +163,7 @@ For access from China, read [sources for users from China](#sources-for-users-fr release and other required images like postgres, redis, etc. from DockerHub and create containers. ```shell - docker-compose up -d + docker compose up -d ``` - (Optional) Use `CVAT_VERSION` environment variable to specify the version of CVAT you want to @@ -178,7 +171,7 @@ For access from China, read [sources for users from China](#sources-for-users-fr Default behavior: `dev` images will be pulled for develop branch, and corresponding release images for release versions. ```shell - CVAT_VERSION=dev docker-compose up -d + CVAT_VERSION=dev docker compose up -d ``` - Alternative: if you want to build the images locally with unreleased changes @@ -252,7 +245,7 @@ For access from China, read [sources for users from China](#sources-for-users-fr release and other required images like postgres, redis, etc. from DockerHub and create containers. ```shell - docker-compose up -d + docker compose up -d ``` - (Optional) Use `CVAT_VERSION` environment variable to specify the version of CVAT you want to @@ -260,7 +253,7 @@ For access from China, read [sources for users from China](#sources-for-users-fr Default behavior: `dev` images will be pulled for develop branch, and corresponding release images for release versions. ```shell - CVAT_VERSION=dev docker-compose up -d + CVAT_VERSION=dev docker compose up -d ``` - Alternative: if you want to build the images locally with unreleased changes @@ -423,7 +416,7 @@ if you want to keep the dashboard in production you should read Traefik's ```shell # Build and run containers with Analytics component support: -docker-compose -f docker-compose.yml \ +docker compose -f docker-compose.yml \ -f components/analytics/docker-compose.analytics.yml up -d --build ``` @@ -436,7 +429,7 @@ Please follow this [guide](/docs/administration/advanced/installation_automatic_ The command below stops and removes containers and networks created by `up`. ```shell -docker-compose down +docker compose down ``` ### Use your own domain @@ -523,7 +516,7 @@ export ACME_EMAIL= Then, use the `docker-compose.https.yml` file to override the base `docker-compose.yml` file: ```shell -docker-compose -f docker-compose.yml -f docker-compose.https.yml up -d +docker compose -f docker-compose.yml -f docker-compose.https.yml up -d ``` > In firewall, ports 80 and 443 must be open for inbound connections from any @@ -545,21 +538,21 @@ Then, the CVAT instance will be available at your domain on ports 443 (HTTPS) an prebuilt images from DockerHub using `CVAT_VERSION` environment variable to specify the version (e.g. `dev`): ```shell - CVAT_VERSION=dev docker-compose pull + CVAT_VERSION=dev docker compose pull ``` -- To build images yourself include `docker-compose.dev.yml` compose config file to `docker-compose` command. +- To build images yourself include `docker-compose.dev.yml` compose config file to `docker compose` command. This can be useful if you want to build a CVAT with some source code changes. ```shell - docker-compose -f docker-compose.yml -f docker-compose.dev.yml build + docker compose -f docker-compose.yml -f docker-compose.dev.yml build ``` - To update local images to `latest` or `dev` tags run: ```shell - CVAT_VERSION=dev docker-compose pull + CVAT_VERSION=dev docker compose pull ``` or ```shell - CVAT_VERSION=latest docker-compose pull + CVAT_VERSION=latest docker compose pull ``` ## Troubleshooting @@ -652,7 +645,7 @@ If the error is related to a firewall, then: After `acme.json` is removed, stop all cvat docker containers: ```shell -docker-compose -f docker-compose.yml -f docker-compose.https.yml down +docker compose -f docker-compose.yml -f docker-compose.https.yml down ``` Make sure variables set (with your values): @@ -665,5 +658,5 @@ export ACME_EMAIL= and restart docker: ```shell -docker-compose -f docker-compose.yml -f docker-compose.https.yml up -d +docker compose -f docker-compose.yml -f docker-compose.https.yml up -d ``` diff --git a/site/content/en/docs/administration/basics/social-accounts-configuration.md b/site/content/en/docs/administration/basics/social-accounts-configuration.md index 76807c7db01d..ef48ac636fc0 100644 --- a/site/content/en/docs/administration/basics/social-accounts-configuration.md +++ b/site/content/en/docs/administration/basics/social-accounts-configuration.md @@ -44,7 +44,7 @@ To enable authentication, do the following: 2. In a terminal, run the following command: ```bash - docker-compose -f docker-compose.yml -f docker-compose.override.yml up -d + docker compose -f docker-compose.yml -f docker-compose.override.yml up -d ``` ## Enable authentication with a Github account @@ -74,7 +74,7 @@ There are 2 basic steps to enable Github account authentication. 2. In a terminal, run the following command: ```bash - docker-compose -f docker-compose.yml -f docker-compose.override.yml up -d + docker compose -f docker-compose.yml -f docker-compose.override.yml up -d ``` > **Note:** You can also configure [Github App](https://docs.github.com/en/developers/apps/building-github-apps/creating-a-github-app), diff --git a/site/content/en/docs/api_sdk/sdk/developer-guide.md b/site/content/en/docs/api_sdk/sdk/developer-guide.md index 7a5cf12b6cf5..dfea01c201fe 100644 --- a/site/content/en/docs/api_sdk/sdk/developer-guide.md +++ b/site/content/en/docs/api_sdk/sdk/developer-guide.md @@ -30,7 +30,7 @@ mkdir -p cvat-sdk/schema/ && python manage.py spectacular --file cvat-sdk/schema If you want to use docker instead: ```bash -docker-compose -f docker-compose.yml -f docker-compose.dev.yml run \ +docker compose -f docker-compose.yml -f docker-compose.dev.yml run \ --no-deps --entrypoint '/usr/bin/env python' --rm -u "$(id -u)":"$(id -g)" -v "$PWD":"/local" \ cvat_server \ manage.py spectacular --file /local/cvat-sdk/schema/schema.yml diff --git a/site/content/en/docs/contributing/running-tests.md b/site/content/en/docs/contributing/running-tests.md index 5f72710c5820..cee2f65ef032 100644 --- a/site/content/en/docs/contributing/running-tests.md +++ b/site/content/en/docs/contributing/running-tests.md @@ -10,7 +10,7 @@ description: 'Instructions on how to run all existence tests.' **Initial steps**: 1. Run CVAT instance: ``` - docker-compose \ + docker compose \ -f docker-compose.yml \ -f docker-compose.dev.yml \ -f components/serverless/docker-compose.serverless.yml \ @@ -76,7 +76,7 @@ pytest ./tests/python --rebuild **Debugging** -Currently, this is only supported in `docker-compose`-based deployments, +Currently, this is only supported in deployments based on Docker Compose, which should be enough to fix errors arising in REST API tests. To debug a server deployed with Docker, you need to do the following: @@ -132,7 +132,7 @@ Extra options: ``` 1. Run CVAT instance ``` - docker-compose -f docker-compose.yml -f docker-compose.dev.yml up -d + docker compose -f docker-compose.yml -f docker-compose.dev.yml up -d ``` **Running tests** diff --git a/site/content/en/docs/faq.md b/site/content/en/docs/faq.md index b06e9bb9682d..166bfcdbaaba 100644 --- a/site/content/en/docs/faq.md +++ b/site/content/en/docs/faq.md @@ -54,11 +54,11 @@ To change the hostname, simply set the `CVAT_HOST` environemnt variable ```bash export CVAT_HOST= ``` -NOTE, if you're using `docker-compose` with `sudo` to run CVAT, then please add the `-E` (or `--preserve-env`) +NOTE, if you're using `docker compose` with `sudo` to run CVAT, then please add the `-E` (or `--preserve-env`) flag to preserve the user environment variable which set above to take effect in your docker containers: ```bash -sudo -E docker-compose up -d +sudo -E docker compose up -d ``` If you want to change the default web application port, change the `ports` part of `traefik` service configuration diff --git a/site/content/en/docs/manual/advanced/serverless-tutorial.md b/site/content/en/docs/manual/advanced/serverless-tutorial.md index aba5c741ba9d..ac9483d72f29 100644 --- a/site/content/en/docs/manual/advanced/serverless-tutorial.md +++ b/site/content/en/docs/manual/advanced/serverless-tutorial.md @@ -59,17 +59,17 @@ the tutorial. In the tutorial it is assumed that you already have the cloned [CVAT GitHub repo][cvat-github]. -To build CVAT with serverless support you need to run `docker-compose` command +To build CVAT with serverless support you need to run `docker compose` command with specific configuration files. In the case it is `docker-compose.serverless.yml`. It has necessary instructions how to build and deploy Nuclio platform as a docker container and enable corresponding support in CVAT. ```bash -docker-compose -f docker-compose.yml -f docker-compose.dev.yml -f components/serverless/docker-compose.serverless.yml up -d --build +docker compose -f docker-compose.yml -f docker-compose.dev.yml -f components/serverless/docker-compose.serverless.yml up -d --build ``` ```bash -docker-compose -f docker-compose.yml -f docker-compose.dev.yml -f components/serverless/docker-compose.serverless.yml ps +docker compose -f docker-compose.yml -f docker-compose.dev.yml -f components/serverless/docker-compose.serverless.yml ps ``` ``` Name Command State Ports diff --git a/ssh/README.md b/ssh/README.md index ed4205e7dd30..e9d3b6de9874 100644 --- a/ssh/README.md +++ b/ssh/README.md @@ -13,7 +13,7 @@ docker exec -it cvat_server bash -ic 'ls .ssh' For example: ```bash -socks_proxy=proxy-example.com:1080 docker-compose build +socks_proxy=proxy-example.com:1080 docker compose build ``` - Try to clone a repository via SSH directly in the container by the command: diff --git a/tests/python/shared/fixtures/init.py b/tests/python/shared/fixtures/init.py index 2153ec64c7b5..41bbc0375330 100644 --- a/tests/python/shared/fixtures/init.py +++ b/tests/python/shared/fixtures/init.py @@ -234,7 +234,8 @@ def start_services(rebuild=False): _run( [ - "docker-compose", + "docker", + "compose", f"--project-name={PREFIX}", # use compatibility mode to have fixed names for containers (with underscores) # https://github.com/docker/compose#about-update-and-backward-compatibility @@ -286,7 +287,8 @@ def pytest_sessionstart(session): if stop: _run( [ - "docker-compose", + "docker", + "compose", f"--project-name={PREFIX}", # use compatibility mode to have fixed names for containers (with underscores) # https://github.com/docker/compose#about-update-and-backward-compatibility From 02fe5255e86022c91793f805107c2da0dfa73191 Mon Sep 17 00:00:00 2001 From: Roman Donchenko Date: Tue, 27 Dec 2022 20:36:16 +0300 Subject: [PATCH 2/3] Switch to the versionless Compose format This is the "latest and recommended version" of the format: . --- components/analytics/docker-compose.analytics.yml | 1 - components/serverless/docker-compose.serverless.yml | 1 - docker-compose.ci.yml | 1 - docker-compose.dev.yml | 1 - docker-compose.https.yml | 2 -- docker-compose.yml | 2 -- tests/docker-compose.email.yml | 2 -- tests/docker-compose.file_share.yml | 2 -- tests/docker-compose.minio.yml | 2 -- tests/docker-compose.test_servers.yml | 2 -- 10 files changed, 16 deletions(-) diff --git a/components/analytics/docker-compose.analytics.yml b/components/analytics/docker-compose.analytics.yml index 38cf90cc703c..1cb0aa3cd28a 100644 --- a/components/analytics/docker-compose.analytics.yml +++ b/components/analytics/docker-compose.analytics.yml @@ -1,4 +1,3 @@ -version: '3.3' services: elasticsearch: container_name: cvat_elasticsearch diff --git a/components/serverless/docker-compose.serverless.yml b/components/serverless/docker-compose.serverless.yml index cf861284b98b..1367e8b916c7 100644 --- a/components/serverless/docker-compose.serverless.yml +++ b/components/serverless/docker-compose.serverless.yml @@ -1,4 +1,3 @@ -version: '3.3' services: nuclio: container_name: nuclio diff --git a/docker-compose.ci.yml b/docker-compose.ci.yml index 551afbbd11ab..bc1628548c77 100644 --- a/docker-compose.ci.yml +++ b/docker-compose.ci.yml @@ -3,7 +3,6 @@ # # SPDX-License-Identifier: MIT # -version: '3.3' services: cvat_ci: diff --git a/docker-compose.dev.yml b/docker-compose.dev.yml index 12da1023d3aa..3abbd74c6160 100644 --- a/docker-compose.dev.yml +++ b/docker-compose.dev.yml @@ -4,7 +4,6 @@ # # SPDX-License-Identifier: MIT # -version: '3.3' services: cvat_server: diff --git a/docker-compose.https.yml b/docker-compose.https.yml index 4fe83222d1d2..6f04a8e0b4ac 100644 --- a/docker-compose.https.yml +++ b/docker-compose.https.yml @@ -2,8 +2,6 @@ # # SPDX-License-Identifier: MIT -version: '3.3' - services: cvat_server: labels: diff --git a/docker-compose.yml b/docker-compose.yml index 6338fdee75a4..4e97fa293c7d 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -2,8 +2,6 @@ # # SPDX-License-Identifier: MIT -version: '3.3' - services: cvat_db: container_name: cvat_db diff --git a/tests/docker-compose.email.yml b/tests/docker-compose.email.yml index 418a1cdaa73b..269b1805fd8f 100644 --- a/tests/docker-compose.email.yml +++ b/tests/docker-compose.email.yml @@ -1,5 +1,3 @@ -version: '3.3' - services: cvat_server: environment: diff --git a/tests/docker-compose.file_share.yml b/tests/docker-compose.file_share.yml index e9328d0d07bf..dec9e3105245 100644 --- a/tests/docker-compose.file_share.yml +++ b/tests/docker-compose.file_share.yml @@ -1,5 +1,3 @@ -version: '3.3' - services: cvat_worker_default: volumes: diff --git a/tests/docker-compose.minio.yml b/tests/docker-compose.minio.yml index be8093fc84b5..e65d91613ba2 100644 --- a/tests/docker-compose.minio.yml +++ b/tests/docker-compose.minio.yml @@ -1,5 +1,3 @@ -version: '3.3' - services: minio: image: quay.io/minio/minio:RELEASE.2022-09-17T00-09-45Z diff --git a/tests/docker-compose.test_servers.yml b/tests/docker-compose.test_servers.yml index c27d0a05e8c3..5d8fced7fb9e 100644 --- a/tests/docker-compose.test_servers.yml +++ b/tests/docker-compose.test_servers.yml @@ -1,5 +1,3 @@ -version: '3.7' - services: webhook_receiver: image: python:3.9-slim From 125b1e261a0294999a7ac4bcc5e5919f5299f702 Mon Sep 17 00:00:00 2001 From: Roman Donchenko Date: Wed, 28 Dec 2022 15:22:21 +0300 Subject: [PATCH 3/3] Update changelog --- CHANGELOG.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2bf82b1b731b..844873e4edb1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,7 +10,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Filename pattern to simplify uploading cloud storage data for a task () ### Changed -- TDB +- The Docker Compose files now use the Compose Specification version + of the format. This version is supported by Docker Compose 1.27.0+ + (). ### Deprecated - TDB