-
Notifications
You must be signed in to change notification settings - Fork 2.9k
/
docker-compose.yml
150 lines (140 loc) · 4.89 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
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:${OS_NAME}-${DATE_VERSION}
# Build devcontainer
build:
context: .
dockerfile: build/docker/builder/cpu/${OS_NAME}/Dockerfile
args:
TARGETARCH: ${IMAGE_ARCH}
cache_from:
- ${IMAGE_REPO}/milvus-env:${OS_NAME}-${LATEST_DATE_VERSION}
platform: linux/${IMAGE_ARCH}
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
AZURE_STORAGE_CONNECTION_STRING: ${AZURITE_CONNECTION_STRING}
ENABLE_GCP_NATIVE: ${ENABLE_GCP_NATIVE}
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
- azurite
- gcpnative
# Command
command: &builder-command >
/bin/bash -c "
make check-proto-product && make verifiers && make unittest"
gpubuilder:
image: ${IMAGE_REPO}/milvus-env:gpu-${OS_NAME}-${GPU_DATE_VERSION}
# Build devcontainer
build:
context: .
dockerfile: build/docker/builder/gpu/${OS_NAME}/Dockerfile
args:
TARGETARCH: ${IMAGE_ARCH}
cache_from:
- ${IMAGE_REPO}/milvus-env:gpu-${OS_NAME}-${LATEST_GPU_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
AZURE_STORAGE_CONNECTION_STRING: ${AZURITE_CONNECTION_STRING}
ENABLE_GCP_NATIVE: ${ENABLE_GCP_NATIVE}
volumes: &builder-volumes-gpu
- .:/go/src/github.com/milvus-io/milvus:delegated
- ${DOCKER_VOLUME_DIRECTORY:-.docker-gpu}/${OS_NAME}-ccache:/ccache:delegated
- ${DOCKER_VOLUME_DIRECTORY:-.docker-gpu}/${OS_NAME}-go-mod:/go/pkg/mod:delegated
- ${DOCKER_VOLUME_DIRECTORY:-.docker-gpu}/${OS_NAME}-vscode-extensions:/home/milvus/.vscode-server/extensions:delegated
- ${DOCKER_VOLUME_DIRECTORY:-.docker-gpu}/${OS_NAME}-conan:/home/milvus/.conan:delegated
working_dir: '/go/src/github.com/milvus-io/milvus'
depends_on:
- etcd
- minio
- pulsar
- azurite
- gcpnative
# 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/bash -c \
"bin/apply-config-from-env.py conf/standalone.conf && \
exec bin/pulsar standalone --no-functions-worker --no-stream-storage"
environment:
# 10MB
- PULSAR_PREFIX_maxMessageSize=10485760
# this is 104857600 + 10240 (padding)
- nettyMaxFrameSizeBytes=104867840
- PULSAR_GC=-XX:+UseG1GC
minio:
image: minio/minio:RELEASE.2023-03-20T20-16-18Z
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
azurite:
image: mcr.microsoft.com/azure-storage/azurite
command: azurite-blob --blobHost 0.0.0.0
jaeger:
image: jaegertracing/all-in-one:latest
gcpnative:
image: fsouza/fake-gcs-server
command: -scheme http -public-host storage.gcs.127.0.0.1.nip.io:4443 -external-url "http://storage.gcs.127.0.0.1.nip.io:4443"
hostname: storage.gcs.127.0.0.1.nip.io
ports:
- "4443:4443"
networks:
default:
name: milvus_dev