Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ModelZoo
ResNet50_tensorflow
Commits
64a48653
Commit
64a48653
authored
Mar 16, 2020
by
Chen Chen
Committed by
A. Unique TensorFlower
Mar 16, 2020
Browse files
Internal Change
PiperOrigin-RevId: 301240555
parent
01748b24
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
8 deletions
+27
-8
official/pip_package/setup.py
official/pip_package/setup.py
+26
-8
official/requirements.txt
official/requirements.txt
+1
-0
No files found.
official/pip_package/setup.py
View file @
64a48653
...
@@ -14,6 +14,7 @@
...
@@ -14,6 +14,7 @@
# ==============================================================================
# ==============================================================================
"""Sets up TensorFlow Official Models."""
"""Sets up TensorFlow Official Models."""
import
datetime
import
datetime
import
os
import
sys
import
sys
from
setuptools
import
find_packages
from
setuptools
import
find_packages
...
@@ -29,8 +30,31 @@ if '--project_name' in sys.argv:
...
@@ -29,8 +30,31 @@ if '--project_name' in sys.argv:
sys
.
argv
.
remove
(
'--project_name'
)
sys
.
argv
.
remove
(
'--project_name'
)
sys
.
argv
.
pop
(
project_name_idx
)
sys
.
argv
.
pop
(
project_name_idx
)
def
_get_requirements
():
"""Parses requirements.txt file."""
install_requires_tmp
=
[]
dependency_links_tmp
=
[]
with
open
(
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
'../requirements.txt'
),
'r'
)
as
f
:
for
line
in
f
:
package_name
=
line
.
strip
()
if
package_name
.
startswith
(
'-e '
):
dependency_links_tmp
.
append
(
package_name
[
3
:].
strip
())
else
:
install_requires_tmp
.
append
(
package_name
)
return
install_requires_tmp
,
dependency_links_tmp
install_requires
,
dependency_links
=
_get_requirements
()
if
project_name
==
'tf-models-nightly'
:
if
project_name
==
'tf-models-nightly'
:
version
+=
'.dev'
+
datetime
.
datetime
.
now
().
strftime
(
'%Y%m%d'
)
version
+=
'.dev'
+
datetime
.
datetime
.
now
().
strftime
(
'%Y%m%d'
)
install_requires
.
append
(
'tf-nightly'
)
else
:
install_requires
.
append
(
'tensorflow>=2.1.0'
)
print
(
'install_requires: '
,
install_requires
)
print
(
'dependency_links: '
,
dependency_links
)
setup
(
setup
(
name
=
project_name
,
name
=
project_name
,
...
@@ -51,13 +75,7 @@ setup(
...
@@ -51,13 +75,7 @@ setup(
exclude_package_data
=
{
exclude_package_data
=
{
''
:
[
'*_test.py'
,],
''
:
[
'*_test.py'
,],
},
},
install_requires
=
[
install_requires
=
install_requires
,
'six'
,
dependency_links
=
dependency_links
,
],
extras_require
=
{
'tensorflow'
:
[
'tensorflow>=2.0.0'
],
'tensorflow_gpu'
:
[
'tensorflow-gpu>=2.0.0'
],
'tensorflow-hub'
:
[
'tensorflow-hub>=0.6.0'
],
},
python_requires
=
'>=3.6'
,
python_requires
=
'>=3.6'
,
)
)
official/requirements.txt
View file @
64a48653
six
google-api-python-client>=1.6.7
google-api-python-client>=1.6.7
google-cloud-bigquery>=0.31.0
google-cloud-bigquery>=0.31.0
kaggle>=1.3.9
kaggle>=1.3.9
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment