Skip to content

Commit 580ae49

Browse files
authored
Migrate to Docker Compose V2 (#5524)
Also, migrate to the version less Compose file format. Compose V1 is EOL: <https://www.docker.com/blog/announcing-compose-v2-general-availability/>.
1 parent 75b338b commit 580ae49

31 files changed

+79
-98
lines changed

.github/workflows/full.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -255,14 +255,14 @@ jobs:
255255
HOST_COVERAGE_DATA_DIR: ${{ github.workspace }}
256256
CONTAINER_COVERAGE_DATA_DIR: "/coverage_data"
257257
run: |
258-
docker-compose -f docker-compose.yml -f docker-compose.dev.yml up -d cvat_opa cvat_server
258+
docker compose -f docker-compose.yml -f docker-compose.dev.yml up -d cvat_opa cvat_server
259259
max_tries=12
260260
while [[ $(curl -s -o /dev/null -w "%{http_code}" localhost:8181/health?bundles) != "200" && max_tries -gt 0 ]]; do (( max_tries-- )); sleep 5; done
261261
262-
docker-compose -f docker-compose.yml -f docker-compose.dev.yml -f docker-compose.ci.yml run cvat_ci /bin/bash \
262+
docker compose -f docker-compose.yml -f docker-compose.dev.yml -f docker-compose.ci.yml run cvat_ci /bin/bash \
263263
-c 'python manage.py test cvat/apps -v 2'
264264
265-
docker-compose -f docker-compose.yml -f docker-compose.dev.yml -f docker-compose.ci.yml run cvat_ci /bin/bash \
265+
docker compose -f docker-compose.yml -f docker-compose.dev.yml -f docker-compose.ci.yml run cvat_ci /bin/bash \
266266
-c 'yarn --frozen-lockfile --ignore-scripts && yarn workspace cvat-core run test'
267267
268268
- name: Creating a log file from cvat containers
@@ -325,7 +325,7 @@ jobs:
325325
326326
- name: Run CVAT instance
327327
run: |
328-
docker-compose \
328+
docker compose \
329329
-f docker-compose.yml \
330330
-f docker-compose.dev.yml \
331331
-f components/serverless/docker-compose.serverless.yml \

.github/workflows/main.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -222,15 +222,15 @@ jobs:
222222
HOST_COVERAGE_DATA_DIR: ${{ github.workspace }}
223223
CONTAINER_COVERAGE_DATA_DIR: "/coverage_data"
224224
run: |
225-
docker-compose -f docker-compose.yml -f docker-compose.dev.yml up -d cvat_opa cvat_server
225+
docker compose -f docker-compose.yml -f docker-compose.dev.yml up -d cvat_opa cvat_server
226226
227227
max_tries=12
228228
while [[ $(curl -s -o /dev/null -w "%{http_code}" localhost:8181/health?bundles) != "200" && max_tries -gt 0 ]]; do (( max_tries-- )); sleep 5; done
229229
230-
docker-compose -f docker-compose.yml -f docker-compose.dev.yml -f docker-compose.ci.yml run cvat_ci /bin/bash \
230+
docker compose -f docker-compose.yml -f docker-compose.dev.yml -f docker-compose.ci.yml run cvat_ci /bin/bash \
231231
-c 'python manage.py test cvat/apps -v 2'
232232
233-
docker-compose -f docker-compose.yml -f docker-compose.dev.yml -f docker-compose.ci.yml run cvat_ci /bin/bash \
233+
docker compose -f docker-compose.yml -f docker-compose.dev.yml -f docker-compose.ci.yml run cvat_ci /bin/bash \
234234
-c 'yarn --frozen-lockfile --ignore-scripts && yarn workspace cvat-core run test'
235235
236236
- name: Creating a log file from cvat containers
@@ -292,7 +292,7 @@ jobs:
292292
293293
- name: Run CVAT instance
294294
run: |
295-
docker-compose \
295+
docker compose \
296296
-f docker-compose.yml \
297297
-f docker-compose.dev.yml \
298298
-f components/serverless/docker-compose.serverless.yml \

.github/workflows/publish_docker_images.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
- uses: actions/checkout@v3
1111
- name: Build images
1212
run: |
13-
CVAT_VERSION=latest CLAM_AV=yes INSTALL_SOURCES=yes docker-compose -f docker-compose.yml -f docker-compose.dev.yml build
13+
CVAT_VERSION=latest CLAM_AV=yes INSTALL_SOURCES=yes docker compose -f docker-compose.yml -f docker-compose.dev.yml build
1414
- name: Login to Docker Hub
1515
uses: docker/login-action@v1
1616
with:

.github/workflows/schedule.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -246,17 +246,17 @@ jobs:
246246
HOST_COVERAGE_DATA_DIR: ${{ github.workspace }}
247247
CONTAINER_COVERAGE_DATA_DIR: "/coverage_data"
248248
run: |
249-
docker-compose -f docker-compose.yml -f docker-compose.dev.yml up -d cvat_opa cvat_server
249+
docker compose -f docker-compose.yml -f docker-compose.dev.yml up -d cvat_opa cvat_server
250250
max_tries=12
251251
while [[ $(curl -s -o /dev/null -w "%{http_code}" localhost:8181/health?bundles) != "200" && max_tries -gt 0 ]]; do (( max_tries-- )); sleep 5; done
252252
253-
docker-compose -f docker-compose.yml -f docker-compose.dev.yml -f docker-compose.ci.yml run cvat_ci /bin/bash \
253+
docker compose -f docker-compose.yml -f docker-compose.dev.yml -f docker-compose.ci.yml run cvat_ci /bin/bash \
254254
-c 'coverage run -a manage.py test cvat/apps && mv .coverage ${CONTAINER_COVERAGE_DATA_DIR}'
255255
256-
docker-compose -f docker-compose.yml -f docker-compose.dev.yml -f docker-compose.ci.yml run cvat_ci /bin/bash \
256+
docker compose -f docker-compose.yml -f docker-compose.dev.yml -f docker-compose.ci.yml run cvat_ci /bin/bash \
257257
-c 'yarn --frozen-lockfile --ignore-scripts && yarn workspace cvat-core run test'
258258
259-
docker-compose -f docker-compose.yml -f docker-compose.dev.yml -f docker-compose.ci.yml down -v
259+
docker compose -f docker-compose.yml -f docker-compose.dev.yml -f docker-compose.ci.yml down -v
260260
261261
- name: Uploading code coverage results as an artifact
262262
uses: actions/[email protected]
@@ -318,7 +318,7 @@ jobs:
318318
319319
- name: Run CVAT instance
320320
run: |
321-
docker-compose \
321+
docker compose \
322322
-f docker-compose.yml \
323323
-f docker-compose.dev.yml \
324324
-f tests/docker-compose.file_share.yml \
@@ -458,13 +458,13 @@ jobs:
458458
run: |
459459
npx nyc report --reporter=text-lcov >> ${HOST_COVERAGE_DATA_DIR}/lcov.info
460460
461-
docker-compose \
461+
docker compose \
462462
-f docker-compose.yml \
463463
-f docker-compose.dev.yml \
464464
-f docker-compose.ci.yml \
465465
run cvat_ci /bin/bash -c 'cd ${CONTAINER_COVERAGE_DATA_DIR} && coveralls-lcov -v -n lcov.info > ${CONTAINER_COVERAGE_DATA_DIR}/coverage.json'
466466
467-
docker-compose \
467+
docker compose \
468468
-f docker-compose.yml \
469469
-f docker-compose.dev.yml \
470470
-f docker-compose.ci.yml \

CHANGELOG.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1010
- Filename pattern to simplify uploading cloud storage data for a task (<https://github.com/opencv/cvat/pull/5498>)
1111

1212
### Changed
13-
- TDB
13+
- The Docker Compose files now use the Compose Specification version
14+
of the format. This version is supported by Docker Compose 1.27.0+
15+
(<https://github.com/opencv/cvat/pull/5524>).
1416

1517
### Deprecated
1618
- TDB

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ Here are some screencasts showing how to use CVAT.
9898
[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:
9999

100100
- **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.
101-
- **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.
101+
- **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.
102102

103103
[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:
104104

components/analytics/docker-compose.analytics.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
version: '3.3'
21
services:
32
elasticsearch:
43
container_name: cvat_elasticsearch

components/serverless/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@
44

55
```bash
66
# From project root directory
7-
docker-compose -f docker-compose.yml -f components/serverless/docker-compose.serverless.yml up -d
7+
docker compose -f docker-compose.yml -f components/serverless/docker-compose.serverless.yml up -d
88
```

components/serverless/docker-compose.serverless.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
version: '3.3'
21
services:
32
nuclio:
43
container_name: nuclio

docker-compose.ci.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
#
44
# SPDX-License-Identifier: MIT
55
#
6-
version: '3.3'
76

87
services:
98
cvat_ci:

0 commit comments

Comments
 (0)