mirror of
https://gitee.com/milvus-io/milvus.git
synced 2024-12-03 12:29:36 +08:00
f547c1f8f4
Signed-off-by: Bennu-Li <yunmei.li@zilliz.com>
121 lines
4.1 KiB
YAML
121 lines
4.1 KiB
YAML
version: '3.5'
|
|
|
|
x-ccache: &ccache
|
|
CCACHE_COMPILERCHECK: content
|
|
CCACHE_COMPRESS: 1
|
|
CCACHE_COMPRESSLEVEL: 5
|
|
CCACHE_MAXSIZE: 2G
|
|
CCACHE_DIR: /ccache
|
|
|
|
services:
|
|
builder:
|
|
image: ${IMAGE_REPO}/milvus-env:${IMAGE_ARCH}-${OS_NAME}-${DATE_VERSION}
|
|
# Build devcontainer
|
|
build:
|
|
context: .
|
|
dockerfile: build/docker/builder/cpu/${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
|
|
- .:/go/src/github.com/milvus-io/milvus:delegated
|
|
- ${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
|
|
- ${DOCKER_VOLUME_DIRECTORY:-.docker}/${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 >
|
|
/bin/bash -c "
|
|
make check-proto-product && make verifiers && make unittest"
|
|
|
|
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
|
|
# dockerfile: build/docker/builder/cpu/${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"
|
|
|
|
etcd:
|
|
image: milvusdb/etcd:3.5.5-r2
|
|
environment:
|
|
- ALLOW_NONE_AUTHENTICATION=yes
|
|
- ETCD_AUTO_COMPACTION_MODE=revision
|
|
- ETCD_AUTO_COMPACTION_RETENTION=1000
|
|
- ETCD_QUOTA_BACKEND_BYTES=4294967296
|
|
- ETCD_SNAPSHOT_COUNT=50000
|
|
healthcheck:
|
|
test: ['CMD', '/opt/bitnami/scripts/etcd/healthcheck.sh']
|
|
interval: 30s
|
|
timeout: 20s
|
|
retries: 3
|
|
|
|
pulsar:
|
|
image: apachepulsar/pulsar:2.8.2
|
|
command: bin/pulsar standalone --no-functions-worker --no-stream-storage
|
|
|
|
minio:
|
|
image: minio/minio:RELEASE.2022-03-17T06-34-49Z
|
|
environment:
|
|
MINIO_ACCESS_KEY: minioadmin
|
|
MINIO_SECRET_KEY: minioadmin
|
|
command: minio server /minio_data
|
|
healthcheck:
|
|
test: ['CMD', 'curl', '-f', 'http://localhost:9000/minio/health/live']
|
|
interval: 30s
|
|
timeout: 20s
|
|
retries: 3
|
|
|
|
jaeger:
|
|
image: jaegertracing/all-in-one:latest
|
|
|
|
networks:
|
|
default:
|
|
name: milvus_dev
|