File size: 1,619 Bytes
fb83c5b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
services:
  kohya-ss-gui:
    container_name: kohya-ss-gui
    image: ghcr.io/bmaltais/kohya-ss-gui:latest
    user: 1000:0
    build:
      context: .
      args:
        - UID=1000
      cache_from:
        - ghcr.io/bmaltais/kohya-ss-gui:cache
      cache_to:
        - type=inline
    ports:
      - 7860:7860
    environment:
      SAFETENSORS_FAST_GPU: 1
      TENSORBOARD_PORT: ${TENSORBOARD_PORT:-6006}
    tmpfs:
      - /tmp
    volumes:
      - /tmp/.X11-unix:/tmp/.X11-unix
      - ./dataset:/dataset
      - ./dataset/images:/app/data
      - ./dataset/logs:/app/logs
      - ./dataset/outputs:/app/outputs
      - ./dataset/regularization:/app/regularization
      - ./.cache/config:/app/config
      - ./.cache/user:/home/1000/.cache
      - ./.cache/triton:/home/1000/.triton
      - ./.cache/nv:/home/1000/.nv
      - ./.cache/keras:/home/1000/.keras
      - ./.cache/config:/home/1000/.config # For backward compatibility
    deploy:
      resources:
        reservations:
          devices:
            - driver: nvidia
              capabilities: [gpu]
              device_ids: ["all"]

  tensorboard:
    container_name: tensorboard
    image: tensorflow/tensorflow:latest-gpu
    ports:
      # !Please change the port in .env file
      - ${TENSORBOARD_PORT:-6006}:6006
    volumes:
      - ./dataset/logs:/app/logs
    command: tensorboard --logdir=/app/logs --bind_all
    deploy:
      resources:
        reservations:
          devices:
            - driver: nvidia
              capabilities: [gpu]
              device_ids: ["all"]