2020-10-15 21:31:50 +08:00
|
|
|
version: '3.5'
|
|
|
|
|
2020-10-27 15:51:16 +08:00
|
|
|
x-ccache: &ccache
|
|
|
|
CCACHE_COMPILERCHECK: content
|
|
|
|
CCACHE_COMPRESS: 1
|
|
|
|
CCACHE_COMPRESSLEVEL: 5
|
|
|
|
CCACHE_MAXSIZE: 2G
|
|
|
|
CCACHE_DIR: /ccache
|
2020-10-27 12:01:27 +08:00
|
|
|
|
2020-10-27 15:51:16 +08:00
|
|
|
services:
|
2021-07-08 15:43:45 +08:00
|
|
|
builder:
|
|
|
|
image: ${IMAGE_REPO}/milvus-env:${IMAGE_ARCH}-${OS_NAME}-${DATE_VERSION}
|
2021-01-06 18:16:37 +08:00
|
|
|
# Build devcontainer
|
2020-10-27 15:51:16 +08:00
|
|
|
build:
|
|
|
|
context: .
|
2021-07-08 15:43:45 +08:00
|
|
|
dockerfile: build/docker/builder/cpu/${OS_NAME}/Dockerfile
|
2020-10-27 15:51:16 +08:00
|
|
|
cache_from:
|
2021-07-08 15:43:45 +08:00
|
|
|
- ${IMAGE_REPO}/milvus-env:${IMAGE_ARCH}-${OS_NAME}-${LATEST_DATE_VERSION}
|
2021-01-06 18:16:37 +08:00
|
|
|
# user: {{ CURRENT_ID }}
|
2020-10-27 15:51:16 +08:00
|
|
|
shm_size: 2G
|
2021-09-28 22:48:03 +08:00
|
|
|
# expose 19530 port so we can directly access milvus inside build container
|
|
|
|
# ports:
|
|
|
|
# - "19530:19530"
|
2020-10-27 15:51:16 +08:00
|
|
|
environment:
|
|
|
|
<<: *ccache
|
2022-09-21 20:16:51 +08:00
|
|
|
OS_NAME: ${OS_NAME}
|
2020-11-21 15:06:46 +08:00
|
|
|
PULSAR_ADDRESS: ${PULSAR_ADDRESS}
|
2021-06-11 22:04:41 +08:00
|
|
|
ETCD_ENDPOINTS: ${ETCD_ENDPOINTS}
|
2020-12-07 15:22:20 +08:00
|
|
|
MINIO_ADDRESS: ${MINIO_ADDRESS}
|
2022-11-23 19:09:11 +08:00
|
|
|
CONAN_USER_HOME: /home/milvus
|
2021-07-08 15:43:45 +08:00
|
|
|
volumes: &builder-volumes
|
2021-04-22 14:45:57 +08:00
|
|
|
- .:/go/src/github.com/milvus-io/milvus:delegated
|
2021-07-08 15:43:45 +08:00
|
|
|
- ${DOCKER_VOLUME_DIRECTORY:-.docker}/${IMAGE_ARCH}-${OS_NAME}-ccache:/ccache:delegated
|
|
|
|
- ${DOCKER_VOLUME_DIRECTORY:-.docker}/${IMAGE_ARCH}-${OS_NAME}-go-mod:/go/pkg/mod:delegated
|
|
|
|
- ${DOCKER_VOLUME_DIRECTORY:-.docker}/${IMAGE_ARCH}-${OS_NAME}-vscode-extensions:/home/milvus/.vscode-server/extensions:delegated
|
2022-11-23 10:39:11 +08:00
|
|
|
- ${DOCKER_VOLUME_DIRECTORY:-.docker}/${IMAGE_ARCH}-${OS_NAME}-conan:/home/milvus/.conan:delegated
|
|
|
|
working_dir: '/go/src/github.com/milvus-io/milvus'
|
2022-03-08 09:13:58 +08:00
|
|
|
depends_on:
|
2022-11-23 10:39:11 +08:00
|
|
|
- etcd
|
|
|
|
- minio
|
|
|
|
- pulsar
|
2021-01-06 18:16:37 +08:00
|
|
|
# Command
|
2021-07-08 15:43:45 +08:00
|
|
|
command: &builder-command >
|
2020-10-27 15:51:16 +08:00
|
|
|
/bin/bash -c "
|
2020-11-18 10:07:05 +08:00
|
|
|
make check-proto-product && make verifiers && make unittest"
|
2023-03-20 19:03:57 +08:00
|
|
|
|
|
|
|
gpubuilder:
|
|
|
|
# image: harbor.milvus.io/milvus/milvus-env:gpu-amd64-ubuntu20.04-20230317-a1c7b0c
|
|
|
|
image: ${IMAGE_REPO}/milvus-env:gpu-${IMAGE_ARCH}-${OS_NAME}-${GPU_DATE_VERSION}
|
|
|
|
# Build devcontainer
|
|
|
|
build:
|
|
|
|
context: .
|
|
|
|
dockerfile: build/docker/builder/gpu/${OS_NAME}/Dockerfile
|
|
|
|
cache_from:
|
|
|
|
- ${IMAGE_REPO}/milvus-env:${IMAGE_ARCH}-${OS_NAME}-${LATEST_DATE_VERSION}
|
|
|
|
# user: {{ CURRENT_ID }}
|
|
|
|
shm_size: 2G
|
|
|
|
# expose 19530 port so we can directly access milvus inside build container
|
|
|
|
# ports:
|
|
|
|
# - "19530:19530"
|
|
|
|
environment:
|
|
|
|
<<: *ccache
|
|
|
|
OS_NAME: ${OS_NAME}
|
|
|
|
PULSAR_ADDRESS: ${PULSAR_ADDRESS}
|
|
|
|
ETCD_ENDPOINTS: ${ETCD_ENDPOINTS}
|
|
|
|
MINIO_ADDRESS: ${MINIO_ADDRESS}
|
|
|
|
CONAN_USER_HOME: /home/milvus
|
|
|
|
volumes: &builder-volumes-gpu
|
|
|
|
- .:/go/src/github.com/milvus-io/milvus:delegated
|
|
|
|
- ${DOCKER_VOLUME_DIRECTORY:-.docker-gpu}/${IMAGE_ARCH}-${OS_NAME}-ccache:/ccache:delegated
|
|
|
|
- ${DOCKER_VOLUME_DIRECTORY:-.docker-gpu}/${IMAGE_ARCH}-${OS_NAME}-go-mod:/go/pkg/mod:delegated
|
|
|
|
- ${DOCKER_VOLUME_DIRECTORY:-.docker-gpu}/${IMAGE_ARCH}-${OS_NAME}-vscode-extensions:/home/milvus/.vscode-server/extensions:delegated
|
|
|
|
- ${DOCKER_VOLUME_DIRECTORY:-.docker-gpu}/${IMAGE_ARCH}-${OS_NAME}-conan:/home/milvus/.conan:delegated
|
|
|
|
working_dir: '/go/src/github.com/milvus-io/milvus'
|
|
|
|
depends_on:
|
|
|
|
- etcd
|
|
|
|
- minio
|
|
|
|
- pulsar
|
|
|
|
# Command
|
|
|
|
command: &builder-command-gpu >
|
|
|
|
/bin/bash -c "
|
|
|
|
make check-proto-product && make verifiers && make unittest"
|
2020-11-13 12:27:41 +08:00
|
|
|
|
2020-11-28 16:43:39 +08:00
|
|
|
etcd:
|
2023-02-20 17:08:25 +08:00
|
|
|
image: milvusdb/etcd:3.5.5-r2
|
2021-09-24 14:45:54 +08:00
|
|
|
environment:
|
2021-09-30 16:32:11 +08:00
|
|
|
- ALLOW_NONE_AUTHENTICATION=yes
|
2021-09-24 14:45:54 +08:00
|
|
|
- ETCD_AUTO_COMPACTION_MODE=revision
|
|
|
|
- ETCD_AUTO_COMPACTION_RETENTION=1000
|
|
|
|
- ETCD_QUOTA_BACKEND_BYTES=4294967296
|
2022-09-21 09:14:50 +08:00
|
|
|
- ETCD_SNAPSHOT_COUNT=50000
|
2022-03-08 09:13:58 +08:00
|
|
|
healthcheck:
|
2022-11-23 10:39:11 +08:00
|
|
|
test: ['CMD', '/opt/bitnami/scripts/etcd/healthcheck.sh']
|
2022-03-08 09:13:58 +08:00
|
|
|
interval: 30s
|
|
|
|
timeout: 20s
|
|
|
|
retries: 3
|
2020-11-28 16:43:39 +08:00
|
|
|
|
|
|
|
pulsar:
|
2022-03-08 09:13:58 +08:00
|
|
|
image: apachepulsar/pulsar:2.8.2
|
2021-08-29 11:39:57 +08:00
|
|
|
command: bin/pulsar standalone --no-functions-worker --no-stream-storage
|
2020-12-03 19:00:11 +08:00
|
|
|
|
2020-12-07 15:22:20 +08:00
|
|
|
minio:
|
2022-04-06 15:47:32 +08:00
|
|
|
image: minio/minio:RELEASE.2022-03-17T06-34-49Z
|
2020-12-07 15:22:20 +08:00
|
|
|
environment:
|
|
|
|
MINIO_ACCESS_KEY: minioadmin
|
|
|
|
MINIO_SECRET_KEY: minioadmin
|
|
|
|
command: minio server /minio_data
|
|
|
|
healthcheck:
|
2022-11-23 10:39:11 +08:00
|
|
|
test: ['CMD', 'curl', '-f', 'http://localhost:9000/minio/health/live']
|
2020-12-07 15:22:20 +08:00
|
|
|
interval: 30s
|
|
|
|
timeout: 20s
|
|
|
|
retries: 3
|
|
|
|
|
2021-01-11 18:35:54 +08:00
|
|
|
jaeger:
|
|
|
|
image: jaegertracing/all-in-one:latest
|
|
|
|
|
2020-11-21 17:53:05 +08:00
|
|
|
networks:
|
2021-06-28 13:50:14 +08:00
|
|
|
default:
|
|
|
|
name: milvus_dev
|