Skip to content

Commit 99505fa

Browse files
lingvo-botcopybara-github
authored andcommitted
Updates to the Lingvo Dockerfiles: fixes broken tests caused by unfrozen pip dependencies becoming inconsistent.
PiperOrigin-RevId: 480183184
1 parent f4192cb commit 99505fa

File tree

5 files changed

+260
-38
lines changed

5 files changed

+260
-38
lines changed

WORKSPACE

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ load(
1212
git_repository(
1313
name = "subpar",
1414
remote = "https://github.com/google/subpar",
15-
tag = "2.0.0",
15+
commit = "35bb9f0092f71ea56b742a520602da9b3638a24f",
16+
shallow_since = "1557863961 -0400",
1617
)
1718

1819
cc_tf_configure()

docker/dev.dockerfile renamed to docker/dev.Dockerfile

Lines changed: 8 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -68,49 +68,20 @@ RUN mkdir /bazel && \
6868
cd / && \
6969
rm -f /bazel/bazel-$BAZEL_VERSION-installer-linux-x86_64.sh
7070

71-
# TODO(austinwaters): Remove graph-compression-google-research once
72-
# model-pruning-google-research properly declares it as a dependency.
73-
ARG pip_dependencies=' \
74-
apache-beam[gcp]>=2.8 \
75-
attrs \
76-
contextlib2 \
77-
dataclasses \
78-
google-api-python-client \
79-
graph-compression-google-research \
80-
h5py \
81-
ipykernel \
82-
jupyter \
83-
jupyter_http_over_ws \
84-
matplotlib \
85-
mock \
86-
model-pruning-google-research \
87-
numpy \
88-
oauth2client \
89-
pandas \
90-
Pillow \
91-
pyyaml \
92-
recommonmark \
93-
scikit-learn \
94-
scipy \
95-
sentencepiece \
96-
sphinx \
97-
sphinx_rtd_theme \
98-
sympy'
99-
100-
RUN python3 -m pip --no-cache-dir install $pip_dependencies
101-
RUN python3 -m ipykernel.kernelspec
71+
COPY docker /docker
10272

10373
# The latest tensorflow requires CUDA 10 compatible nvidia drivers (410.xx).
10474
# If you are unable to update your drivers, an alternative is to compile
10575
# tensorflow from source instead of installing from pip.
106-
# Ensure we install the correct version by uninstalling first.
107-
RUN python3 -m pip uninstall -y tensorflow tensorflow-gpu tf-nightly tf-nightly-gpu
108-
RUN python3 -m pip --no-cache-dir install tensorflow tensorflow-datasets \
109-
tensorflow-hub tensorflow-text tensorflow-probability
110-
RUN python3 -m pip --no-cache-dir install --no-deps waymo-open-dataset-tf-2-6-0
111-
76+
# TODO(austinwaters): Remove graph-compression-google-research once
77+
RUN --mount=type=cache,target=/root/.cache \
78+
python3 -m pip install -r /docker/dev.requirements.txt
79+
RUN python3 -m ipykernel.kernelspec
11280
RUN jupyter serverextension enable --py jupyter_http_over_ws
11381

82+
COPY docker/devel.bashrc /root/devel.bashrc
83+
RUN echo 'source /root/devel.bashrc' >> /root/.bashrc
84+
11485
# TensorBoard
11586
EXPOSE 6006
11687

docker/dev.requirements.txt

Lines changed: 219 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,219 @@
1+
# Copyright 2022 The TensorFlow Authors. All Rights Reserved.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
#
15+
# ==============================================================================
16+
# Specifies the python environment for dev.Dockerfile.
17+
#
18+
# Some notes:
19+
# - We are freezing these package versions to the last known working set here
20+
# for a couple reasons:
21+
# (1) our prior setup did not pin package versions nor specified all
22+
# transitive dependencies, and so was more fragile and vulnurable to
23+
# external updates breaking Lingvo.
24+
# (2) future updates to dependencies can be explicitly tracked.
25+
# - We used to include waymo-open-dataset-tf-2-6-0; this was removed because it
26+
# is incompatible with the working set we have here.
27+
absl-py==1.1.0
28+
alabaster==0.7.12
29+
apache-beam==2.39.0
30+
argon2-cffi==21.3.0
31+
argon2-cffi-bindings==21.2.0
32+
asttokens==2.0.5
33+
astunparse==1.6.3
34+
attrs==21.4.0
35+
Babel==2.10.2
36+
backcall==0.2.0
37+
beautifulsoup4==4.11.1
38+
bleach==5.0.0
39+
cachetools==4.2.4
40+
certifi==2022.5.18.1
41+
cffi==1.15.0
42+
charset-normalizer==2.0.12
43+
cloudpickle==2.1.0
44+
commonmark==0.9.1
45+
contextlib2==21.6.0
46+
crcmod==1.7
47+
cycler==0.11.0
48+
dataclasses==0.6
49+
debugpy==1.6.0
50+
decorator==5.1.1
51+
defusedxml==0.7.1
52+
dill==0.3.1.1
53+
dm-tree==0.1.7
54+
docopt==0.6.2
55+
docutils==0.17.1
56+
entrypoints==0.4
57+
etils==0.6.0
58+
executing==0.8.3
59+
fastavro==1.5.1
60+
fasteners==0.17.3
61+
fastjsonschema==2.15.3
62+
flatbuffers==1.12
63+
fonttools==4.33.3
64+
gast==0.4.0
65+
google-api-core==1.31.6
66+
google-api-python-client==2.51.0
67+
google-apitools==0.5.31
68+
google-auth==1.35.0
69+
google-auth-httplib2==0.1.0
70+
google-auth-oauthlib==0.4.6
71+
google-cloud-bigquery==2.34.4
72+
google-cloud-bigquery-storage==2.13.2
73+
google-cloud-bigtable==1.7.2
74+
google-cloud-core==1.7.2
75+
google-cloud-datastore==1.15.5
76+
google-cloud-dlp==3.7.1
77+
google-cloud-language==1.3.2
78+
google-cloud-pubsub==2.13.0
79+
google-cloud-pubsublite==1.4.2
80+
google-cloud-recommendations-ai==0.2.0
81+
google-cloud-spanner==1.19.3
82+
google-cloud-videointelligence==1.16.3
83+
google-cloud-vision==1.0.2
84+
google-crc32c==1.3.0
85+
google-pasta==0.2.0
86+
google-resumable-media==2.3.3
87+
googleapis-common-protos==1.56.2
88+
graph-compression-google-research==0.0.4
89+
grpc-google-iam-v1==0.12.4
90+
grpcio==1.46.3
91+
grpcio-gcp==0.2.2
92+
grpcio-status==1.46.3
93+
h5py==3.7.0
94+
hdfs==2.7.0
95+
httplib2==0.19.1
96+
idna==3.3
97+
imagesize==1.3.0
98+
importlib-metadata==4.11.4
99+
importlib-resources==5.7.1
100+
ipykernel==6.14.0
101+
ipython==8.4.0
102+
ipython-genutils==0.2.0
103+
ipywidgets==7.7.0
104+
jedi==0.18.1
105+
Jinja2==3.1.2
106+
joblib==1.1.0
107+
jsonschema==4.6.0
108+
jupyter==1.0.0
109+
jupyter-client==7.3.4
110+
jupyter-console==6.4.3
111+
jupyter-core==4.10.0
112+
jupyter-http-over-ws==0.0.8
113+
jupyterlab-pygments==0.2.2
114+
jupyterlab-widgets==1.1.0
115+
keras==2.9.0
116+
Keras-Preprocessing==1.1.2
117+
kiwisolver==1.4.3
118+
libclang==14.0.1
119+
Markdown==3.3.7
120+
MarkupSafe==2.1.1
121+
matplotlib==3.5.2
122+
matplotlib-inline==0.1.3
123+
mistune==0.8.4
124+
mock==4.0.3
125+
model-pruning-google-research==0.0.5
126+
mpmath==1.2.1
127+
nbclient==0.6.4
128+
nbconvert==6.5.0
129+
nbformat==5.4.0
130+
nest-asyncio==1.5.5
131+
notebook==6.4.12
132+
numpy==1.22.4
133+
oauth2client==4.1.3
134+
oauthlib==3.2.0
135+
opt-einsum==3.3.0
136+
orjson==3.7.2
137+
overrides==6.1.0
138+
packaging==21.3
139+
pandas==1.4.2
140+
pandocfilters==1.5.0
141+
parso==0.8.3
142+
pexpect==4.8.0
143+
pickleshare==0.7.5
144+
Pillow==9.1.1
145+
prometheus-client==0.14.1
146+
promise==2.3
147+
prompt-toolkit==3.0.29
148+
proto-plus==1.20.6
149+
protobuf==3.19.4
150+
psutil==5.9.1
151+
ptyprocess==0.7.0
152+
pure-eval==0.2.2
153+
pyarrow==7.0.0
154+
pyasn1==0.4.8
155+
pyasn1-modules==0.2.8
156+
pycparser==2.21
157+
pydot==1.4.2
158+
Pygments==2.12.0
159+
PyGObject==3.26.1
160+
pymongo==3.12.3
161+
pyparsing==2.4.7
162+
pyrsistent==0.18.1
163+
python-apt==1.6.5+ubuntu0.7
164+
python-dateutil==2.8.2
165+
pytz==2022.1
166+
PyYAML==6.0
167+
pyzmq==23.1.0
168+
qtconsole==5.3.1
169+
QtPy==2.1.0
170+
recommonmark==0.7.1
171+
requests==2.28.0
172+
requests-oauthlib==1.3.1
173+
rsa==4.8
174+
scikit-learn==1.1.1
175+
scipy==1.8.1
176+
Send2Trash==1.8.0
177+
sentencepiece==0.1.96
178+
six==1.16.0
179+
snowballstemmer==2.2.0
180+
soupsieve==2.3.2.post1
181+
Sphinx==5.0.1
182+
sphinx-rtd-theme==1.0.0
183+
sphinxcontrib-applehelp==1.0.2
184+
sphinxcontrib-devhelp==1.0.2
185+
sphinxcontrib-htmlhelp==2.0.0
186+
sphinxcontrib-jsmath==1.0.1
187+
sphinxcontrib-qthelp==1.0.3
188+
sphinxcontrib-serializinghtml==1.1.5
189+
stack-data==0.2.0
190+
sympy==1.10.1
191+
tensorboard==2.9.1
192+
tensorboard-data-server==0.6.1
193+
tensorboard-plugin-wit==1.8.1
194+
tensorflow==2.9.1
195+
tensorflow-datasets==4.6.0
196+
tensorflow-estimator==2.9.0
197+
tensorflow-hub==0.12.0
198+
tensorflow-io-gcs-filesystem==0.26.0
199+
tensorflow-metadata==1.8.0
200+
tensorflow-probability==0.17.0
201+
tensorflow-text==2.9.0
202+
termcolor==1.1.0
203+
terminado==0.15.0
204+
threadpoolctl==3.1.0
205+
tinycss2==1.1.1
206+
toml==0.10.2
207+
tornado==6.1
208+
tqdm==4.64.0
209+
traitlets==5.2.2.post1
210+
typing-utils==0.1.0
211+
typing_extensions==4.2.0
212+
uritemplate==4.1.1
213+
urllib3==1.26.9
214+
wcwidth==0.2.5
215+
webencodings==0.5.1
216+
Werkzeug==2.1.2
217+
widgetsnbextension==3.6.0
218+
wrapt==1.14.1
219+
zipp==3.8.0

docker/devel.bashrc

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Copyright 2022 The TensorFlow Authors. All Rights Reserved.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
#
15+
# ==============================================================================
16+
17+
18+
## Similar to
19+
## https://github.com/tensorflow/tensorflow/tree/master/tensorflow/tools/tf_sig_build_dockerfiles
20+
21+
# Do not print anything if this is not being used interactively
22+
[ -z "$PS1" ] && return
23+
24+
# Set up attractive prompt
25+
export PS1="\[\e[31m\]lingvo-dev\[\e[m\] \[\e[33m\]\w\[\e[m\] > "
26+
export TERM=xterm-256color
27+
alias grep="grep --color=auto"
28+
alias ls="ls --color=auto"
29+
alias l="ls -l"
30+
# Fix nvidia-docker
31+
ldconfig
File renamed without changes.

0 commit comments

Comments
 (0)