generated from unkin/docker-template
- builds container with python3.12 and minimal required pip packages
This commit is contained in:
+21
-6
@@ -5,14 +5,29 @@ FROM git.query.consul/unkin/almalinux8:latest
|
||||
RUN dnf clean all && \
|
||||
dnf makecache
|
||||
|
||||
# Install nodejs:20 for actions
|
||||
RUN dnf module enable -y nodejs:20 && \
|
||||
dnf install -y nodejs
|
||||
|
||||
# Install packages
|
||||
RUN dnf groupinstall -y 'Development Tools' && \
|
||||
dnf install -y make cmake gcc gcc-c++ rpm rpmdevtools wget
|
||||
RUN dnf install -y python3.12 python3.12-pip
|
||||
|
||||
# Cleanup
|
||||
RUN dnf clean all && \
|
||||
rm -rf /var/cache/dnf
|
||||
|
||||
# create venv for jupyter
|
||||
RUN python3.12 -m venv /opt/jupyter
|
||||
|
||||
# upgrade pip
|
||||
RUN /opt/jupyter/bin/python -m pip install --upgrade pip
|
||||
|
||||
# install requirements for jupyterhub-singleinstance
|
||||
RUN /opt/jupyter/bin/pip install \
|
||||
'jupyterhub==5.2.1' \
|
||||
'notebook==7.2.2'
|
||||
|
||||
# create a user, since we don't want to run as root
|
||||
RUN useradd -m jupyter
|
||||
ENV HOME=/home/jupyter
|
||||
WORKDIR $HOME
|
||||
USER jupyter
|
||||
|
||||
# set the default command
|
||||
CMD ["/opt/jupyter/bin/jupyterhub-singleuser"]
|
||||
|
||||
Reference in New Issue
Block a user