some fixes for conda variant
This commit is contained in:
parent
662f24a932
commit
cc5980d095
|
@ -1,6 +1,6 @@
|
||||||
c.JupyterHub.bind_url = 'https://:443/'
|
c.JupyterHub.bind_url = 'https://:443/'
|
||||||
|
c.JupyterHub.ssl_cert = '/opt/jupyterhub/etc/jupyterhub/ssl-certs/jhubssl.crt'
|
||||||
|
c.JupyterHub.ssl_key = '/opt/jupyterhub/etc/jupyterhub/ssl-certs/jhubssl.key'
|
||||||
|
|
||||||
|
|
||||||
# Configuration file for jupyterhub.
|
# Configuration file for jupyterhub.
|
||||||
|
|
|
@ -12,6 +12,15 @@ if [ "$EUID" -ne 0 ]
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
CERTIFICATE_HOSTNAME=$1
|
||||||
|
|
||||||
|
if [ -z "$CERTIFICATE_HOSTNAME" ]
|
||||||
|
then
|
||||||
|
echo "Please specify hostname for the certificate generation"
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
#apt-get install -y --no-install-recommends libnvinfer7=7.1.3-1+cuda11.0 \
|
#apt-get install -y --no-install-recommends libnvinfer7=7.1.3-1+cuda11.0 \
|
||||||
# libnvinfer-dev=7.1.3-1+cuda11.0 \
|
# libnvinfer-dev=7.1.3-1+cuda11.0 \
|
||||||
# libnvinfer-plugin7=7.1.3-1+cuda11.0
|
# libnvinfer-plugin7=7.1.3-1+cuda11.0
|
||||||
|
@ -27,9 +36,7 @@ fi
|
||||||
#apt-get install -y ipmitool && modprobe ipmi_devintf
|
#apt-get install -y ipmitool && modprobe ipmi_devintf
|
||||||
|
|
||||||
apt-get update
|
apt-get update
|
||||||
apt-get install -y language-pack-de
|
apt-get install -y language-pack-de python3.10-venv
|
||||||
|
|
||||||
apt-get install python3.10-venv
|
|
||||||
|
|
||||||
echo "Install a recent notejs for jupyterhub from nodesource..."
|
echo "Install a recent notejs for jupyterhub from nodesource..."
|
||||||
#src: https://github.com/nodesource/distributions/blob/master/README.md
|
#src: https://github.com/nodesource/distributions/blob/master/README.md
|
||||||
|
@ -53,11 +60,17 @@ cp jupyterhub_conda.service /opt/jupyterhub/etc/systemd/jupyterhub.service
|
||||||
ln -s /opt/jupyterhub/etc/systemd/jupyterhub.service /etc/systemd/system/jupyterhub.service
|
ln -s /opt/jupyterhub/etc/systemd/jupyterhub.service /etc/systemd/system/jupyterhub.service
|
||||||
systemctl daemon-reload
|
systemctl daemon-reload
|
||||||
systemctl enable jupyterhub.service
|
systemctl enable jupyterhub.service
|
||||||
systemctl start jupyterhub.service
|
|
||||||
|
|
||||||
echo "jupyterhub.service status:"
|
echo "Generate self signed certificate..."
|
||||||
systemctl status jupyterhub.service
|
mkdir -p /opt/jupyterhub/etc/jupyterhub/ssl-certs
|
||||||
|
openssl req -x509 -newkey rsa:4096 -sha256 -days 3650 -nodes \
|
||||||
|
-keyout /opt/jupyterhub/etc/jupyterhub/ssl-certs/jhubssl.key \
|
||||||
|
-out /opt/jupyterhub/etc/jupyterhub/ssl-certs/jhubssl.crt \
|
||||||
|
-subj "/C=DE/ST=NRW/L=na/O=na Systems/OU=Self_Signed/CN=$CERTIFICATE_HOSTNAME" \
|
||||||
|
-addext "subjectAltName=DNS:$CERTIFICATE_HOSTNAME"
|
||||||
|
|
||||||
|
#echo "jupyterhub.service status: (opens vim)"
|
||||||
|
#systemctl status jupyterhub.service
|
||||||
|
|
||||||
echo "Install anaconda..."
|
echo "Install anaconda..."
|
||||||
#wget -O /tmp/anaconda3.sh https://repo.anaconda.com/archive/Anaconda3-2022.05-Linux-x86_64.sh
|
#wget -O /tmp/anaconda3.sh https://repo.anaconda.com/archive/Anaconda3-2022.05-Linux-x86_64.sh
|
||||||
|
@ -66,7 +79,7 @@ curl https://repo.anaconda.com/pkgs/misc/gpgkeys/anaconda.asc | gpg --dearmor >
|
||||||
install -o root -g root -m 644 conda.gpg /etc/apt/trusted.gpg.d/
|
install -o root -g root -m 644 conda.gpg /etc/apt/trusted.gpg.d/
|
||||||
echo "deb [arch=amd64] https://repo.anaconda.com/pkgs/misc/debrepo/conda stable main" | sudo tee /etc/apt/sources.list.d/conda.list
|
echo "deb [arch=amd64] https://repo.anaconda.com/pkgs/misc/debrepo/conda stable main" | sudo tee /etc/apt/sources.list.d/conda.list
|
||||||
apt-get update
|
apt-get update
|
||||||
apt-get install conda
|
apt-get install -y conda
|
||||||
|
|
||||||
#symlinking the conda shell setup script to the profile ‘drop in’ folder so that it gets run on login:
|
#symlinking the conda shell setup script to the profile ‘drop in’ folder so that it gets run on login:
|
||||||
ln -s /opt/conda/etc/profile.d/conda.sh /etc/profile.d/conda.sh
|
ln -s /opt/conda/etc/profile.d/conda.sh /etc/profile.d/conda.sh
|
||||||
|
@ -74,11 +87,12 @@ ln -s /opt/conda/etc/profile.d/conda.sh /etc/profile.d/conda.sh
|
||||||
mkdir /opt/conda/envs/
|
mkdir /opt/conda/envs/
|
||||||
|
|
||||||
/opt/conda/bin/conda create --prefix /opt/conda/envs/python python=3.7 ipykernel
|
/opt/conda/bin/conda create --prefix /opt/conda/envs/python python=3.7 ipykernel
|
||||||
/opt/conda/envs/python/bin/python -m ipykernel install --prefix /usr/local/ --name 'python' --display-name "Python (default)"
|
#/opt/conda/envs/python/bin/python -m ipykernel install --prefix /usr/local/ --name 'python' --display-name "Python (default)"
|
||||||
|
/opt/conda/envs/python/bin/python -m ipykernel install --prefix=/opt/jupyterhub/ --name 'python' --display-name "Python (default)"
|
||||||
|
|
||||||
|
|
||||||
#users have to setup there kernel like this:
|
#users have to setup there kernel like this:
|
||||||
#/path/to/kernel/env/bin/python -m ipykernel install --name 'python-my-env' --display-name "Python My Env"
|
#/opt/conda/envs/python/bin/python -m ipykernel install --name 'python-my-env' --display-name "Python My Env"
|
||||||
|
|
||||||
|
|
||||||
#conda install --yes jupyterhub jupyterlab notebook configurable-http-proxy jupyterlab-git jupyter-server-proxy
|
#conda install --yes jupyterhub jupyterlab notebook configurable-http-proxy jupyterlab-git jupyter-server-proxy
|
||||||
|
@ -112,6 +126,9 @@ mkdir /opt/conda/envs/
|
||||||
#systemctl disable iscsid.service
|
#systemctl disable iscsid.service
|
||||||
#systemctl disable open-iscsi.service
|
#systemctl disable open-iscsi.service
|
||||||
|
|
||||||
|
echo "Start JupyterHub..."
|
||||||
|
systemctl start jupyterhub.service
|
||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
echo "Setup successfully finished"
|
echo "Setup successfully finished"
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue