Update Dockerfile
Browse files- Dockerfile +13 -11
Dockerfile
CHANGED
|
@@ -58,19 +58,22 @@ RUN ln -sf /usr/bin/python3.11 /usr/bin/python && python -m pip install --upgrad
|
|
| 58 |
# 1) Install JAX first
|
| 59 |
RUN python -m pip install "jax[cuda12]==0.7.1" "jaxlib==0.7.1"
|
| 60 |
|
| 61 |
-
# 2) Install seqio dependencies manually (excluding tfds-nightly
|
| 62 |
RUN python -m pip install \
|
| 63 |
absl-py clu sentencepiece
|
| 64 |
|
| 65 |
# 3) Install seqio without dependencies
|
| 66 |
RUN python -m pip install --no-deps "seqio==0.0.11"
|
| 67 |
|
| 68 |
-
# 4)
|
| 69 |
-
RUN
|
| 70 |
|
| 71 |
-
# 5) Install
|
|
|
|
|
|
|
|
|
|
| 72 |
RUN python -m pip install --no-deps \
|
| 73 |
-
"
|
| 74 |
"tensorflow-hub==0.16.1"
|
| 75 |
|
| 76 |
# 6) Install remaining packages (consolidated, no duplicates)
|
|
@@ -92,13 +95,12 @@ RUN python -m pip install --no-deps \
|
|
| 92 |
RUN python -m pip install --no-deps \
|
| 93 |
'git+https://github.com/magenta/magenta-realtime#egg=magenta_rt[gpu]'
|
| 94 |
|
| 95 |
-
|
| 96 |
-
RUN python -m pip uninstall -y tensorflow tensorflow-
|
| 97 |
-
python -m pip install --upgrade --force-reinstall tf-nightly
|
| 98 |
-
|
| 99 |
|
| 100 |
-
#
|
| 101 |
-
RUN python -m pip install --upgrade
|
|
|
|
| 102 |
|
| 103 |
# 11) Verify TensorFlow installation
|
| 104 |
RUN python -c "import tensorflow as tf; print('='*50); print('TensorFlow version:', tf.__version__); print('='*50)"
|
|
|
|
| 58 |
# 1) Install JAX first
|
| 59 |
RUN python -m pip install "jax[cuda12]==0.7.1" "jaxlib==0.7.1"
|
| 60 |
|
| 61 |
+
# 2) Install seqio dependencies manually (excluding tfds-nightly and tensorflow-text)
|
| 62 |
RUN python -m pip install \
|
| 63 |
absl-py clu sentencepiece
|
| 64 |
|
| 65 |
# 3) Install seqio without dependencies
|
| 66 |
RUN python -m pip install --no-deps "seqio==0.0.11"
|
| 67 |
|
| 68 |
+
# 4) Comment out tensorflow-text import in seqio since it's not used by Magenta RT
|
| 69 |
+
RUN sed -i '/import tensorflow_text as tf_text/d' /usr/local/lib/python3.11/dist-packages/seqio/vocabularies.py
|
| 70 |
|
| 71 |
+
# 5) Install correct protobuf version for stable TensorFlow
|
| 72 |
+
RUN python -m pip install "protobuf>=3.20.3,<6.0.0"
|
| 73 |
+
|
| 74 |
+
# 6) Install stable TensorFlow (not nightly)
|
| 75 |
RUN python -m pip install --no-deps \
|
| 76 |
+
"tensorflow[and-cuda]>=2.18.0" \
|
| 77 |
"tensorflow-hub==0.16.1"
|
| 78 |
|
| 79 |
# 6) Install remaining packages (consolidated, no duplicates)
|
|
|
|
| 95 |
RUN python -m pip install --no-deps \
|
| 96 |
'git+https://github.com/magenta/magenta-realtime#egg=magenta_rt[gpu]'
|
| 97 |
|
| 98 |
+
# 10) Remove conflicting stable tensorflow packages
|
| 99 |
+
RUN python -m pip uninstall -y tensorflow tensorflow-cpu tensorflow-text || true
|
|
|
|
|
|
|
| 100 |
|
| 101 |
+
# Install stable TensorFlow instead of nightly (following KEHANG's recommendation)
|
| 102 |
+
RUN python -m pip install --upgrade \
|
| 103 |
+
"tensorflow[and-cuda]>=2.18.0"
|
| 104 |
|
| 105 |
# 11) Verify TensorFlow installation
|
| 106 |
RUN python -c "import tensorflow as tf; print('='*50); print('TensorFlow version:', tf.__version__); print('='*50)"
|