File size: 914 Bytes
fa76e27
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
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: