Skip to content

Commit afb7dd1

Browse files
committed
[BERT/TF2] Release
1 parent bd257e1 commit afb7dd1

160 files changed

Lines changed: 26494 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved.
2+
# Licensed under the Apache License, Version 2.0 (the "License");
3+
# you may not use this file except in compliance with the License.
4+
# You may obtain a copy of the License at
5+
#
6+
# http://www.apache.org/licenses/LICENSE-2.0
7+
#
8+
# Unless required by applicable law or agreed to in writing, software
9+
# distributed under the License is distributed on an "AS IS" BASIS,
10+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11+
# See the License for the specific language governing permissions and
12+
# limitations under the License.
13+
# ==============================================================================
14+
data_dl/
15+
.idea/
16+
.git/
17+
.vscode/
18+
__pycache__/
19+
results/
20+
data/binary
21+
data/download
22+
data/extracted
23+
data/formatted_one_article_per_line
24+
data/sharded
25+
data/hdf5*
26+
data/tfrecord*
27+
checkpoints/
Lines changed: 147 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,147 @@
1+
# Copyright (c) 2021, NVIDIA CORPORATION. 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+
# Initially taken from Github's Python gitignore file
16+
17+
# Byte-compiled / optimized / DLL files
18+
__pycache__/
19+
*.py[cod]
20+
*$py.class
21+
22+
# C extensions
23+
*.so
24+
25+
#Data
26+
data/download
27+
data/extracted
28+
data/formatted_one_article_per_line
29+
data/sharded
30+
data/hdf5*
31+
data/tfrecord*
32+
data/*/*.zip
33+
34+
#Resutls
35+
results/
36+
37+
# Distribution / packaging
38+
.Python
39+
build/
40+
develop-eggs/
41+
dist/
42+
downloads/
43+
eggs/
44+
.eggs/
45+
lib/
46+
lib64/
47+
parts/
48+
sdist/
49+
var/
50+
wheels/
51+
*.egg-info/
52+
.installed.cfg
53+
.vscode/
54+
*.egg
55+
MANIFEST
56+
57+
# PyInstaller
58+
# Usually these files are written by a python script from a template
59+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
60+
*.manifest
61+
*.spec
62+
63+
# Installer logs
64+
pip-log.txt
65+
pip-delete-this-directory.txt
66+
67+
# Unit test / coverage reports
68+
htmlcov/
69+
.tox/
70+
.nox/
71+
.coverage
72+
.coverage.*
73+
.cache
74+
nosetests.xml
75+
coverage.xml
76+
*.cover
77+
.hypothesis/
78+
.pytest_cache/
79+
80+
# Translations
81+
*.mo
82+
*.pot
83+
84+
# Django stuff:
85+
*.log
86+
local_settings.py
87+
db.sqlite3
88+
89+
# Flask stuff:
90+
instance/
91+
.webassets-cache
92+
93+
# Scrapy stuff:
94+
.scrapy
95+
96+
# Sphinx documentation
97+
docs/_build/
98+
99+
# PyBuilder
100+
target/
101+
102+
# Jupyter Notebook
103+
.ipynb_checkpoints
104+
105+
# IPython
106+
profile_default/
107+
ipython_config.py
108+
109+
# pyenv
110+
.python-version
111+
112+
# celery beat schedule file
113+
celerybeat-schedule
114+
115+
# SageMath parsed files
116+
*.sage.py
117+
118+
# Environments
119+
.env
120+
.venv
121+
env/
122+
venv/
123+
ENV/
124+
env.bak/
125+
venv.bak/
126+
127+
# Spyder project settings
128+
.spyderproject
129+
.spyproject
130+
131+
# Rope project settings
132+
.ropeproject
133+
134+
# mkdocs documentation
135+
/site
136+
137+
# mypy
138+
.mypy_cache/
139+
.dmypy.json
140+
dmypy.json
141+
142+
# Pyre type checker
143+
.pyre/
144+
145+
# TensorRT
146+
*.engine
147+
models/
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# Copyright (c) 2021, NVIDIA CORPORATION. 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+
ARG FROM_IMAGE_NAME=nvcr.io/nvidia/tensorflow:21.02-tf2-py3
16+
FROM ${FROM_IMAGE_NAME}
17+
18+
RUN apt-get update && apt-get install -y pbzip2 pv bzip2 libcurl4 curl
19+
20+
WORKDIR /workspace
21+
ENV HOME /workspace
22+
23+
WORKDIR /workspace
24+
RUN git clone https://github.com/openai/gradient-checkpointing.git
25+
RUN git clone https://github.com/attardi/wikiextractor.git
26+
RUN git clone https://github.com/soskek/bookcorpus.git
27+
RUN git clone https://github.com/titipata/pubmed_parser
28+
29+
RUN pip3 install /workspace/pubmed_parser
30+
31+
# Environment
32+
ENV LANG C.UTF-8
33+
ENV LC_ALL C.UTF-8
34+
35+
# Install Python 3 packages
36+
RUN pip3 install \
37+
requests \
38+
tqdm \
39+
horovod \
40+
sentencepiece \
41+
tensorflow_hub \
42+
pynvml \
43+
wget \
44+
html2text \
45+
progressbar \
46+
git+https://github.com/NVIDIA/dllogger
47+
48+
WORKDIR /workspace/bert_tf2
49+
# Copy model into image - This can be overridden by mounting a volume to the same location.
50+
COPY . .
51+
ENV PYTHONPATH="/workspace/wikiextractor:/workspace/bert_tf2:${PYTHONPATH}"
52+
53+
#disable lazy compilatoin
54+
ENV TF_XLA_FLAGS="--tf_xla_enable_lazy_compilation=false"
55+
56+
ENV TF_DEVICE_MIN_SYS_MEMORY_IN_MB=2048

0 commit comments

Comments
 (0)