conda install updated
This commit is contained in:
parent
081487e0e3
commit
324ab0bf97
|
@ -0,0 +1,11 @@
|
||||||
|
[Unit]
|
||||||
|
Description=JupyterHub
|
||||||
|
After=syslog.target network.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
User=root
|
||||||
|
Environment="PATH=/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/opt/jupyterhub/bin"
|
||||||
|
ExecStart=/opt/jupyterhub/bin/jupyterhub -f /opt/jupyterhub/etc/jupyterhub/jupyterhub_config.py
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
File diff suppressed because it is too large
Load Diff
|
@ -3,6 +3,7 @@
|
||||||
#variant to use conda insted of pip, not tested
|
#variant to use conda insted of pip, not tested
|
||||||
|
|
||||||
#Src: https://medium.com/swlh/how-to-install-jupyterhub-using-conda-without-runing-as-root-and-make-it-a-service-59b843fead12
|
#Src: https://medium.com/swlh/how-to-install-jupyterhub-using-conda-without-runing-as-root-and-make-it-a-service-59b843fead12
|
||||||
|
# https://jupyterhub.readthedocs.io/en/1.2.1/installation-guide-hard.html
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
@ -16,43 +17,80 @@ fi
|
||||||
# libnvinfer-plugin7=7.1.3-1+cuda11.0
|
# libnvinfer-plugin7=7.1.3-1+cuda11.0
|
||||||
|
|
||||||
#add public ssh keys
|
#add public ssh keys
|
||||||
if [ ! -s "~/.ssh/authorized_keys" ]; then
|
#if [ ! -s "~/.ssh/authorized_keys" ]; then
|
||||||
cat id_*.pub >> ~/.ssh/authorized_keys
|
# cat id_*.pub >> ~/.ssh/authorized_keys
|
||||||
fi
|
#fi
|
||||||
|
|
||||||
echo ""
|
#echo ""
|
||||||
echo "Install supermicro system tools..."
|
#echo "Install supermicro system tools..."
|
||||||
apt-get update
|
#apt-get update
|
||||||
apt-get install -y ipmitool && modprobe ipmi_devintf
|
#apt-get install -y ipmitool && modprobe ipmi_devintf
|
||||||
|
|
||||||
|
apt-get install -y language-pack-de
|
||||||
|
|
||||||
|
echo "Install a recent notejs for jupyterhub from nodesource..."
|
||||||
|
#src: https://github.com/nodesource/distributions/blob/master/README.md
|
||||||
|
curl -fsSL https://deb.nodesource.com/setup_current.x | bash -
|
||||||
|
apt-get install -y nodejs npm
|
||||||
|
|
||||||
|
echo "create virtualenv and install JupyterHub..."
|
||||||
|
python3 -m venv /opt/jupyterhub/
|
||||||
|
/opt/jupyterhub/bin/python3 -m pip install wheel
|
||||||
|
/opt/jupyterhub/bin/python3 -m pip install jupyterhub jupyterlab
|
||||||
|
/opt/jupyterhub/bin/python3 -m pip install ipywidgets
|
||||||
|
npm install -g configurable-http-proxy
|
||||||
|
|
||||||
|
echo "setup jupyterhub config..."
|
||||||
|
mkdir -p /opt/jupyterhub/etc/jupyterhub/
|
||||||
|
cp jupyterhub_config_https.py /opt/jupyterhub/etc/jupyterhub/jupyterhub_config.py
|
||||||
|
|
||||||
|
echo "setup systemd service..."
|
||||||
|
mkdir -p /opt/jupyterhub/etc/systemd
|
||||||
|
cp jupyterhub_conda.service /opt/jupyterhub/etc/systemd/jupyterhub.service
|
||||||
|
ln -s /opt/jupyterhub/etc/systemd/jupyterhub.service /etc/systemd/system/jupyterhub.service
|
||||||
|
systemctl daemon-reload
|
||||||
|
systemctl enable jupyterhub.service
|
||||||
|
systemctl start jupyterhub.service
|
||||||
|
|
||||||
|
echo "jupyterhub.service status:"
|
||||||
|
systemctl status jupyterhub.service
|
||||||
|
|
||||||
#echo "Install a recent notejs for jupyterhub from nodesource..."
|
|
||||||
#curl -fsSL https://deb.nodesource.com/setup_current.x | bash -
|
|
||||||
#apt-get install -y nodejs npm
|
|
||||||
|
|
||||||
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
|
||||||
bash /tmp/anaconda3.sh
|
#bash /tmp/anaconda3.sh
|
||||||
|
curl https://repo.anaconda.com/pkgs/misc/gpgkeys/anaconda.asc | gpg --dearmor > conda.gpg
|
||||||
|
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
|
||||||
|
apt-get update
|
||||||
|
apt-get install conda
|
||||||
|
|
||||||
echo "Install JupyterHub..."
|
#symlinking the conda shell setup script to the profile ‘drop in’ folder so that it gets run on login:
|
||||||
apt-get install -y language-pack-de
|
ln -s /opt/conda/etc/profile.d/conda.sh /etc/profile.d/conda.sh
|
||||||
conda install --yes jupyterhub jupyterlab notebook configurable-http-proxy jupyterlab-git jupyter-server-proxy
|
|
||||||
|
mkdir /opt/conda/envs/
|
||||||
|
|
||||||
|
/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)"
|
||||||
|
|
||||||
|
|
||||||
|
#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"
|
||||||
|
|
||||||
|
|
||||||
|
#conda install --yes jupyterhub jupyterlab notebook configurable-http-proxy jupyterlab-git jupyter-server-proxy
|
||||||
#jupyter labextension install jupyter-matplotlib
|
#jupyter labextension install jupyter-matplotlib
|
||||||
|
|
||||||
echo "Setup JupyterHub..."
|
#echo "Install Tensorflow..."
|
||||||
mkdir /etc/jupyterhub/
|
#conda install --yes tensorflow-gpu
|
||||||
cp jupyterhub_config.py /etc/jupyterhub/jupyterhub_config.py
|
|
||||||
cp jupyterhub.service /etc/systemd/system/jupyterhub.service
|
|
||||||
systemctl enable jupyterhub
|
|
||||||
systemctl start jupyterhub
|
|
||||||
|
|
||||||
echo "Install Tensorflow..."
|
#echo "Install cantera..."
|
||||||
conda install --yes tensorflow-gpu
|
#conda install --yes --channel cantera cantera
|
||||||
|
|
||||||
echo "Install cantera..."
|
#echo "Install common Python libs..."
|
||||||
conda install --yes --channel cantera cantera
|
#conda install --yes h5py tqdm pandas ipywidgets pillow matplotlib ipympl opencv-python
|
||||||
|
|
||||||
echo "Install common Python libs..."
|
#Other tools:
|
||||||
conda install --yes h5py tqdm pandas ipywidgets pillow matplotlib ipympl opencv-python
|
|
||||||
|
|
||||||
#System monitoring
|
#System monitoring
|
||||||
#echo "Install netdata..."
|
#echo "Install netdata..."
|
||||||
|
@ -61,19 +99,15 @@ conda install --yes h5py tqdm pandas ipywidgets pillow matplotlib ipympl opencv-
|
||||||
#service netdata restart
|
#service netdata restart
|
||||||
#on http://0.0.0.0:19999
|
#on http://0.0.0.0:19999
|
||||||
|
|
||||||
echo "Install gpuview..."
|
#echo "Install gpuview..."
|
||||||
python3 -m pip install gpuview
|
#python3 -m pip install gpuview
|
||||||
gpuview service --host 127.0.0.1 --port 9988
|
#gpuview service --host 127.0.0.1 --port 9988
|
||||||
|
|
||||||
echo "Disable services that delays startup by wating for network connectivity..."
|
#echo "Disable services that delays startup by wating for network connectivity..."
|
||||||
systemctl disable cloud-config
|
#systemctl disable cloud-config
|
||||||
systemctl disable cloud-final.service
|
#systemctl disable cloud-final.service
|
||||||
systemctl disable iscsid.service
|
#systemctl disable iscsid.service
|
||||||
systemctl disable open-iscsi.service
|
#systemctl disable open-iscsi.service
|
||||||
|
|
||||||
|
|
||||||
echo "show gpu state..."
|
|
||||||
nvidia-smi
|
|
||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
echo "Setup successfully finished"
|
echo "Setup successfully finished"
|
||||||
|
|
Loading…
Reference in New Issue