mirror of
https://github.com/jupyterhub/the-littlest-jupyterhub.git
synced 2025-12-18 21:54:05 +08:00
Merge pull request #242 from owah/master
Adds the universe repository to the used sources
This commit is contained in:
@@ -84,8 +84,22 @@ def main():
|
||||
else:
|
||||
logger.info('Setting up hub environment')
|
||||
initial_setup = True
|
||||
# Install software-properties-common, so we can get add-apt-repository
|
||||
# That helps us make sure the universe repository is enabled, since
|
||||
# that's where the python3-pip package lives. In some very minimal base
|
||||
# VM images, it looks like the universe repository is disabled by default,
|
||||
# causing bootstrapping to fail.
|
||||
subprocess.check_output(['apt-get', 'update', '--yes'], stderr=subprocess.STDOUT)
|
||||
subprocess.check_output(['apt-get', 'install', '--yes', 'python3', 'python3-venv', 'git'], stderr=subprocess.STDOUT)
|
||||
subprocess.check_output(['apt-get', 'install', '--yes', 'software-properties-common'], stderr=subprocess.STDOUT)
|
||||
subprocess.check_output(['add-apt-repository', 'universe'], stderr=subprocess.STDOUT)
|
||||
|
||||
subprocess.check_output(['apt-get', 'update', '--yes'], stderr=subprocess.STDOUT)
|
||||
subprocess.check_output(['apt-get', 'install', '--yes',
|
||||
'git',
|
||||
'python3',
|
||||
'python3-venv',
|
||||
'python3-pip'
|
||||
], stderr=subprocess.STDOUT)
|
||||
logger.info('Installed python & virtual environment')
|
||||
os.makedirs(hub_prefix, exist_ok=True)
|
||||
subprocess.check_output(['python3', '-m', 'venv', hub_prefix], stderr=subprocess.STDOUT)
|
||||
|
||||
Reference in New Issue
Block a user