gradio_demo_CatDogClassifier / docker-compose.yaml
Soutrik
local training check
3fa4d71
raw
history blame
1.77 kB
version: '3.8'
services:
train:
build:
context: .
command: |
python -m src.train_optuna_callbacks 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 /app/checkpoints/train_done.flag ]; do sleep 10; done && python -m src.train_optuna_callbacks 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
depends_on:
- train
# Uncomment if you want to use inference service in the future
# inference:
# build:
# context: .
# command: |
# sh -c 'while [ ! -f /app/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
# depends_on:
# - train
volumes:
data:
checkpoints:
artifacts:
logs:
networks:
default: