packer-images/images/almalinux/9.5/jupyterlab/variables.auto.pkrvars.hcl
Ben Vincent eb1aee35c5
All checks were successful
Deploy / build (push) Successful in 18m22s
feat: add python and make (#9)
- add python and make to the base images
- remove make, python and jq from images derived from base

Reviewed-on: https://git.query.consul/unkin/packer-images/pulls/9
2025-03-09 17:50:37 +11:00

27 lines
1.6 KiB
HCL

# almalinux/9.5/jupyterlab
deploy_files_from_common = true
docker_source = "git.query.consul/unkin/almalinux9-base:latest"
scripts_pre_file_copy = [
"dnf install -y sudo",
]
scripts_post_packages = [
"uv venv --python 3.12 /opt/jupyter && source /opt/jupyter/bin/activate && uv pip install -r /tmp/jupyter_requirements.txt && deactivate",
"uv venv --python 3.11 /opt/ipykernels/python3.11 && source /opt/ipykernels/python3.11/bin/activate && uv pip install ipykernel && python -m ipykernel install --name ipykernel311 --display-name \"Python (3.11)\" && deactivate",
"uv venv --python 3.12 /opt/ipykernels/python3.12 && source /opt/ipykernels/python3.12/bin/activate && uv pip install ipykernel && python -m ipykernel install --name ipykernel312 --display-name \"Python (3.12)\" && deactivate",
"uv venv --python 3.12 /opt/ipykernels/bash && source /opt/ipykernels/bash/bin/activate && uv pip install bash_kernel && python -m bash_kernel.install --prefix /usr/local && deactivate",
"uv venv --python 3.12 /opt/ipykernels/zsh && source /opt/ipykernels/zsh/bin/activate && uv pip install zsh_jupyter_kernel && python -m zsh_jupyter_kernel.install --prefix /usr/local && deactivate",
"uv venv --python 3.12 /opt/ipykernels/vim && source /opt/ipykernels/vim/bin/activate && uv pip install vim_kernel && python -m vim_kernel.install --prefix /usr/local && deactivate",
"useradd -m jupyter",
"mkdir /home/jupyter/work",
"chown jupyter:jupyter -Rv /home/jupyter/work"
]
scripts_final = [
"dnf clean all",
"rm -rf /var/cache/dnf"
]
docker_changes = [
"USER jupyter",
"WORKDIR /home/jupyter",
"CMD [\"/opt/jupyter/bin/jupyterhub-singleuser\"]",
]