Skip to content
Snippets Groups Projects
Commit b73e1128 authored by André Anjos's avatar André Anjos :speech_balloon:
Browse files

Merge branch 'conda-proxy' into 'master'

Re-direct miniconda installation through reverse proxy

See merge request !223
parents 48bb36ef 756beca7
No related branches found
No related tags found
1 merge request!223Re-direct miniconda installation through reverse proxy
Pipeline #51480 passed
......@@ -232,22 +232,25 @@ def ensure_miniconda_sh():
# re-downloads installer
import http.client
server = "www.idiap.ch" # http
server = ("bobconda.lab.idiap.ch", 8000) # http
logger.info("Connecting to http://%s...", server)
conn = http.client.HTTPConnection(server)
logger.info("Connecting to http://%s:%d...", *server)
conn = http.client.HTTPConnection(server[0], port=server[1])
conn.request("GET", path)
r1 = conn.getresponse()
assert r1.status == 200, "Request for http://%s%s - returned status %d " "(%s)" % (
server,
assert (
r1.status == 200
), "Request for http://%s:%d%s - returned status %d " "(%s)" % (
server[0],
server[1],
path,
r1.status,
r1.reason,
)
dst = "miniconda.sh"
logger.info("(download) http://%s%s -> %s...", server, path, dst)
logger.info("(download) http://%s:%d%s -> %s...", server[0], server[1], path, dst)
with open(dst, "wb") as f:
f.write(r1.read())
......@@ -474,6 +477,9 @@ if __name__ == "__main__":
if args.verbose >= 3:
conda_verbosity = ["-vv"]
# print conda information for debugging purposes
run_cmdline([conda_bin, "info"] + conda_verbosity)
if args.command == "build":
# simple - just use the defaults channels when self building
......@@ -549,6 +555,3 @@ if __name__ == "__main__":
if conda_cmd == "install":
cmd += ["--update-specs"]
run_cmdline(cmd)
# print conda information for debugging purposes
run_cmdline([conda_bin, "info"] + conda_verbosity)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment