version: "3" services: model-cuda: env_file: - .env user: "${UID}:${GID}" build: context: . dockerfile: DockerfileCUDA tty: true deploy: resources: reservations: devices: - driver: nvidia count: 1 capabilities: [gpu] volumes: - ./logs/:/usr/src/app/logs:z - ./data/:/usr/src/app/data:z command: sh -c "python train.py logger=tensorboard trainer.gpus=1" model: env_file: - .env user: "${UID}:${GID}" build: context: . dockerfile: Dockerfile tty: true volumes: - ./logs/:/usr/src/app/logs:z - ./data/:/usr/src/app/data:z command: sh -c "python train.py logger=tensorboard trainer.gpus=0" tensorboard: image: tensorflow/tensorflow volumes: - ./logs:/logs:z command: sh -c "tensorboard --logdir /logs --bind_all" ports: - 8008:6006