version: '3.8' services: train: build: context: . command: | python -m src.train experiment=catdog_experiment ++task_name=train ++train=True ++test=False && \ touch /app/checkpoints/train_done.flag volumes: - ./data:/app/data - ./checkpoints:/app/checkpoints - ./artifacts:/app/artifacts - ./logs:/app/logs environment: - PYTHONUNBUFFERED=1 - PYTHONPATH=/app shm_size: '4g' networks: - default env_file: - .env eval: build: context: . command: | sh -c 'while [ ! -f ./checkpoints/train_done.flag ]; do sleep 10; done && python -m src.train experiment=catdog_experiment ++task_name=eval ++train=False ++test=True' volumes: - ./data:/app/data - ./checkpoints:/app/checkpoints - ./artifacts:/app/artifacts - ./logs:/app/logs environment: - PYTHONUNBUFFERED=1 - PYTHONPATH=/app shm_size: '4g' networks: - default env_file: - .env # inference: # build: # context: . # command: | # sh -c 'while [ ! -f ./checkpoints/train_done.flag ]; do sleep 10; done && python -m src.infer experiment=catdog_experiment' # volumes: # - ./data:/app/data # - ./checkpoints:/app/checkpoints # - ./artifacts:/app/artifacts # - ./logs:/app/logs # environment: # - PYTHONUNBUFFERED=1 # - PYTHONPATH=/app # shm_size: '4g' # networks: # - default # env_file: # - .env volumes: data: checkpoints: artifacts: logs: networks: default: