packer-images/images/almalinux/8.10/jupyterlab/variables.auto.pkrvars.hcl
Ben Vincent ff19688dd2 feat: first commit
- add base image for docker and incus
- manage images for almalinux 8.10 and 9.5
- replace all existing docker build repos
2025-01-11 20:50:07 +11:00

34 lines
1.7 KiB
HCL

# almalinux/8.10/jupyterlab
docker_source = "git.query.consul/unkin/almalinux8-base:latest"
deploy_files_from_common = true
packages = [
"uv",
"python3.11",
"python3.11-pip",
"python3.12",
"python3.12-pip"
]
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\"]",
]