Commit
·
fa76e27
1
Parent(s):
faa4757
docker compose test
Browse files- docker-compose.yaml +49 -0
docker-compose.yaml
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version: '3.8'
|
| 2 |
+
|
| 3 |
+
services:
|
| 4 |
+
fastapi:
|
| 5 |
+
build:
|
| 6 |
+
context: ./fastapi
|
| 7 |
+
dockerfile: Dockerfile-fastapi
|
| 8 |
+
image: mohcineelharras/fastapi
|
| 9 |
+
env_file:
|
| 10 |
+
- .env
|
| 11 |
+
volumes:
|
| 12 |
+
- ./models:/app/models
|
| 13 |
+
- /mnt/wslg/:/mnt/wslg/
|
| 14 |
+
- shared-output:/app/output
|
| 15 |
+
ports:
|
| 16 |
+
- "8000:8000"
|
| 17 |
+
networks:
|
| 18 |
+
- app-network
|
| 19 |
+
deploy:
|
| 20 |
+
resources:
|
| 21 |
+
reservations:
|
| 22 |
+
devices:
|
| 23 |
+
- driver: nvidia
|
| 24 |
+
count: all
|
| 25 |
+
capabilities: [gpu]
|
| 26 |
+
|
| 27 |
+
streamlit:
|
| 28 |
+
build:
|
| 29 |
+
context: ./streamlit_app
|
| 30 |
+
dockerfile: Dockerfile-streamlit
|
| 31 |
+
image: mohcineelharras/streamlit
|
| 32 |
+
env_file:
|
| 33 |
+
- .env
|
| 34 |
+
volumes:
|
| 35 |
+
- shared-output:/app/output
|
| 36 |
+
- /mnt/wslg/:/mnt/wslg/
|
| 37 |
+
ports:
|
| 38 |
+
- "8501:8501"
|
| 39 |
+
depends_on:
|
| 40 |
+
- fastapi
|
| 41 |
+
networks:
|
| 42 |
+
- app-network
|
| 43 |
+
|
| 44 |
+
networks:
|
| 45 |
+
app-network:
|
| 46 |
+
driver: bridge
|
| 47 |
+
|
| 48 |
+
volumes:
|
| 49 |
+
shared-output:
|