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
OpenDAS
vision
Commits
a6f63879
Unverified
Commit
a6f63879
authored
May 31, 2023
by
Philip Meier
Committed by
GitHub
May 31, 2023
Browse files
always install dependencies upfront with pip in CI (#7645)
parent
70c8f500
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
16 deletions
+14
-16
.github/scripts/setup-env.sh
.github/scripts/setup-env.sh
+13
-13
setup.py
setup.py
+1
-3
No files found.
.github/scripts/setup-env.sh
View file @
a6f63879
...
...
@@ -71,19 +71,19 @@ if [[ $GPU_ARCH_TYPE == 'cuda' ]]; then
fi
echo
'::endgroup::'
if
[[
"
${
OS_TYPE
}
"
==
"windows"
]]
;
then
echo
'::group::Install third party dependencies prior to TorchVision install on Windows'
# `easy_install`, i.e. `python setup.py` has problems downloading the dependencies due to SSL.
# Thus, we install them upfront with `pip` to avoid that
.
# Instead of fixing the SSL error, we can probably maintain this special case until we switch away from the deprecated
#
`
easy_install` anyway
.
python setup.py egg_info
# The requires.txt cannot be used with `pip install -r` directly. The requirements are listed at the top and the
# optional dependencies come in non-standard syntax after a blank line. Thus, we just extract the header.
sed
-e
'/^$/,$d'
*
.egg-info/requires.txt
>
requirements.txt
pip
install
--progress-bar
=
off
-r
requirements.txt
echo
'::endgroup::'
fi
echo
'::group::Install third party dependencies prior to TorchVision install'
# Installing with `easy_install`, e.g. `python setup.py install` or `python setup.py develop`, has some quirks when
# when pulling in third-party dependencies. For example:
# - On Windows, we often hit an SSL error although `pip` can install just fine
.
# - It happily pulls in pre-releases, which can lead to more problems down the line.
#
`
pip` does not unless explicitly told to do so
.
# Thus, we use `easy_install` to extract the third-party dependencies here and install them upfront with `pip`.
python setup.py egg_info
# The requires.txt cannot be used with `pip install -r` directly. The requirements are listed at the top and the
# optional dependencies come in non-standard syntax after a blank line. Thus, we just extract the header.
sed
-e
'/^$/,$d'
*
.egg-info/requires.txt |
tee
requirements.txt
pip
install
--progress-bar
=
off
-r
requirements.txt
echo
'::endgroup::'
echo
'::group::Install TorchVision'
python setup.py develop
...
...
setup.py
View file @
a6f63879
...
...
@@ -57,10 +57,8 @@ pytorch_dep = "torch"
if
os
.
getenv
(
"PYTORCH_VERSION"
):
pytorch_dep
+=
"=="
+
os
.
getenv
(
"PYTORCH_VERSION"
)
numpy_dep
=
"numpy"
if
sys
.
version_info
[:
2
]
>=
(
3
,
9
)
else
"numpy < 1.25"
requirements
=
[
numpy
_dep
,
"
numpy
"
,
"requests"
,
pytorch_dep
,
]
...
...
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