Notatki z przygotowywania dysku PyDebian dla studentów na zajęcia:
- Topologiczna analiza danych
- Zaawansowane programowanie
- Inżynieria oprogramowania
- Hurtownie danych
Paweł Pilarczyk, styczeń 2021 r.; uaktualnienie: lipiec 2022 r.
Uwagi:
- tensorflow wymaga nowszej wersji pip3 (w Debianie 10 jest wersja 18.1)
- w Debianie 11 nie ma pakietu "python-wxgtk3.0",
więc nie da się uruchomić programu MapperGUI.py
- - - - - - - - - - - - - - - - - - - -
Oracle VM VirtualBox Manager:
- computer type: 32-bit Debian, 3 GB RAM, 4 CPUs
- HDD 8 GB
- Bridged Network Adapter may not work if using Wi-Fi, so it is useful to set up
port forwarding in order to be able to access the guest system through SSH,
e.g. Network / Advanced / Port Forwarding / SSH-TCP-2200-22); for details
see https://www.virtualbox.org/manual/ch06.html#natforward
Installation disk downloaded from www.debian.org: Debian 10.7.0 i386 (32-bit) NetInst ISO
Install / Polski
Nazwa hosta: pydebian
Nazwa domeny: home
hasło roota: stu321
Pełna nazwa użytkownika: Student PG
nazwa użytkownika w systemie: student
hasło: stu123
Partycje: brak przestrzeni wymiany, całość na / [8.6 GB]
Podstawowe składniki środowiska graficznego Debiana
+ XFCE + serwer druku + serwer SSH
Programy / Ustawienia / Ekran: 1280x800
Programy / Ustawienia / Mendżer zasilania / Ekran / Zarządzanie zasilaniem ekranu: Nigdy
su
/sbin/adduser student sudo
apt install mc zip arj unar git
apt remove --purge 'libreoffice*'
apt clean
apt autoremove
sudo apt install g++
sudo apt install printer-driver-cups-pdf
sudo apt install jupyter-notebook python-seaborn python3-seaborn
sudo apt install cython3 cython
sudo apt install cmake libboost-dev
sudo apt install libboost-thread-dev libboost-chrono-dev
sudo apt install python-pip python3-pip
sudo apt install python3-openpyxl python-openpyxl
sudo apt install python-cssselect python3-cssselect python-html5lib python3-html5lib
sudo apt install python-wxtools python-opengl python3-opengl
sudo apt install python3-jupyter-core python-jupyter-core
sudo apt install python3-jupyter-client python-jupyter-client
sudo apt install python3-jupyter-console python-jupyter-console
sudo apt install jupyter spyder spyder3
sudo apt install python-sklearn python3-sklearn
sudo apt install pyqt5-dev
# unattended upgrades:
sudo apt install unattended-upgrades
dpkg-reconfigure unattended-upgrades
# VirtualBox Guest Additions - install linux headers first:
sudo apt install linux-headers-$(uname -r)
# and then follow these instructions:
# https://ubuntu.com/tutorials/how-to-run-ubuntu-desktop-on-a-virtual-machine-using-virtualbox#5-installing-guest-additions
# specifically: Devices / Insert Guest Additions CD Image
cd /media/cdrom
sh autorun.sh
# eject the disk; restart the system
# for GUDHI:
#sudo apt install python3-gudhi
#sudo apt install gudhi-utils libgudhi-dev libgudhi-doc libgudhi-examples
# NOTE: This is an old version (2.3 or something like that),
# so I installed version 3.1.1 of GUDHI instead of this one,
# following the instructions in the file gudhi_install.txt, copied here:
sudo apt install libcgal-dev libtbb-dev libeigen3-dev python3-sklearn
sudo apt install libboost-filesystem-dev libboost-test-dev python3-sphinx
sudo apt install libqt5opengl5-dev libqglviewer-dev-qt5
sudo pip3 install pymanopt autograd POT ipyparallel
#sudo apt install python3-numpy python3-scipy python3-matplotlib python3-pybind11 cython3 python3-pytest
#sudo pip3 install torch pykeops eagerpy nhswlib tensorflow
wget https://github.com/GUDHI/gudhi-devel/releases/download/tags%2Fgudhi-release-3.1.1/gudhi.3.1.1.tar.gz
tar xzf gudhi.3.1.1.tar.gz
cd gudhi.3.1.1
mkdir _build
cd _build
cmake -DOpenGL_GL_PREFERENCE=GLVND -DPython_ADDITIONAL_VERSIONS=3 ..
cd python
python3 setup.py install --prefix /home/student/.local
# (and then delete the .tar.gz file and the build directory to save disk space)
# for examples in TDA tutorials:
wget https://raw.githubusercontent.com/MathieuCarriere/tda-tutorials/master/persistence_statistics.py
wget http://bertrand.michel.perso.math.cnrs.fr/Enseignements/TDA/persistence_graphical_tools_Bertrand.py
mv persistence_statistics.py /home/student/.local/lib/python3.7/site-packages/
mv persistence_graphical_tools_Bertrand.py /home/student/.local/lib/python3.7/site-packages
# for CHomP:
# download chomp-full.zip, then: mkdir chomp; cd chomp; unzip ~/Pobrane/chomp-full; make target=unx
# add at the end of .bashrc: export PATH=$HOME/bin:$HOME/.local/bin:$HOME/chomp/bin:$PATH
# for Dionysus2
sudo pip install --verbose dionysus
sudo pip3 install --verbose dionysus
# for Ripser
sudo pip install --verbose ripser
sudo pip3 install --verbose ripser
# for Mapper:
sudo apt install graphviz
sudo pip3 install fastcluster
sudo pip3 install mapper
sudo pip3 install cmappertools
sudo pip install fastcluster
sudo pip install mapper
sudo pip install cmappertools
# for MapperGUI.py
sudo apt install python-wxgtk3.0 python-opengl
# for Kepler Mapper
sudo apt install python3-networkx python-networkx
# create the folder "programy" (and then open it at the desktop)
mkdir /home/student/Pulpit/programy"
# (afterwards, copy two sample programs to that folder)
# for PHAT
sudo apt install pybind11-dev python-pybind11 python3-pybind11 libomp-dev
sudo pip3 install --verbose phat
sudo pip install --verbose phat
# scikit-tda 1.0.0 (this package didn't install with pip from python2)
sudo pip3 install scikit-tda
# Note about the error messages "[drm:vmw_host_log [vmwgfx]] *ERROR* Failed to send host log message."
# This is a bug in a certain Linux kernel module. See: https://www.virtualbox.org/ticket/19168
# for CAPD and cmgraphs (may be useful in the future):
sudo apt install mc g++ pkg-config graphviz cmake doxygen time
sudo apt install libpng-dev zlib1g-dev liblapack-dev libboost-dev libbz2-dev
sudo apt install apache2 php libapache2-mod-php
# before compressing the VDI file:
sudo apt clean
sudo cat /dev/zero > zero
sudo rm zero