adityas129 commited on
Commit
e91deda
·
verified ·
1 Parent(s): 1a2aabc

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +14 -12
Dockerfile CHANGED
@@ -57,35 +57,37 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
57
  RUN ln -sf /usr/bin/python3.11 /usr/bin/python && python -m pip install --upgrade pip
58
 
59
  # --- Python deps (pin order matters!) ---
60
- # 1) JAX
61
  RUN python -m pip install "jax[cuda12]==0.7.1" "jaxlib==0.7.1"
62
 
63
- # 2) seqio early
 
 
 
64
  RUN python -m pip install "seqio==0.0.11"
65
 
66
- # 3) TF nightlies - MATCHING DATES!
67
- RUN python -m pip install --no-cache-dir \
68
- "tf-nightly==2.20.0.dev20250708" \
69
- "tensorflow-text-nightly" \
70
- "tf-hub-nightly"
71
 
72
- # 4) magenta-rt without deps
73
  RUN python -m pip install --no-deps \
74
  'git+https://github.com/magenta/magenta-realtime#egg=magenta_rt[gpu]'
75
 
76
- # 5) tf2jax + other deps
77
  RUN python -m pip install \
78
  tf2jax gin-config librosa resampy soundfile \
79
- google-auth google-cloud-storage numpy==2.1.3 \
80
  fastapi uvicorn[standard] python-multipart pyloudnorm \
 
81
  huggingface_hub gradio soxr
82
 
83
- # 6) t5x/flaxformer last
84
  RUN python -m pip install \
85
  "t5x @ git+https://github.com/google-research/t5x.git@92c5b46" \
86
  "flaxformer @ git+https://github.com/google/flaxformer@399ea3a"
87
 
88
-
89
  # ---- FINAL: enforce TF nightlies and clean any stable TF ----
90
  RUN python - <<'PY'
91
  import sys, sysconfig, glob, os, shutil
 
57
  RUN ln -sf /usr/bin/python3.11 /usr/bin/python && python -m pip install --upgrade pip
58
 
59
  # --- Python deps (pin order matters!) ---
60
+ # 1) Install JAX
61
  RUN python -m pip install "jax[cuda12]==0.7.1" "jaxlib==0.7.1"
62
 
63
+ # 2) Pin protobuf BEFORE anything else
64
+ RUN python -m pip install "protobuf>=4.21.0,<5.0.0"
65
+
66
+ # 3) Install seqio
67
  RUN python -m pip install "seqio==0.0.11"
68
 
69
+ # 4) Install TF stable (should respect protobuf constraint)
70
+ RUN python -m pip install \
71
+ "tensorflow==2.17.0" \
72
+ "tensorflow-text==2.17.0" \
73
+ "tensorflow-hub==0.16.1"
74
 
75
+ # 5) Install magenta-rt without deps
76
  RUN python -m pip install --no-deps \
77
  'git+https://github.com/magenta/magenta-realtime#egg=magenta_rt[gpu]'
78
 
79
+ # 6) Rest of deps
80
  RUN python -m pip install \
81
  tf2jax gin-config librosa resampy soundfile \
 
82
  fastapi uvicorn[standard] python-multipart pyloudnorm \
83
+ google-cloud-storage "numpy==2.1.3" \
84
  huggingface_hub gradio soxr
85
 
86
+ # 7) t5x/flaxformer last
87
  RUN python -m pip install \
88
  "t5x @ git+https://github.com/google-research/t5x.git@92c5b46" \
89
  "flaxformer @ git+https://github.com/google/flaxformer@399ea3a"
90
 
 
91
  # ---- FINAL: enforce TF nightlies and clean any stable TF ----
92
  RUN python - <<'PY'
93
  import sys, sysconfig, glob, os, shutil