Skip to content
This repository has been archived by the owner on Jun 6, 2024. It is now read-only.

Add offline apt package cache in kube runtime #4211

Closed
hzy46 opened this issue Feb 17, 2020 · 0 comments · Fixed by #4226
Closed

Add offline apt package cache in kube runtime #4211

hzy46 opened this issue Feb 17, 2020 · 0 comments · Fixed by #4226

Comments

@hzy46
Copy link
Contributor

hzy46 commented Feb 17, 2020

Runtime plugins use apt update and apt install ... to install some additional packages. If the network connection from pai cluster to the apt repository is poor, apt install may take a long period of time or even fail.

Since we use kube runtime to initialize the environment before job container, it is possible to use the runtime container as a "cache" of some frequently-needed packages. Here is one possible solution in detail:

  • When we build runtime container, add all .deb files relied by certain package and certain os version. It could be achieved by the following commands:
apt-get update
apt-get -y install --print-uris package-name | cut -d\' -f2 | grep http:// > apturls
wget -i <path-to-apturls-file> 
  • In every runtime plugin, if it needs some package, use the pre-downloaded .deb files to install it.
@hzy46 hzy46 changed the title Add offline apt package in kube runtime Add offline apt package cache in kube runtime Feb 17, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant