|
version: '3.8' |
|
|
|
services: |
|
fastapi: |
|
build: |
|
context: ./fastapi |
|
dockerfile: Dockerfile-fastapi |
|
image: mohcineelharras/fastapi |
|
env_file: |
|
- .env |
|
volumes: |
|
- ./models:/app/models |
|
- /mnt/wslg/:/mnt/wslg/ |
|
- shared-output:/app/output |
|
ports: |
|
- "8000:8000" |
|
networks: |
|
- app-network |
|
deploy: |
|
resources: |
|
reservations: |
|
devices: |
|
- driver: nvidia |
|
count: all |
|
capabilities: [gpu] |
|
|
|
streamlit: |
|
build: |
|
context: ./streamlit_app |
|
dockerfile: Dockerfile-streamlit |
|
image: mohcineelharras/streamlit |
|
env_file: |
|
- .env |
|
volumes: |
|
- shared-output:/app/output |
|
- /mnt/wslg/:/mnt/wslg/ |
|
ports: |
|
- "8501:8501" |
|
depends_on: |
|
- fastapi |
|
networks: |
|
- app-network |
|
|
|
networks: |
|
app-network: |
|
driver: bridge |
|
|
|
volumes: |
|
shared-output: |
|
|