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
...
@@ -71,19 +71,19 @@ if [[ $GPU_ARCH_TYPE == 'cuda' ]]; then
fi
fi
echo
'::endgroup::'
echo
'::endgroup::'
if
[[
"
${
OS_TYPE
}
"
==
"windows"
]]
;
then
echo
'::group::Install third party dependencies prior to TorchVision install'
echo
'::group::Install third party dependencies prior to TorchVision install on Windows'
# Installing with `easy_install`, e.g. `python setup.py install` or `python setup.py develop`, has some quirks when
# `easy_install`, i.e. `python setup.py` has problems downloading the dependencies due to SSL.
# when pulling in third-party dependencies. For example:
# Thus, we install them upfront with `pip` to avoid that
.
# - On Windows, we often hit an SSL error although `pip` can install just fine
.
# Instead of fixing the SSL error, we can probably maintain this special case until we switch away from the deprecated
# - It happily pulls in pre-releases, which can lead to more problems down the line.
#
`
easy_install` anyway
.
#
`
pip` does not unless explicitly told to do so
.
python setup.py egg_info
# Thus, we use `easy_install` to extract the third-party dependencies here and install them upfront with `pip`.
# The requires.txt cannot be used with `pip install -r` directly. The requirements are listed at the top and the
python setup.py egg_info
# optional dependencies come in non-standard syntax after a blank line. Thus, we just extract the header.
# The requires.txt cannot be used with `pip install -r` directly. The requirements are listed at the top and the
sed
-e
'/^$/,$d'
*
.egg-info/requires.txt
>
requirements.txt
# optional dependencies come in non-standard syntax after a blank line. Thus, we just extract the header.
pip
install
--progress-bar
=
off
-r
requirements.txt
sed
-e
'/^$/,$d'
*
.egg-info/requires.txt |
tee
requirements.txt
echo
'::endgroup::'
pip
install
--progress-bar
=
off
-r
requirements.txt
fi
echo
'::endgroup::'
echo
'::group::Install TorchVision'
echo
'::group::Install TorchVision'
python setup.py develop
python setup.py develop
...
...
setup.py
View file @
a6f63879
...
@@ -57,10 +57,8 @@ pytorch_dep = "torch"
...
@@ -57,10 +57,8 @@ pytorch_dep = "torch"
if
os
.
getenv
(
"PYTORCH_VERSION"
):
if
os
.
getenv
(
"PYTORCH_VERSION"
):
pytorch_dep
+=
"=="
+
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
=
[
requirements
=
[
numpy
_dep
,
"
numpy
"
,
"requests"
,
"requests"
,
pytorch_dep
,
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