adityas129 commited on
Commit
3bd70d9
·
verified ·
1 Parent(s): 2fe4ab1

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +14 -16
Dockerfile CHANGED
@@ -58,40 +58,38 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
58
  RUN ln -sf /usr/bin/python3.11 /usr/bin/python && python -m pip install --upgrade pip
59
 
60
  # --- Python deps (pin order matters!) ---
61
- # 1) Install JAX
62
  RUN python -m pip install "jax[cuda12]==0.7.1" "jaxlib==0.7.1"
63
 
64
- # 2) Pin protobuf BEFORE anything else
65
  RUN python -m pip install "protobuf>=4.21.0,<5.0.0"
66
 
67
- # 3) Install seqio
68
  RUN python -m pip install "seqio==0.0.11"
69
 
70
- RUN sed -i '/import tensorflow_text as tf_text/d' /usr/local/lib/python3.11/dist-packages/seqio/vocabularies.py
71
-
72
- # 4) Install TF stable (should respect protobuf constraint)
73
- RUN python -m pip install \
74
  "tf-nightly" \
75
  "tensorflow-hub==0.16.1"
76
 
77
- # 5) Install magenta-rt without deps
78
- RUN python -m pip install --no-deps \
79
- 'git+https://github.com/magenta/magenta-realtime#egg=magenta_rt[gpu]'
80
-
81
-
82
-
83
- # 6) Rest of deps
84
  RUN python -m pip install \
85
  tf2jax gin-config librosa resampy soundfile \
86
  fastapi uvicorn[standard] python-multipart pyloudnorm \
87
  google-cloud-storage "numpy==2.1.3" \
88
  huggingface_hub gradio soxr
89
 
90
- # 7) t5x/flaxformer last
91
- RUN python -m pip install \
92
  "t5x @ git+https://github.com/google-research/t5x.git@92c5b46" \
93
  "flaxformer @ git+https://github.com/google/flaxformer@399ea3a"
94
 
 
 
 
 
 
 
95
 
96
  RUN python -m pip install huggingface_hub
97
 
 
58
  RUN ln -sf /usr/bin/python3.11 /usr/bin/python && python -m pip install --upgrade pip
59
 
60
  # --- Python deps (pin order matters!) ---
61
+ # 1) Install JAX first
62
  RUN python -m pip install "jax[cuda12]==0.7.1" "jaxlib==0.7.1"
63
 
64
+ # 2) Pin protobuf
65
  RUN python -m pip install "protobuf>=4.21.0,<5.0.0"
66
 
67
+ # 3) Install packages that depend on TF (let them bring their TF)
68
  RUN python -m pip install "seqio==0.0.11"
69
 
70
+ # 4) NOW force install your desired TensorFlow version
71
+ RUN python -m pip install --force-reinstall --no-deps \
 
 
72
  "tf-nightly" \
73
  "tensorflow-hub==0.16.1"
74
 
75
+ # 5) Install remaining packages
 
 
 
 
 
 
76
  RUN python -m pip install \
77
  tf2jax gin-config librosa resampy soundfile \
78
  fastapi uvicorn[standard] python-multipart pyloudnorm \
79
  google-cloud-storage "numpy==2.1.3" \
80
  huggingface_hub gradio soxr
81
 
82
+ # 6) t5x/flaxformer with --no-deps
83
+ RUN python -m pip install --no-deps \
84
  "t5x @ git+https://github.com/google-research/t5x.git@92c5b46" \
85
  "flaxformer @ git+https://github.com/google/flaxformer@399ea3a"
86
 
87
+ # 7) magenta-rt last with --no-deps
88
+ RUN python -m pip install --no-deps \
89
+ 'git+https://github.com/magenta/magenta-realtime#egg=magenta_rt[gpu]'
90
+
91
+ # 8) Verify final TensorFlow version
92
+ RUN python -c "import tensorflow as tf; print('='*50); print('FINAL TensorFlow version:', tf.__version__); print('='*50)"
93
 
94
  RUN python -m pip install huggingface_hub
95