CoolFace
Apppublic

soutrik/gradio_demo_MNIST_Classifier

sourceHugging Faceupdated 2y agoView on Hugging Face
0likes
docker-compose.yaml64 linesDownload Raw Back to root
1services:2  train:3    build:4      context: .5    command: |6      python -m src.train && \7      touch ./checkpoints/train_done.flag8    volumes:9      - ./data:/app/data10      - ./checkpoints:/app/checkpoints11      - ./logs:/app/logs12    environment:13      - PYTHONUNBUFFERED=114      - PYTHONPATH=/app15      - NUM_WORKERS=4  # Set the number of workers16    shm_size: '4g'17    deploy:18      resources:19        limits:20          memory: 8g  # Limit to 8GB RAM21          cpus: '4.0' # Use up to 4 CPU cores22        reservations:23          memory: 6g  # Reserve 6GB RAM24          cpus: '4.0' # Reserve 4 CPU cores25    networks:26      - default27    env_file:28      - .env29 30  eval:31    build:32      context: .33    command: |34      sh -c 'while [ ! -f /app/checkpoints/train_done.flag ]; do sleep 10; done && python -m src.test'35    volumes:36      - ./data:/app/data37      - ./checkpoints:/app/checkpoints38      - ./logs:/app/logs39    environment:40      - PYTHONUNBUFFERED=141      - PYTHONPATH=/app42      - NUM_WORKERS=2  # Set the number of workers43    shm_size: '4g'44    deploy:45      resources:46        limits:47          memory: 4g  # Limit to 4GB RAM48          cpus: '4.0' # Use up to 4 CPU core49        reservations:50          memory: 2g  # Reserve 2GB RAM51          cpus: '2' # Reserve 2 CPU core52    networks:53      - default54    env_file:55      - .env56 57volumes:58  data:59  checkpoints:60  logs:61 62networks:63  default:64