docker-compose.yml 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. version: "3.9"
  2. services:
  3. web:
  4. image: node:18
  5. working_dir: /usr/src/app
  6. volumes:
  7. - ./web:/usr/src/app
  8. ports:
  9. - "3000:3000"
  10. command: bash -lc "npm install && npm run dev"
  11. profiles: [dev]
  12. app-api:
  13. image: node:18
  14. working_dir: /usr/src/app
  15. environment:
  16. - ML_API_BASE_URL=http://ml-api:8000
  17. - WEB_ORIGIN=http://localhost:3000
  18. ports:
  19. - "4000:4000"
  20. volumes:
  21. - ./app-api:/usr/src/app
  22. command: bash -lc "npm install && npm run start:dev"
  23. profiles: [dev]
  24. ml-api:
  25. image: condaforge/mambaforge
  26. working_dir: /work
  27. environment:
  28. - TARGET_LANG_CODE=lin_Latn
  29. volumes:
  30. - ./ml-api:/work
  31. - ./shared:/work/models
  32. ports:
  33. - "8000:8000"
  34. command: >
  35. bash -lc "
  36. mamba env update -n base -f environment.yml || true &&
  37. mamba install -y -c conda-forge ffmpeg libsndfile &&
  38. pip install fastapi uvicorn[standard] python-multipart transformers sentencepiece accelerate langdetect openai-whisper TTS huggingface_hub &&
  39. uvicorn app.main:app --host 0.0.0.0 --port 8000
  40. "
  41. jupyter:
  42. image: jupyter/base-notebook:latest
  43. working_dir: /home/jovyan
  44. volumes:
  45. - ./notebooks:/home/jovyan/work
  46. ports:
  47. - "8888:8888"
  48. command: start-notebook.sh --NotebookApp.token=''
  49. redis:
  50. image: redis:7
  51. ports:
  52. - "6379:6379"
  53. postgres:
  54. image: postgres:15
  55. environment:
  56. - POSTGRES_USER=ml
  57. - POSTGRES_PASSWORD=ml
  58. - POSTGRES_DB=ml
  59. ports:
  60. - "5432:5432"