Skip to content
Snippets Groups Projects
Commit 776caaf2 authored by Christof Kaufmann's avatar Christof Kaufmann
Browse files

Update linux installation instructions

- gradio from conda-forge is broken → replace by PyPI
- gymnasium >= 1.0.0 requires now ale-py > 0.10.1 (or so) for Atari
environments
- pyogrio got updated and hopefully fixed
- GPU support for TensorFlow is now installed from PyPI
parent e9498208
Branches
No related tags found
No related merge requests found
No preview for this file type
......@@ -57,7 +57,7 @@
\usepackage[color=blue, author={Christof Kaufmann}]{attachfile2} % load after hyperref to avoid option clash from unicode=true
\title{Installationsanleitung für Python auf Linux}
\date{November 2024}
\date{Februar 2025}
\author{Christof Kaufmann}
% one infinite page, https://tex.stackexchange.com/a/19241/115883
......@@ -124,23 +124,23 @@ Nun sollte die \texttt{base}-Environment aktiviert sein, was Sie auch am Prompt
\section{Conda-Umgebung}
Wir erstellen nun eine Umgebung namens \lstinline|ml| mit Python 3.10 und den benötigten Paketen. Falls Sie eine NVIDIA-GPU haben, ersetzen Sie \lstinline|tensorflow-cpu| durch \lstinline|tensorflow-gpu| und beachten auch die weiteren Hinweise in Abschnitt~\ref{sec:gpu}.
Wir erstellen nun eine Umgebung namens \lstinline|ml| mit Python 3.10 und den benötigten Paketen. Falls Sie eine NVIDIA-GPU haben, entfernen Sie \lstinline|tensorflow-cpu| aus folgendem Kommando und beachten auch die weiteren Hinweise in Abschnitt~\ref{sec:gpu}.
\begin{lstlisting}[gobble=2, basicstyle=\ttfamily\footnotesize]
mamba create -n ml python=3.10 tensorflow-cpu ipympl mypy jupyter pystan \
matplotlib seaborn scikit-learn openpyxl odfpy pyarrow \
geopandas descartes 'pyogrio<0.8.0' optuna plotly tqdm \
jax-jumpy moviepy shimmy-atari gymnasium-box2d spyder \
ipywidgets notebook lxml fastparquet zstandard gradio \
geopandas descartes pyogrio optuna plotly tqdm spyder \
jax-jumpy moviepy shimmy-atari gymnasium-box2d \
ipywidgets notebook lxml fastparquet zstandard \
contextily networkx pyvis netgraph pip
\end{lstlisting}
Sie können die Umgebung jederzeit mit \lstinline|mamba activate ml| aktivieren und mit \lstinline|mamba deactivate| deaktivieren. Generell können Sie auch weitere Umgebungen mit \lstinline|mamba create -n <ENVNAME> <PAKETE>| einrichten und diese mit \lstinline|mamba activate <ENVNAME>| aktivieren.
Installieren Sie nun in der Umgebung \lstinline|ml| noch Pakete, die es (noch) nicht in conda-forge gibt, sondern nur in PyPI (bzw.\ EMNIST auf PyPI ist veraltet und wir verwenden direkt die Version von github). Hierdurch können allerdings Probleme in Ihrer Umgebung entstehen.
Installieren Sie nun in der Umgebung \lstinline|ml| noch Pakete, die es (noch) nicht in conda-forge gibt, sondern nur in PyPI (bzw.\ EMNIST auf PyPI ist veraltet und wir verwenden direkt die Version von github, gradio ist kaputt). Hierdurch können allerdings Probleme in Ihrer Umgebung entstehen.
\begin{lstlisting}[gobble=2, basicstyle=\ttfamily\footnotesize]
#*\color{gray}(base) \color{green!80!black}john \color{gray}\color{blue!90!black!70}\textasciitilde\ \color{gray}\$* mamba activate ml #*\color{cyan}\# \itshape wir wollen in 'ml' installieren*
#*\color{gray}(ml) \color{green!80!black}john \color{gray}\color{blue!90!black!70}\textasciitilde\ \color{gray}\$* pip install git+https://github.com/hosford42/EMNIST.git \
autorom[accept-rom-license]
gradio 'ale-py>0.10.1'
\end{lstlisting}
......@@ -157,12 +157,12 @@ Installieren Sie nun in der Umgebung \lstinline|ml| noch Pakete, die es (noch) n
\end{minipage}
\begin{lstlisting}[gobble=2, basicstyle=\ttfamily\footnotesize]
sudo apt install nvidia-driver #*\color{cyan}\# \itshape Debian, benötigt: contrib non-free*
sudo apt install nvidia-driver-510 #*\color{cyan}\# \itshape Ubuntu*
sudo apt install nvidia-driver-560 #*\color{cyan}\# \itshape Ubuntu*
\end{lstlisting}
Installieren Sie auch \lstinline|ptxas| über das nvidia-Repository um eine Warnmeldung beim Importieren von TensorFlow zu vermeiden:
Installieren Sie auch TensorFlow mit CUDA und Keras3:
\begin{lstlisting}[gobble=2, basicstyle=\ttfamily\footnotesize]
mamba activate ml #*\color{cyan}\# \itshape sicherstellen, dass Sie in der 'ml' Umgebung sind*
mamba install -c nvidia -c conda-forge cuda-nvcc
pip install tensorflow[and-cuda]
\end{lstlisting}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment