services: libretranslate: image: libretranslate/libretranslate:latest # Use libretranslate/libretranslate:latest-cuda for CUDA support restart: unless-stopped ports: - 5000:5000 healthcheck: test: ['CMD-SHELL', './venv/bin/python scripts/healthcheck.py'] environment: LT_THREADS: 8 # Set this to the number of your CPUs LT_FRONTEND_TIMEOUT: 180 # 3 minutes timeout # More options here: https://github.com/LibreTranslate/LibreTranslate?tab=readme-ov-file#settings--flags volumes: - lt-local:/home/libretranslate/.local # For CUDA support, uncomment the following lines: #deploy: # resources: # reservations: # devices: # - driver: nvidia # count: 1 # capabilities: [gpu] volumes: lt-local: name: lt-local external: true