Commit Graph

34 Commits

Author SHA1 Message Date
pre-commit-ci[bot]
e95942d61b [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2023-05-15 08:51:36 +00:00
Min RK
9b940c34fd don't let conda install wait for input 2023-03-27 15:43:46 +02:00
Min RK
b5a6b3f590 Avoid downgrading user-env conda/mamba
- Only check lower bound on conda/mamba, upgrade unbounded if not matched (let conda apply upper bound according to existing pins, such as Python)
- handle missing mamba
- avoid upgrading Python by aborting the install, instead of keeping old envs
- minimum supported Python for user env is 3.9
- Fix output reporting of conda install step (no need for json capture when we don't parse the output - exit codes will do)
2023-03-27 13:20:22 +02:00
Min RK
4d42f24e48 test ensure_user_environment
verify behavior for:

- current version (no change)
- old, supported version (upgrade, but not too far)
- too old, re-run installer
- directory exists, no conda
2023-03-23 12:34:44 +01:00
Min RK
594b61003f add some logging to conda setup 2023-03-23 12:31:50 +01:00
Min RK
1a3c48a500 Update base user environment to mambaforge 22.11.1-4
shift some duplicated code into utility functions and constants
2023-03-21 14:37:50 +01:00
Erik Sundell
e0aaa4f995 pre-commit: run black with string normalization 2021-11-03 23:55:34 +01:00
Erik Sundell
771ae59636 pre-commit: run black without string normalization 2021-11-03 23:53:41 +01:00
Erik Sundell
c2c4d708f5 pyupgrade fixes 2021-10-31 11:26:40 +01:00
Erik Sundell
3de51ff637 Remove --no-cache-dir flag 2021-10-27 15:34:44 +02:00
Erik Sundell
125e12ca5e Let pip upgrade packages
Since we now longer pin versions to the patch version, we should make
an install cause the packages upgrade within the version constraints
rathern than just settle for the current version if it is already
installed.
2021-10-27 10:41:43 +02:00
Yuvi Panda
d4be3c1313 Merge pull request #717 from yuvipanda/cleanup-retrieve
Don't open file twice when downloading conda
2021-10-19 17:50:00 +05:30
Erik Sundell
de146690ad Apply suggestions from code review 2021-10-19 13:47:11 +02:00
Erik Sundell
6d6ec61102 Apply suggestions from code review 2021-10-19 12:24:34 +02:00
YuviPanda
63ced8eb7d Flush conda installer to disk before calculating sha 2021-10-19 15:07:44 +05:30
YuviPanda
9921403327 Don't open file twice when downloading conda
Unnecessary, and could also possibly cause races -
see https://github.com/jupyterhub/the-littlest-jupyterhub/pull/710#issuecomment-946165463
2021-10-19 14:05:36 +05:30
Simon Li
0018beca4f Switch to mambaforge 2021-10-18 19:41:50 +01:00
YuviPanda
f82c49c12c Use sha256 sums for verifying miniconda download
miniconda downloader now provides sha256 hashes. Previously
it provided only md5 hashes. md5 is deprecated everywhere for
everything, so let's use this
2020-05-29 13:32:55 +03:00
yuvipanda
7071332445 Provide much better error messages
- When processes fail, they actually print a failure message
  on the user's terminal
- Regardless of success or failure, we print all output to
  /opt/tljh/installer.log

This should make debugging people's issues *much* easier, since
we can actually see the output of failing commands rather than
having to guess.
2019-05-29 11:27:53 -07:00
GeorgianaElena
cfb3ec43cd replace urllib with requests 2019-05-24 14:37:42 +03:00
Min RK
5bf2b1bb0a Run fix-permissions on each install command
ensures files have the right permissions

conda and pip may not guarantee installed files are not world-writeable
2019-01-30 16:42:35 +01:00
yuvipanda
7c1cb6d3cb Don't capture stderr when calling conda
conda's stderr is *not* guaranteed to be JSON when you are
passing --json. We let it bleed through for now. In the
longer term, we should capture this separately.

Ref #148, which I think is caused by this (along with conda
releasing a newer version than what we have)
2018-08-20 14:40:00 -07:00
yuvipanda
414d3932ac Log bootstrap / installer messages to file as well
This enables debugging when a server does not come up as
expected.

Fixes #22
2018-07-29 02:17:12 -07:00
yuvipanda
e97b81fe7a Require miniconda to be installed for conda. to work
We can no longer assume that sys.executable has conda
installed. Instead, we require that prefix has conda installed.
This requires miniconda to be installed into prefix.
2018-07-20 11:30:11 -07:00
yuvipanda
8ff0befe00 Re-instate conda version check fix
Lost https://github.com/jupyterhub/the-littlest-jupyterhub/pull/58
to a rebase. Put it back!
2018-07-20 11:12:03 -07:00
yuvipanda
fc0ecb6699 Use venv for base hub environment
- TLJH should support raspberry pi, which runs ARM. conda does
  not support ARM.
- Get nodejs from nodesource instead of conda or default repositories.
  Default repositories get out of date pretty quickly.
- Install CHP from npm
2018-07-19 18:01:30 -07:00
yuvipanda
3d74ee71b3 Add option to install requirements.txt file on install
Also add docs about --admin option

Refer #49
2018-07-18 01:01:37 -07:00
yuvipanda
de7fda47db Install conda packages from conda-forge explicitly
I don't think the default channel fields in construct.yaml are
working.
2018-06-27 03:05:24 -07:00
yuvipanda
ac7bd88105 Hide stdout from pip installs 2018-06-27 02:14:20 -07:00
yuvipanda
4ec145f9b8 Strip out random null bytes better in output fron conda
WAT
2018-06-26 18:36:20 -07:00
yuvipanda
303d2d0e88 Call conda more resiliently 2018-06-26 18:35:58 -07:00
yuvipanda
f7813a9385 Add function to install packages from pip too 2018-06-26 17:38:56 -07:00
yuvipanda
92558e913e Add unit test for conda environment management
- Also fix a bug caught by unit test!
2018-06-26 04:40:39 -07:00
yuvipanda
6dc68210c2 Move conda wrappers to their own module 2018-06-26 04:14:29 -07:00