Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
bob.devtools
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
bob
bob.devtools
Merge requests
!243
[boostrap] Disables conda reverse caching proxy on user request
Code
Review changes
Check out branch
Download
Patches
Plain diff
Expand sidebar
Merged
[boostrap] Disables conda reverse caching proxy on user request
disable-conda-proxy
into
master
Overview
2
Commits
1
Pipelines
2
Changes
1
Merged
[boostrap] Disables conda reverse caching proxy on user request
André Anjos
requested to merge
disable-conda-proxy
into
master
Sep 20, 2021
Overview
2
Commits
1
Pipelines
2
Changes
1
0
0
Merge request reports
Compare
master
version 1
28c07039
Sep 20, 2021
master (base)
and
latest version
latest version
6691c1df
1 commit,
Sep 20, 2021
version 1
28c07039
1 commit,
Sep 20, 2021
1 file
+
26
−
12
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
bob/devtools/bootstrap.py
+
26
−
12
View file @ 6691c1df
Edit in single-file editor
Open in Web IDE
Show full file
@@ -456,6 +456,15 @@ if __name__ == "__main__":
help
=
"
If a specific python version must be used,
"
"
bootstraps a new environment with it [default: %(default)s]
"
,
)
parser
.
add_argument
(
"
--no-proxy
"
,
default
=
(
"
BDT_NO_PROXY
"
in
os
.
environ
),
action
=
"
store_true
"
,
help
=
"
If specified, bootstrap will not use the reverse caching
"
"
proxy for downloading conda packages. You may also set the
"
"
environment variable BDT_NO_PROXY to any value, to disable
"
"
this feature.
"
,
)
parser
.
add_argument
(
"
--verbose
"
,
"
-v
"
,
@@ -480,19 +489,24 @@ if __name__ == "__main__":
condarc
=
os
.
path
.
join
(
args
.
conda_root
,
"
condarc
"
)
logger
.
info
(
"
(create) %s
"
,
condarc
)
with
open
(
condarc
,
"
wt
"
)
as
f
:
# Replaces https://repo.anaconda.com and https://conda.anaconda.org by
# our proxies, so it is optimized for a CI build. Notice we consider
# this script is only executed in this context. The URL should NOT
# work outside of Idiap's network.
f
.
write
(
_BASE_CONDARC
.
replace
(
"
https://repo.anaconda.com
"
,
"
http://bobconda.lab.idiap.ch:8000
"
,
).
replace
(
"
https://conda.anaconda.org
"
,
"
http://bobconda.lab.idiap.ch:9000
"
,
if
args
.
no_proxy
:
logger
.
info
(
"
Disabling reverse caching proxy for conda channels...
"
)
f
.
write
(
_BASE_CONDARC
)
else
:
logger
.
info
(
"
Enabling reverse caching proxy for conda channels...
"
)
# Replaces https://repo.anaconda.com and https://conda.anaconda.org
# by our proxies, so it is optimized for a CI build. Notice we
# consider this script is only executed in this context. The URL
# should NOT work outside of Idiap's network.
f
.
write
(
_BASE_CONDARC
.
replace
(
"
https://repo.anaconda.com
"
,
"
http://bobconda.lab.idiap.ch:8000
"
,
).
replace
(
"
https://conda.anaconda.org
"
,
"
http://bobconda.lab.idiap.ch:9000
"
,
)
)
)
conda_version
=
"
4
"
conda_build_version
=
"
3
"
Loading