-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcompose.dev.yml
63 lines (61 loc) · 2.15 KB
/
compose.dev.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
version: "3.8"
services:
###################################################################
# Minio and Nginx Dependencies
###################################################################
dev-minio:
image: minio/minio:latest
container_name: dev-minio-server
hostname: dev-minio
env_file:
- ./.env.dev
ports:
- "7000:9000"
- "7001:9001"
environment:
- MINIO_ROOT_USER=${MINIO_ACCESS_KEY:-localtrack}
- MINIO_ROOT_PASSWORD=${MINIO_SECRET_KEY:-ReplaceMePassword}
volumes:
- ${DATA_DIR}/minio_data:/minio_data
command: server --console-address ":9001" /minio_data
networks:
- dev-minio-net
nginx:
image: mbari/nginx
container_name: dev-nginx
env_file:
- ./.env.dev
ports:
- "8090:80"
volumes:
- ${DATA_DIR}/nginx:/data:rw
###################################################################
# Setup Minio
###################################################################
mc-minio:
image: minio/mc:RELEASE.2023-09-22T05-07-46Z
container_name: dev-setup-minio
depends_on:
- dev-minio
env_file:
- ./.env.dev
networks:
- dev-minio-net
entrypoint: >
/bin/sh -c "
mc alias set myminio http://dev-minio:9000 ${MINIO_ACCESS_KEY} ${MINIO_SECRET_KEY};
mc mb --ignore-existing myminio/${ROOT_BUCKET_NAME}/${MODEL_PREFIX};
mc mb --ignore-existing myminio/${ROOT_BUCKET_NAME}/${MODEL_PREFIX}/track-config;
mc mb --ignore-existing myminio/${ROOT_BUCKET_NAME}/${TRACK_PREFIX};
mc admin user add myminio fastapi ${MINIO_LIVE_ACCESS_KEY};
mc admin policy list myminio;
mc admin policy attach myminio readwrite --user fastapi;
curl -O https://902005-public.s3.us-west-2.amazonaws.com/models/Megadetector/best.pt;
curl -O https://902005-public.s3.us-west-2.amazonaws.com/models/track-config/strong_sort_benthic.yaml;
mc cp strong_sort_benthic.yaml myminio/${ROOT_BUCKET_NAME}/${MODEL_PREFIX}/track-config/strong_sort_benthic.yaml;
mc cp best.pt myminio/${ROOT_BUCKET_NAME}/${MODEL_PREFIX}/MegadetectorTest.pt;
exit 0;
"
networks:
dev-minio-net:
external: true