2049 lines
57 KiB
TeX
2049 lines
57 KiB
TeX
\documentclass[aspectratio=169,ignorenonframetext,presentation]{beamer}
|
||
|
||
%
|
||
% Header
|
||
%
|
||
|
||
\usepackage[utf8]{inputenc}
|
||
\usepackage[T1]{fontenc}
|
||
\usepackage{graphicx}
|
||
\usepackage{longtable}
|
||
\usepackage{wrapfig}
|
||
\usepackage{rotating}
|
||
\usepackage[normalem]{ulem}
|
||
\usepackage{amsmath}
|
||
\usepackage{amssymb}
|
||
\usepackage{capt-of}
|
||
\usepackage{hyperref}
|
||
\usepackage[french]{babel}
|
||
\usepackage{fancyvrb}
|
||
|
||
\usepackage{tikz}
|
||
\usetikzlibrary{decorations.pathreplacing, positioning, arrows.meta}
|
||
|
||
\newcommand{\tikzmark}[2]{%
|
||
\tikz[remember picture,baseline=(#1.base)]%
|
||
{\node[inner sep=0pt] (#1) {#2 \quad};}}
|
||
|
||
\newcommand{\tikzbrace}[3]{%
|
||
\begin{tikzpicture}[remember picture,overlay]
|
||
\draw[decorate,decoration={brace}] (#1.north east) -- node[right]
|
||
{ % XXXX: hfill
|
||
#3}
|
||
(#1.north east |- #2.south east);
|
||
\end{tikzpicture}}
|
||
|
||
|
||
\usetheme{Madrid}
|
||
\useoutertheme[subsection=true]{smoothbars}
|
||
|
||
\makeatletter
|
||
\usecolortheme{whale}
|
||
\usecolortheme{orchid}
|
||
\setbeamerfont{block title}{size={}}
|
||
\setbeamertemplate{navigation symbols}{}
|
||
\setbeamertemplate{itemize items}[triangle]
|
||
\makeatletter
|
||
\setbeamertemplate{footline}
|
||
{
|
||
\leavevmode%
|
||
\hbox{%
|
||
\begin{beamercolorbox}[wd=.15\paperwidth,ht=2.25ex,dp=1ex,left]{author in head/foot}%
|
||
\usebeamerfont{author in head/foot}\quad S. Tournier
|
||
\end{beamercolorbox}%
|
||
\begin{beamercolorbox}[wd=.7\paperwidth,ht=2.25ex,dp=1ex,center]{title in head/foot}%
|
||
\usebeamerfont{title in head/foot}\insertshorttitle
|
||
\end{beamercolorbox}%
|
||
\begin{beamercolorbox}[wd=.15\paperwidth,ht=2.25ex,dp=1ex,right]{date in head/foot}%
|
||
\insertframenumber{} / \inserttotalframenumber\hspace*{2ex}
|
||
\end{beamercolorbox}}%
|
||
\vskip0pt%
|
||
}
|
||
\makeatother
|
||
|
||
\title[Reproductibilité, solution avec Guix]%
|
||
{Reproductibilité des environnements logiciels \\ une solution avec GNU Guix ?}
|
||
\author{Simon Tournier}
|
||
\date{Ateliers FCC, 21 juin 2022}
|
||
\institute{Inserm US53 - UAR CNRS 2030 \\ \texttt{simon.tournier@u-paris.fr}}
|
||
\hypersetup{
|
||
pdfauthor={Simon Tournier},
|
||
pdftitle={Reproductibilité des environnements logiciels, une solution avec GNU Guix ?},
|
||
pdfkeywords={GNU Guix, reproductibilité, déploiement logiciels, gestionnaire de paquets, machine virtuelle},
|
||
pdfsubject={GNU Guix},
|
||
pdfcreator={with love},
|
||
pdflang={French}}
|
||
|
||
|
||
\newcommand{\violet}{\textcolor{violet}}
|
||
\newcommand{\blue}{\textcolor{blue}}
|
||
\newcommand{\red}{\textcolor{red}}
|
||
\newcommand{\magenta}{\textcolor{magenta}}
|
||
\newcommand{\cyan}{\textcolor{cyan}}
|
||
\newcommand{\green}{\textcolor{green}}
|
||
\definecolor{mauve}{rgb}{0.58,0,0.82}
|
||
\newcommand{\mauve}{\textcolor{mauve}}
|
||
|
||
\input{listings-scheme}
|
||
|
||
\newcommand{\someguile}{\textcolor{someguile}}
|
||
\newcommand{\somestring}{\textcolor{somestring}}
|
||
\newcommand{\somevariable}{\textcolor{somevariable}}
|
||
|
||
\newcommand{\thisslide}[1]{%
|
||
\begin{figure}[!htb]
|
||
\begin{center}
|
||
\includeslide[width=\textwidth]{#1}
|
||
\end{center}
|
||
\end{figure}
|
||
}
|
||
|
||
\newcommand{\smiley}[1]{${\textsf{#1~}}^{\textrm{:-)}}$}
|
||
|
||
\newcommand{\hrefsf}[2]{\href{#1}{\textsf{#2}}}
|
||
|
||
|
||
%
|
||
% Document
|
||
%
|
||
\begin{document}
|
||
|
||
\begin{frame}[plain, fragile, noframenumbering]{}
|
||
\vspace{5mm}
|
||
\titlepage
|
||
|
||
\vfill{}
|
||
\vspace{-12mm}
|
||
\begin{center}
|
||
\includegraphics[width=0.2\paperwidth]{static/Guix-white}
|
||
|
||
\vspace{-10mm}
|
||
\href{https://hpc.guix.info}{\texttt{https://hpc.guix.info}}
|
||
\end{center}
|
||
\vfill{}
|
||
\normalsize
|
||
\begin{minipage}{0.2\paperwidth}
|
||
\vspace{-7mm}
|
||
%\includegraphics[width=0.2\paperwidth]{static/LOGO-JRES-2022}
|
||
\end{minipage}
|
||
\begin{flushright}
|
||
\begin{minipage}{0.2\paperwidth}
|
||
\vspace{-20mm}
|
||
\includegraphics[width=0.2\paperwidth]{static/u-paris}
|
||
\end{minipage}
|
||
\end{flushright}
|
||
\end{frame}
|
||
|
||
|
||
|
||
\thisslide{why}
|
||
\begin{frame}<presentation>[label=why, fragile, plain, noframenumbering]{Pourquoi j'en suis venu à GNU Guix}
|
||
\begin{alertblock}{\(\approx\) 2010 \textbf{Thésard}}
|
||
Développement d'1-2 outils utilisant un gestionnaire de paquets
|
||
\uline{classique}
|
||
|
||
\hfill (Simulation numérique \texttt{C} et \texttt{Fortran} avec Debian / Ubuntu /
|
||
\texttt{apt})
|
||
\end{alertblock}
|
||
|
||
\begin{exampleblock}{\(\approx\) 2014 \textbf{Post-doc}}
|
||
Développement de 2-3 outils utilisant un gestionnaire de paquets sans
|
||
droit administrateur
|
||
|
||
\hfill (Simulation numérique \texttt{Python} et \texttt{C++} avec \texttt{conda})
|
||
\end{exampleblock}
|
||
|
||
\begin{block}{2016 \textbf{Ingénieur. de Recherche}}
|
||
\begin{itemize}
|
||
\item Administration d'un \emph{cluster} (\texttt{modulefiles})
|
||
\item Utilisation de 10+ outils pour un même projet
|
||
\end{itemize}
|
||
|
||
\hfill (Analyse «~bioinformatique~»)
|
||
\end{block}
|
||
|
||
\begin{center}
|
||
\textbf{Question : \alert{pourquoi cela fonctionne-t-il pour Alice et pas pour Bob ? Et vice-versa.}}
|
||
\end{center}
|
||
\end{frame}
|
||
|
||
|
||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||
|
||
|
||
%
|
||
% Intro
|
||
%
|
||
\section{Introduction}
|
||
|
||
|
||
|
||
\begin{frame}[fragile]{Le monde est \emph{open}, n'est-ce pas ?}
|
||
|
||
\begin{itemize}
|
||
\item \emph{open} journal
|
||
\item \emph{open} data
|
||
\item \emph{open} source
|
||
\item \emph{open} science
|
||
\item \emph{open} etc.
|
||
\end{itemize}
|
||
|
||
\begin{exampleblock}{}
|
||
\begin{center}
|
||
Quel est le problème de reproductibilité dans un contexte scientifique ?
|
||
|
||
(même si tout devient \emph{open})
|
||
\end{center}
|
||
\end{exampleblock}
|
||
|
||
\begin{center}
|
||
« ordinateur » : traitement automatique de données
|
||
\uncover<2->{
|
||
$\Longrightarrow$ \red{environnement computationnel}
|
||
}
|
||
\end{center}
|
||
|
||
\uncover<2->{
|
||
\begin{alertblock}{}
|
||
\begin{center}
|
||
Quel contrôle de l’{environnement computationnel} ?
|
||
\end{center}
|
||
\end{alertblock}
|
||
}
|
||
|
||
\end{frame}
|
||
|
||
|
||
|
||
\begin{frame}[fragile]{Exemple d’un calcul}
|
||
\begin{lstlisting}[language=C, caption={Fonction $J_0$ de Bessel}, captionpos=t]{Name=open-source}
|
||
#include <stdio.h>
|
||
#include <math.h>
|
||
|
||
int main(){
|
||
printf("%E\n", j0f(0x1.33d152p+1f));
|
||
}
|
||
\end{lstlisting}
|
||
|
||
\begin{center}
|
||
\begin{tabular}{lcl}
|
||
Alice &voit :& 5.\blue{64}34\blue{4}0E-08 % #no ptions
|
||
\\
|
||
Carole &voit :& 5.\red{96}34\red{3}0E-08 % -lm -fno-builtin
|
||
\end{tabular}
|
||
\end{center}
|
||
|
||
\begin{alertblock}{}
|
||
\begin{center}
|
||
Pourquoi ? Le code est disponible pourtant.
|
||
\end{center}
|
||
\end{alertblock}
|
||
|
||
\small{%
|
||
Établir si le différence est significative ou non est laissé à l'expertise
|
||
des scientifiques du domaine.
|
||
}
|
||
\end{frame}
|
||
|
||
|
||
|
||
\begin{frame}[fragile]{Quelques questions sur ce calcul}
|
||
\begin{lstlisting}[basicstyle=\tiny, language=C]{Name=open-source}
|
||
#include <stdio.h>
|
||
#include <math.h>
|
||
|
||
int main(){
|
||
printf("%E\n", j0f(0x1.33d152p+1f));
|
||
}
|
||
\end{lstlisting}
|
||
|
||
\begin{center}
|
||
\begin{tabular}{lcl}
|
||
Alice &voit :& 5.\blue{64}34\blue{4}0E-08 % #no options
|
||
\\
|
||
Carole &voit :& 5.\red{96}34\red{3}0E-08 % -lm -fno-builtin
|
||
\end{tabular}
|
||
\end{center}
|
||
|
||
\begin{exampleblock}{}
|
||
\begin{itemize}
|
||
\item Quel compilateur ?
|
||
\item Quelles bibliothèques (\texttt{<math.h>}) ?
|
||
\item Quelles versions ?
|
||
\item Quelles options de compilation ?
|
||
\end{itemize}
|
||
\end{exampleblock}
|
||
\end{frame}
|
||
|
||
|
||
\begin{frame}[fragile,label=p4]{En d’autres termes}
|
||
\begin{itemize}
|
||
\item Quelles sont les sources des outils ?
|
||
\item Quelles sont les outils requis pour la construction ?
|
||
\item Quelles sont les outils requis pour l’exécution ?
|
||
\item Comment chaque outil est-il produit ?
|
||
\end{itemize}
|
||
|
||
\begin{exampleblock}{}
|
||
\begin{center}
|
||
Répondre à ces questions signifie \textbf{contrôler la variabilité} de
|
||
l’environnement computationnel
|
||
\end{center}
|
||
\end{exampleblock}
|
||
|
||
\vfill
|
||
|
||
\begin{alertblock}{}
|
||
\begin{center}
|
||
Comment capturer ces informations ?
|
||
\end{center}
|
||
\end{alertblock}
|
||
(Réponse usuelle :Gestionnaire de paquets (Conda, APT, Brew, \dots) ;
|
||
\emph{Modulefiles} ; Conteneur ; etc.)
|
||
\end{frame}
|
||
|
||
|
||
|
||
\begin{frame}[fragile]{Options de constructions (compilation)}
|
||
\begin{lstlisting}[basicstyle=\tiny, language=C]{Name=open-source}
|
||
#include <stdio.h>
|
||
#include <math.h>
|
||
|
||
int main(){
|
||
printf("%E\n", j0f(0x1.33d152p+1f));
|
||
}
|
||
\end{lstlisting}
|
||
|
||
\vfill
|
||
|
||
\begin{exampleblock}{}
|
||
\begin{center}
|
||
\begin{tabular}{rlll}
|
||
\blue{\texttt{alice@laptop\$}} & \texttt{gcc bessel.c}
|
||
&& \texttt{\&\& ./a.out}
|
||
\\
|
||
& \texttt{5.643440E-08}
|
||
\\
|
||
\red{\texttt{carole@desktop\$}} & \texttt{gcc bessel.c}
|
||
& \texttt{\mauve{-lm -fno-builtin}}
|
||
& \texttt{\&\& ./a.out}
|
||
\\
|
||
& \texttt{5.963430E-08}
|
||
\end{tabular}
|
||
\end{center}
|
||
\end{exampleblock}
|
||
|
||
\begin{flushright}
|
||
\small{(Ah, sacré \emph{constant folding})}
|
||
\end{flushright}
|
||
|
||
\begin{alertblock}{}
|
||
\begin{center}
|
||
Alice et Carole ont fait leur calcul dans deux environnements
|
||
computationnels différents
|
||
\end{center}
|
||
\end{alertblock}
|
||
|
||
\end{frame}
|
||
|
||
|
||
|
||
\begin{frame}[fragile]{Enjeu de la reproductibilité en recherche
|
||
\hfill
|
||
\small{\emph{analyse post-mortem du bétail}}}
|
||
\begin{exampleblock}{D'un point de vue la « méthode scientifique » :}
|
||
\begin{center}
|
||
{Tout l'enjeu est le \uline{\textbf{contrôle de la variabilité}}}
|
||
\end{center}
|
||
\end{exampleblock}
|
||
|
||
\vfill
|
||
|
||
\begin{exampleblock}{D'un point de vue du « savoir scientifique » (caractère
|
||
universel) :}
|
||
\begin{itemize}
|
||
\item Un observateur indépendant doit être capable d'observer le même
|
||
résultat.
|
||
\item L'observation doit être pérenne (dans une certaine mesure).
|
||
\end{itemize}
|
||
\end{exampleblock}
|
||
|
||
\vfill
|
||
|
||
\begin{alertblock}{}
|
||
Dans un monde où (presque) tout est donnée numérique (\emph{data}),
|
||
\begin{center}
|
||
\textbf{comment refaire plus tard et là-bas ce qui a été fait aujourd’hui et ici ?}
|
||
\end{center}
|
||
\begin{flushright}
|
||
(sous entendu avec un « ordinateur »)
|
||
\end{flushright}
|
||
\end{alertblock}
|
||
\end{frame}
|
||
|
||
|
||
|
||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||
|
||
\begin{frame}<presentation>[plain, noframenumbering]{Ce que nous allons aborder}
|
||
\begin{center}
|
||
\begin{minipage}{0.7\textwidth}
|
||
\begin{itemize}
|
||
\item Comment refaire demain là-bas ce que l'on a fait hier ici ?
|
||
\item Quelle granularité sur la transparence ?
|
||
\end{itemize}
|
||
\end{minipage}
|
||
\end{center}
|
||
|
||
\setcounter{tocdepth}{2}
|
||
\tableofcontents
|
||
\end{frame}
|
||
|
||
|
||
\subsection{Pourquoi seriez-vous intéressé par Guix ?}
|
||
|
||
|
||
\thisslide{start}
|
||
\begin{frame}<presentation>[label=start, fragile]{Pour fixer les idées}
|
||
\begin{tabular}{rl}
|
||
\rule[-0.3cm]{0cm}{0.3cm} Logiciel
|
||
& code source ou programme \emph{binaire} associé
|
||
\\
|
||
\rule[-0.3cm]{0cm}{0.3cm} Paquet
|
||
& recette pour configurer, construire, installer un logiciel
|
||
\\
|
||
\rule[-0.3cm]{0cm}{0.3cm} Dépendance
|
||
& autre paquet nécessaire
|
||
\\
|
||
\rule[-0.6cm]{0cm}{0.6cm} Gestionnaire de paquets
|
||
&
|
||
\begin{minipage}{0.6\linewidth}
|
||
automatisation du processus traitant la
|
||
recette du paquet (et ses dépendances)
|
||
\end{minipage}
|
||
\\
|
||
Environnement computationnel
|
||
&
|
||
\begin{minipage}{0.6\linewidth}
|
||
pile de tous les logiciels nécessaires
|
||
pour la configuration, construction et
|
||
installation d'une collection de logiciels
|
||
\end{minipage}
|
||
\end{tabular}
|
||
|
||
\begin{exampleblock}{}
|
||
\begin{center}
|
||
Comment Alice et ses collaborateurs peuvent-ils obtenir le même environnement \\
|
||
pour \emph{calculer} avec Python et Numpy ?
|
||
\end{center}
|
||
\end{exampleblock}
|
||
|
||
\begin{alertblock}{}
|
||
\begin{center}
|
||
Prés. avec un biais issu d’un environnement plus «~scientifique~» et moins «~ASR~»
|
||
|
||
\textbf{\uline{mais} \red{Guix s’adapte à tous les cas d’usage}}
|
||
\scriptsize{(ou presque)}
|
||
\end{center}
|
||
\end{alertblock}
|
||
\end{frame}
|
||
|
||
|
||
|
||
\thisslide{scenarii}
|
||
\begin{frame}<presentation>[label=scenarii, fragile]{Scenarii}
|
||
\begin{itemize}
|
||
\item Alice utilise \texttt{python@3.9} et \texttt{numpy@1.20.3}
|
||
\vspace{-0.25cm}
|
||
\begin{center}
|
||
\begin{minipage}{0.75\linewidth}
|
||
\begin{exampleblock}{}
|
||
\begin{verbatim}
|
||
$ sudo apt install python python-numpy
|
||
\end{verbatim}
|
||
\end{exampleblock}
|
||
\end{minipage}
|
||
\end{center}
|
||
\item Carole \textbf{collabore} avec Alice\ldots{}
|
||
mais utilise \texttt{python3.8} et \texttt{numpy@1.16.5} pour un autre
|
||
projet
|
||
\vspace{-0.6cm}
|
||
\begin{center}
|
||
\begin{minipage}{0.75\linewidth}
|
||
\begin{exampleblock}{}
|
||
\begin{verbatim}
|
||
$ apt-cache madison python-numpy
|
||
python-numpy | 1:1.16.5-2ubuntu7 | ...
|
||
\end{verbatim}
|
||
\end{exampleblock}
|
||
\end{minipage}
|
||
\end{center}
|
||
\item Charlie \textbf{mets à jour} son système et \textbf{tout est cassé}
|
||
\vspace{-0.25cm}
|
||
\begin{center}
|
||
\begin{minipage}{0.75\linewidth}
|
||
\begin{exampleblock}{}
|
||
\begin{verbatim}
|
||
$ sudo apt upgrade
|
||
The following packages have unmet dependencies:
|
||
E: Broken packages
|
||
\end{verbatim}
|
||
\end{exampleblock}
|
||
\end{minipage}
|
||
\end{center}
|
||
\item Bob utilise les \textbf{\alert{mêmes} versions} qu'Alice mais n'a
|
||
\textbf{pas le \alert{même} résultat}
|
||
\item Dan essaie de \textbf{rejouer plus tard} le scénario d'Alice
|
||
mais rencontre l'\alert{enfer des dépendances}
|
||
\begin{center}
|
||
\begin{minipage}{0.75\linewidth}
|
||
\href{http://repeatability.cs.arizona.edu}%
|
||
{Repeatability in Computer Science (lien)}
|
||
\end{minipage}
|
||
\end{center}
|
||
\end{itemize}
|
||
\end{frame}
|
||
|
||
|
||
|
||
\thisslide{solutions}
|
||
\begin{frame}<presentation>[label=solutions, fragile]{Solution(s)}
|
||
\begin{enumerate}
|
||
\item gestionnaire de paquets : APT (Debian/Ubuntu), YUM (RedHat), etc.
|
||
\item gestionnaire d'environnements : Modulefiles, Conda, etc.
|
||
\item conteneur : Docker, Singularity
|
||
\end{enumerate}
|
||
|
||
\begin{alertblock}{}
|
||
\begin{center}
|
||
Guix = \#1 + \#2 + \#3
|
||
\end{center}
|
||
\end{alertblock}
|
||
|
||
\begin{description}
|
||
\item[APT, Yum] Difficile de faire coexister plusieurs versions ou
|
||
revenir en arrière ?
|
||
\item[Modulefiles] Comment sont-ils maintenus ? (qui les utilise sur son
|
||
\emph{laptop} ?)
|
||
\item[Conda] Quelle granularité sur la transparence ? (qui sait comment a
|
||
été produit PyTorch dans \texttt{pip install torch} ?
|
||
\href{http://hpc.guix.info/blog/2021/09/whats-in-a-package/}%
|
||
{\scriptsize{(lien)}})
|
||
\item[Docker] Dockerfile basé sur APT, YUM etc.
|
||
\begin{minipage}{1.0\linewidth}
|
||
\begin{exampleblock}{}
|
||
\begin{verbatim}
|
||
RUN apt-get update && apt-get install
|
||
\end{verbatim}
|
||
\end{exampleblock}
|
||
\end{minipage}
|
||
\end{description}
|
||
\end{frame}
|
||
|
||
|
||
|
||
\thisslide{steroide}
|
||
\begin{frame}<presentation>[label=steroide]{Guix est gestionnaire
|
||
d’environnements sous \emph{stéroïde}}
|
||
\begin{tabular}{lr}
|
||
un \uline{\textbf{gestionnaire de paquets}}
|
||
& (comme APT, Yum, etc.)
|
||
\\
|
||
\ \ transactionnel et déclaratif
|
||
& (revenir en arrière, versions concurrentes)
|
||
\\
|
||
\ \ \ \ qui produit des \uline{\textbf{\emph{packs} distribuables}}
|
||
& (conteneur Docker ou Singularity)
|
||
\\
|
||
\ \ \ \ \ \ qui génèrent des \textbf{\uline{\emph{machines virtuelles}} isolées}
|
||
& (\emph{à la} Ansible ou Packer)
|
||
\\
|
||
\ \ \ \ \ \ \ \ sur lequel on construit une distribution Linux
|
||
& (nous n'en parlerons pas)
|
||
\\
|
||
\ \ \ \ \ \ \ \ \ \ \dots et aussi une bibliothèque Scheme\dots
|
||
& (nous n'en parlerons pas, non plus)
|
||
\end{tabular}
|
||
|
||
\begin{alertblock}{}
|
||
Cette petite présentation est un rapide coup de projecteur sur :
|
||
\begin{center}
|
||
la gestion de paquets \emph{fonctionnelle}
|
||
\quad \quad
|
||
$\Rightarrow$ reproductibilité
|
||
\end{center}
|
||
\begin{center}
|
||
\textbf{\alert{Ce que nous présentons fonctionne sur n'importe quelle
|
||
distribution Linux}}
|
||
\end{center}
|
||
\end{alertblock}
|
||
\begin{flushright}
|
||
\small{%
|
||
(Facile à essayer\dots)
|
||
}
|
||
\end{flushright}
|
||
\end{frame}
|
||
|
||
|
||
|
||
\begin{frame}<presentation>[fragile]{\emph{distro externe}}
|
||
\begin{alertblock}{}
|
||
\begin{center}
|
||
Guix s’installe sur \textbf{\uline{n’importe quelle distribution}} Linux récente.
|
||
\end{center}
|
||
\end{alertblock}
|
||
Il faut les droits administrateur (\texttt{root}) pour l’installation.
|
||
|
||
\begin{exampleblock}{}
|
||
\begin{verbatim}
|
||
$ cd /tmp
|
||
$ wget https://git.savannah.gnu.org/cgit/guix.git/plain/etc/guix-install.sh
|
||
$ chmod +x guix-install.sh
|
||
$ sudo ./guix-install.sh
|
||
\end{verbatim}
|
||
\end{exampleblock}
|
||
|
||
\begin{center}
|
||
(Quelques réglages supplémentaires, voir le manuel)
|
||
\end{center}
|
||
|
||
Pour commencer :
|
||
\begin{center}
|
||
\begin{minipage}{0.75\linewidth}
|
||
\begin{verbatim}
|
||
$ guix help
|
||
\end{verbatim}
|
||
\end{minipage}
|
||
\end{center}
|
||
\end{frame}
|
||
|
||
|
||
|
||
\begin{frame}<presentation>[plain,fragile,noframenumbering]{}
|
||
|
||
\vfill{}
|
||
\begin{center}
|
||
\textbf{Comment faire la gestion de paquets ?}
|
||
\end{center}
|
||
|
||
\vfill{}
|
||
\begin{flushright}
|
||
(Exemple : Alice sans privilège particulier)
|
||
\end{flushright}
|
||
|
||
\vfill{}
|
||
\begin{minipage}{0.57\linewidth}
|
||
\begin{alertblock}{}
|
||
\begin{itemize}
|
||
\item Démos avec des outils du «~\emph{monde scientifique}~»
|
||
\item Guix représente 20k+ paquets
|
||
\scriptsize{(constante progression)}\normalsize{}
|
||
\item Cela serait identique pour d'autres outils\\
|
||
\hfill{} comme Nginx, LDAP, SSH, etc.
|
||
\end{itemize}
|
||
\end{alertblock}
|
||
\end{minipage}
|
||
\end{frame}
|
||
|
||
|
||
|
||
\section{Gestion de paquets}
|
||
\subsection*{Utilisation de \texttt{guix package}}
|
||
|
||
|
||
\begin{frame}<presentation>[fragile]{Commandes basiques}
|
||
\begin{center}
|
||
Exemple : outils scientifiques classiques en Python
|
||
\end{center}
|
||
|
||
\bigskip
|
||
|
||
\begin{center}
|
||
(\texttt{demo/getting-started})
|
||
\end{center}
|
||
|
||
\vfill
|
||
\href{https://replay.jres.org/w/3TuYmocHwKtzs7q1VtL1GB}{(voir vidéo JRES)}
|
||
|
||
\end{frame}
|
||
|
||
|
||
|
||
\thisslide{cli-basic}
|
||
\begin{frame}<presentation>[label=cli-basic, fragile]{Commandes basiques : Résumé}
|
||
\begin{exampleblock}{}
|
||
\begin{verbatim}
|
||
guix search dynamically-typed programming language # 1.
|
||
guix show python # 2.
|
||
guix install python # 3.
|
||
guix install python-ipython python-numpy # 4.
|
||
guix remove python-ipython # 5.
|
||
guix install python-matplotlib python-scipy # 6.
|
||
\end{verbatim}
|
||
\end{exampleblock}
|
||
|
||
\begin{center}
|
||
alias de \texttt{guix package}, p. ex. \verb+guix package --install+
|
||
\end{center}
|
||
|
||
\begin{alertblock}{Transactionnel}
|
||
\begin{verbatim}
|
||
guix package --install python # 3.
|
||
guix package --install python-ipython python-numpy # 4.
|
||
guix package -r python-ipython -i python-matplotlib python-scipy # 5. & 6.
|
||
\end{verbatim}
|
||
\end{alertblock}
|
||
\end{frame}
|
||
|
||
|
||
|
||
\thisslide{pkg-man}
|
||
\begin{frame}<presentation>[label=pkg-man]{Guix, un gestionnaire de paquets comme les autres ?}
|
||
\begin{alertblock}{}
|
||
\begin{itemize}
|
||
\item Interface \emph{ligne de commande} comme les autres gestionnaires de
|
||
paquets
|
||
\item Installation/suppression sans privilège particulier
|
||
\item Transactionnel (= pas d'état «~\emph{cassé}~»)
|
||
\item \emph{Substituts} binaires (téléchargement d'éléments pré-construits)
|
||
\end{itemize}
|
||
\end{alertblock}
|
||
\begin{center}
|
||
\textbf{Trois fonctionnalités puissantes :}
|
||
\end{center}
|
||
|
||
\begin{exampleblock}{}
|
||
\begin{itemize}
|
||
\item Les \emph{profils} et leur composition
|
||
\item Gestion déclarative
|
||
\item Environnement isolé à la volée
|
||
\end{itemize}
|
||
\end{exampleblock}
|
||
\end{frame}
|
||
|
||
|
||
\subsection*{Gestion de \emph{profil}}
|
||
\label{sec:profil}
|
||
|
||
|
||
\thisslide{profil-default}
|
||
\begin{frame}<presentation>[label=profil-default, fragile]{Le \emph{profil} par défaut}
|
||
Les commandes d’installation précédentes finissent avec le conseil :
|
||
\begin{exampleblock}{}
|
||
\begin{verbatim}
|
||
hint: Consider setting the necessary environment variables by running:
|
||
|
||
GUIX_PROFILE="/home/alice/.guix-profile"
|
||
. "$GUIX_PROFILE/etc/profile"
|
||
|
||
Alternately, see `guix package --search-paths -p "$HOME/.guix-profile"'.
|
||
\end{verbatim}
|
||
\end{exampleblock}
|
||
|
||
\begin{alertblock}{}
|
||
\begin{center}
|
||
\texttt{\$HOME/.guix-profile} est le \emph{profil} par défaut
|
||
\end{center}
|
||
\end{alertblock}
|
||
\end{frame}
|
||
|
||
|
||
|
||
\thisslide{profil}
|
||
\begin{frame}<presentation>[label=profil, fragile]{Mais qu'est-ce un \emph{profil} ?}
|
||
\begin{center}
|
||
Filesystem Hierarchy Standard (FHS) = norme de la hiérarchie des systèmes
|
||
de fichiers
|
||
|
||
\medskip
|
||
|
||
(définit l'arborescence et contenu des répertoires systèmes pour les systèmes Unix)
|
||
\end{center}
|
||
|
||
\begin{exampleblock}{}
|
||
\begin{Verbatim}
|
||
usr
|
||
|-- bin Binaires exécutables
|
||
|-- etc Fichiers de configuration
|
||
|-- include Entêtes des bibliothèques partagées
|
||
|-- lib Bibliothèques partagées
|
||
|-- share Documentation entre autres
|
||
\end{Verbatim}
|
||
\end{exampleblock}
|
||
|
||
\begin{center} % XXXX: demo ?
|
||
\verb+ls $HOME/.guix-profile+
|
||
\end{center}
|
||
|
||
\begin{alertblock}{}
|
||
\begin{center}
|
||
Un \emph{profil} est un répertoire contenant les paquets installés
|
||
\end{center}
|
||
\end{alertblock}
|
||
\end{frame}
|
||
|
||
|
||
|
||
\thisslide{profil2}
|
||
\begin{frame}<presentation>[label=profil2, fragile]{Exemples de fonctionnalités des \emph{profils}}
|
||
|
||
\begin{alertblock}{}
|
||
\begin{itemize}
|
||
\item Historique des paquets installés / supprimés (\verb+--list-generations+)
|
||
\item Retour en arrière (\verb+--roll-back+ or \verb+--switch-generations+)
|
||
\end{itemize}
|
||
\end{alertblock}
|
||
|
||
\begin{center}
|
||
(\texttt{demo/generations})
|
||
\end{center}
|
||
|
||
\begin{alertblock}{}
|
||
\begin{itemize}
|
||
\item Profils indépendants
|
||
\item Contrôle fin des variables d'environnement (\verb+--search-paths+)
|
||
\item Composition
|
||
\end{itemize}
|
||
\end{alertblock}
|
||
|
||
\begin{center}
|
||
(\texttt{demo/multi-profiles})
|
||
\end{center}
|
||
\end{frame}
|
||
|
||
|
||
|
||
\thisslide{profil3}
|
||
\begin{frame}<presentation>[label=profil3, fragile]{\emph{Profil}, en résumé}
|
||
Les paquets sont installés dans un \emph{profil} qui est :
|
||
$\left. \text{\parbox{0.55\linewidth}{
|
||
\begin{itemize}
|
||
\item un lien symbolique,
|
||
\item pointant vers un élément du dépôt (\emph{store}),
|
||
\end{itemize}
|
||
}} \only<1|article:1>{\right.}\only<2-|article:0>{\right\}} $
|
||
\only<2-|article:0>{%
|
||
\hfill
|
||
\begin{minipage}{0.3\linewidth}
|
||
\begin{alertblock}{Dépôt (\emph{store})}
|
||
\begin{itemize}
|
||
\item Monté à \texttt{/gnu/store}
|
||
\item Dédupliqué
|
||
\end{itemize}
|
||
\end{alertblock}
|
||
\end{minipage}
|
||
}
|
||
$\left. \text{\parbox{1.0\linewidth}{
|
||
\begin{itemize}
|
||
\item et les éléments ont une structure hiérarchique type FHS (comme \texttt{/usr/}).
|
||
\end{itemize}
|
||
}} \right.$
|
||
|
||
\begin{exampleblock}{}
|
||
\begin{center}
|
||
On peut créer autant de profils que l’on souhaite
|
||
\end{center}
|
||
\end{exampleblock}
|
||
|
||
\vfill
|
||
|
||
\begin{alertblock}{}
|
||
\begin{center}
|
||
\textbf{Toutes les options de \texttt{guix package} s’appliquent à n’importe quel profil}
|
||
\end{center}
|
||
\end{alertblock}
|
||
|
||
\vfill
|
||
|
||
\begin{center}
|
||
\texttt{guix install python python-numpy -{}-profile=outils-python}
|
||
\end{center}
|
||
|
||
\end{frame}
|
||
|
||
|
||
\subsection*{Gestion déclarative}
|
||
|
||
|
||
\thisslide{declarative}
|
||
\begin{frame}<presentation>[label=declarative, fragile]{Gestion déclarative}
|
||
\vspace{-0.3cm}
|
||
\begin{center}
|
||
déclaratif = fichier de configuration
|
||
\end{center}
|
||
|
||
\begin{exampleblock}{%
|
||
Un fichier \texttt{some-python.scm} peut contenir cette déclaration :%
|
||
}
|
||
\lstinputlisting[language=Scheme,columns=space-flexible]{example/some-python.scm}
|
||
\end{exampleblock}
|
||
|
||
\begin{center}
|
||
\verb+guix package --manifest=some-python.scm+
|
||
\end{center}
|
||
équivalent à
|
||
\begin{center}
|
||
\verb+guix install python python-matplotlib python-numpy python-scipy+
|
||
\end{center}
|
||
\end{frame}
|
||
|
||
|
||
|
||
\thisslide{declarative2}
|
||
\begin{frame}<presentation>[label=declarative2, fragile]{Gestion \emph{déclarative} : remarques}
|
||
\begin{description}
|
||
\item[Version ?] Nous le verrons dans la suite
|
||
\medskip
|
||
\item[Langage ?] \emph{Domain-Specific Language} (DSL) basé sur
|
||
\href{https://fr.wikipedia.org/wiki/Scheme}%
|
||
{Scheme}
|
||
\href{https://fr.wikipedia.org/wiki/Lisp}%
|
||
{(«~langage fonctionnel Lisp~»)}%
|
||
\medskip
|
||
\begin{itemize}
|
||
\item \verb+(Oui (quand (= Lisp parenthèses) (baroque)))+
|
||
\medskip
|
||
\item Mais \uline{\textbf{continuum}} :
|
||
\begin{enumerate}
|
||
\item configuration (\texttt{manifest})
|
||
\item définition des paquets (ou services)
|
||
\item extension
|
||
\item le c\oe ur est écrit aussi en Scheme
|
||
\end{enumerate}
|
||
\end{itemize}
|
||
\end{description}
|
||
\begin{alertblock}{}
|
||
\begin{center}
|
||
Guix est \textbf{adaptable} à ses besoins
|
||
\end{center}
|
||
\end{alertblock}
|
||
|
||
\vfill
|
||
|
||
\footnotesize{%
|
||
\href{https://fr.wikipedia.org/wiki/Programmation_déclarative}{Déclaratif}
|
||
vs
|
||
\href{https://fr.wikipedia.org/wiki/Programmation_impérative}{Impératif}
|
||
} \hfill \scriptsize{%
|
||
(%
|
||
et non pas
|
||
% \hfill
|
||
Donnée inerte vs Programme%
|
||
)
|
||
}
|
||
|
||
\footnotesize{%
|
||
Programmation déclarative = programmation fonctionnelle ou descriptive (\LaTeX) ou logique (Prolog)
|
||
}
|
||
\end{frame}
|
||
|
||
|
||
|
||
\thisslide{trans-declarative}
|
||
\begin{frame}<presentation>[label=trans-declarative, fragile]{Gestion déclarative : exemple de transformation
|
||
\small{%
|
||
(\href{https://fr.wikipedia.org/wiki/Machine_de_Rube_Goldberg}%
|
||
{machine de \smiley{Goldberg} \tiny{(lien)}})}} % \ddot\smile
|
||
\vspace{-0.3cm}
|
||
\begin{exampleblock}{}
|
||
\lstinputlisting[language=Scheme,columns=space-flexible]{example/some-python-bis.scm}
|
||
\end{exampleblock}
|
||
Guix DSL, \somevariable{\emph{variables}}, \someguile{Scheme} et \somestring{chaîne de caractères}.
|
||
\end{frame}
|
||
|
||
|
||
|
||
\thisslide{transformation}
|
||
\begin{frame}<presentation>[label=transformation, fragile]{Transformations de paquet : survol}
|
||
\begin{exampleblock}{}
|
||
\begin{center}
|
||
Comment utiliser GCC@7 pour compiler le paquet \texttt{python} ?
|
||
\end{center}
|
||
\end{exampleblock}
|
||
|
||
\begin{center}
|
||
Un paquet = recette pour configurer, construire, installer un logiciel
|
||
|
||
\medskip
|
||
|
||
(\texttt{./configure \&\& make \&\& make install})
|
||
\end{center}
|
||
La recette définit :
|
||
\begin{itemize}
|
||
\item un \blue{code source} et potentiellement des modifications \emph{ad-hoc} (\verb+patch+)
|
||
\item des \magenta{outils de construction} (compilateurs, moteur de
|
||
production etc., p. ex. \verb+gcc+, \verb+cmake+)
|
||
\item des \violet{dépendances}
|
||
\end{itemize}
|
||
|
||
\begin{alertblock}{}
|
||
\begin{center}
|
||
Une transformation permet de les réécrire
|
||
\end{center}
|
||
\end{alertblock}
|
||
\end{frame}
|
||
|
||
|
||
|
||
\thisslide{cli-trans}
|
||
\begin{frame}<presentation>[label=cli-trans, fragile]{Transformations : ligne de commande}
|
||
\begin{exampleblock}{}
|
||
\begin{center}
|
||
\verb+guix package --help-transformations+
|
||
\end{center}
|
||
\end{exampleblock}
|
||
\begin{Verbatim}[commandchars=\\\{\}]
|
||
\blue{--with-source use SOURCE when building the corresponding package}
|
||
\blue{--with-branch build PACKAGE from the latest commit of BRANCH}
|
||
\blue{--with-commit build PACKAGE from COMMIT}
|
||
\blue{--with-git--url build PACKAGE from the repository at URL}
|
||
\blue{--with-patch add FILE to the list of patches of PACKAGE}
|
||
\blue{--with-latest use the latest upstream release of PACKAGE}
|
||
\magenta{--with-c-toolchain build PACKAGE and its dependents with TOOLCHAIN}
|
||
\magenta{--with-debug-info build PACKAGE and preserve its debug info}
|
||
\magenta{--without-tests build PACKAGE without running its tests}
|
||
\violet{--with-input replace dependency PACKAGE by REPLACEMENT}
|
||
\violet{--with-graft graft REPLACEMENT on packages that refer to PACKAGE}
|
||
\end{Verbatim}
|
||
\end{frame}
|
||
|
||
|
||
|
||
\thisslide{trans-manif}
|
||
\begin{frame}<presentation>[label=trans-manif, fragile]{Transformations via fichier manifeste}
|
||
\vspace{-0.3cm}
|
||
\begin{exampleblock}{}
|
||
\lstinputlisting[language=Scheme,columns=space-flexible]{example/some-python-with-gcc7.scm}
|
||
\end{exampleblock}
|
||
\end{frame}
|
||
|
||
|
||
\subsection*{Environnement isolé à la volée}
|
||
|
||
|
||
\begin{frame}<presentation>[fragile]{Profils temporaires}
|
||
\begin{center}
|
||
Exemple : ajouter temporairement \texttt{IPython}
|
||
\end{center}
|
||
|
||
\bigskip
|
||
|
||
\begin{center}
|
||
(\texttt{demo/shell-ipython})
|
||
\end{center}
|
||
\end{frame}
|
||
|
||
|
||
\thisslide{shell}
|
||
\begin{frame}<presentation>[label=shell,fragile]{Étendre temporairement un \emph{profil}}
|
||
\begin{exampleblock}{}
|
||
\begin{verbatim}
|
||
guix shell -m manifest.scm
|
||
guix shell -m manifest.scm python-ipython -- ipython3
|
||
\end{verbatim}
|
||
\end{exampleblock}
|
||
|
||
\begin{alertblock}{}
|
||
\begin{tabular}{lcl}
|
||
\red{$\blacktriangleright$} \verb+--pure+ &:& réinitialise des variables
|
||
d’environnement existantes
|
||
\\
|
||
\red{$\blacktriangleright$} \verb+--container+ &:& lance un conteneur isolé
|
||
\\
|
||
\red{$\blacktriangleright$} \verb+--development+ &:& inclus les dépendances du paquet
|
||
\end{tabular}
|
||
\end{alertblock}
|
||
|
||
\begin{exampleblock}{}
|
||
\begin{verbatim}
|
||
guix shell -m some-python.scm python-ipython # 1.
|
||
guix shell -m some-python.scm python-ipython --pure # 2.
|
||
guix shell -m some-python.scm python-ipython --container # 3.
|
||
\end{verbatim}
|
||
\end{exampleblock}
|
||
|
||
\begin{center}
|
||
Bonus : \verb+guix shell emacs git git:send-email --development guix+
|
||
\end{center}
|
||
\end{frame}
|
||
|
||
|
||
|
||
\begin{frame}<presentation>[plain,fragile,noframenumbering]{}
|
||
À ce stade, il semble naturel de vouloir \uline{partager ou construire des conteneurs isolés}.
|
||
|
||
\vfill{}
|
||
\begin{center}
|
||
\textbf{Comment créer des images ?}
|
||
\end{center}
|
||
\vfill{}
|
||
\begin{flushright}
|
||
(Exemple : Alice sans privilège particulier)
|
||
\end{flushright}
|
||
\end{frame}
|
||
|
||
|
||
|
||
\section{Création d'images}
|
||
\subsection*{Création d’un \emph{pack}}
|
||
|
||
|
||
|
||
\thisslide{conteneur}
|
||
\begin{frame}<presentation>[label=conteneur,fragile]{Comment capturer un environnement ? Conteneur}
|
||
\begin{center}
|
||
Conteneur = \smiley{smoothie}
|
||
\end{center}
|
||
|
||
\begin{itemize}
|
||
\item Comment est construit le conteneur ? Dockerfile ?
|
||
\item Comment sont construits les binaires inclus dans le conteneur ?
|
||
\end{itemize}
|
||
|
||
\begin{exampleblock}{}
|
||
\begin{verbatim}
|
||
FROM amd64/debian:stretch
|
||
RUN apt-get update && apt-get install git make curl gcc g++ ...
|
||
RUN curl -L -O https://... && ... && make -j 4 && ...
|
||
RUN git clone https://... && ... && make ... /usr/local/lib/libopenblas.a ...
|
||
\end{verbatim}
|
||
\begin{center}
|
||
\href{https://gitlab.onelab.info/gmsh/gmsh/-/blob/c7544ec812982dbe15e105059983f1b0c3896536/utils/docker/Dockerfile.debian.stretch.64bit}%
|
||
{source (lien) : Gmsh~}%
|
||
\href{http://gmsh.info/}%
|
||
{A three-dimensional finite element mesh generator (lien)}
|
||
\end{center}
|
||
\end{exampleblock}
|
||
|
||
\begin{alertblock}{}
|
||
\begin{center}
|
||
Avec un Dockerfile au temps t, comment regénérer l'image au temps t’ ?
|
||
\end{center}
|
||
\end{alertblock}
|
||
\end{frame}
|
||
|
||
|
||
|
||
\thisslide{pack}
|
||
\begin{frame}<presentation>[label=pack, fragile]{Qu’est-ce qu’un \emph{pack} ?}
|
||
\begin{center}
|
||
\emph{pack} = collection de paquets dans un format d’archive
|
||
\end{center}
|
||
|
||
Quel est le but d’un \emph{pack} ?
|
||
\begin{itemize}
|
||
\item Alice distribue «~tout~» à Carole,
|
||
\item Carole n’a pas installé Guix mais aura l’exact même environnement.
|
||
\end{itemize}
|
||
|
||
\begin{exampleblock}{Qu’est-ce qu’un format d’archive ?}
|
||
\begin{itemize}
|
||
\item \texttt{tar} (\emph{tarballs})
|
||
\item Docker
|
||
\item Singularity
|
||
\item paquet binaire Debian \texttt{.deb}
|
||
\end{itemize}
|
||
\end{exampleblock}
|
||
\end{frame}
|
||
|
||
|
||
|
||
\thisslide{tout}
|
||
\begin{frame}<presentation>[label=tout, fragile]{Qu'est-ce que «~tout~» ?}
|
||
\begin{center}
|
||
Carole a besoin de la \emph{clôture transitive} (= toutes les dépendances)
|
||
\end{center}
|
||
\begin{exampleblock}{}
|
||
\begin{verbatim}
|
||
$ guix size python-numpy --sort=closure
|
||
store item total self
|
||
python-numpy-1.20.3 301.5 23.6 7.8%
|
||
...
|
||
python-3.9.9 155.3 63.7 21.1%
|
||
openblas-0.3.18 152.8 40.0 13.3%
|
||
...
|
||
total: 301.5 MiB
|
||
\end{verbatim}
|
||
\end{exampleblock}
|
||
|
||
\begin{alertblock}{}
|
||
\begin{center}
|
||
\texttt{guix pack} permet de créer cette archive contenant «~tout~»
|
||
\end{center}
|
||
\end{alertblock}
|
||
\end{frame}
|
||
|
||
|
||
|
||
\thisslide{pack2}
|
||
\begin{frame}<presentation>[label=pack2, fragile]{Création d’un \emph{pack}
|
||
pour le distribuer}
|
||
|
||
\begin{itemize}
|
||
\item Alice construit un \emph{pack} au format Docker
|
||
\begin{exampleblock}{}
|
||
\begin{center}
|
||
\verb+guix pack --format=docker -m manifest.scm+
|
||
\end{center}
|
||
\end{exampleblock}
|
||
puis distribue ce conteneur Docker (via un \emph{registry} ou autre).
|
||
|
||
\item Carole n'utilise pas \small{(encore?)}\normalsize{} Guix
|
||
\begin{exampleblock}{}
|
||
\begin{verbatim}
|
||
$ docker run -ti projet-alice python3
|
||
Python 3.9.9 (main, Jan 1 1970, 00:00:01)
|
||
[GCC 10.3.0] on linux
|
||
Type "help", "copyright", "credits" or "license" for more information.
|
||
>>>
|
||
\end{verbatim}
|
||
\end{exampleblock}
|
||
et utilise l'exact même environnement computationnel qu'Alice.
|
||
\end{itemize}
|
||
\end{frame}
|
||
|
||
|
||
|
||
\thisslide{pack3}
|
||
\begin{frame}<presentation>[label=pack3, fragile]{Au final, \texttt{guix pack}, c’est\dots}
|
||
|
||
\begin{center}
|
||
\emph{Agnostique} sur le format du «~conteneur~»
|
||
\end{center}
|
||
|
||
\begin{tabular}{cc}
|
||
\begin{minipage}{0.4\linewidth}
|
||
\begin{exampleblock}{}
|
||
\begin{itemize}
|
||
\item \texttt{tar} (\emph{tarballs})
|
||
\item Docker
|
||
\item Singularity
|
||
\item paquet binaire Debian \texttt{.deb}
|
||
\end{itemize}
|
||
\end{exampleblock}
|
||
\end{minipage}
|
||
&
|
||
\begin{minipage}{0.5\linewidth}
|
||
\begin{alertblock}{}
|
||
\begin{itemize}
|
||
\item archives repositionnables
|
||
\item sans \texttt{Dockerfile}
|
||
\item via \texttt{squashfs}
|
||
\item sans \texttt{debian/rule} (expérimental)
|
||
\end{itemize}
|
||
\end{alertblock}
|
||
\end{minipage}
|
||
\end{tabular}
|
||
|
||
\bigskip
|
||
|
||
\begin{center}
|
||
\textbf{Adaptable aux cas d’usage}
|
||
\end{center}
|
||
\end{frame}
|
||
|
||
|
||
|
||
\subsection*{Création d'une machine virtuelle}
|
||
|
||
|
||
\thisslide{image}
|
||
\begin{frame}<presentation>[label=image, fragile]{Création d’une image avec
|
||
\texttt{guix system} : un monde de services}
|
||
|
||
\begin{alertblock}{}
|
||
\begin{center}
|
||
\texttt{guix system} permet une
|
||
\uline{\textbf{configuration déclarative} d'un \emph{système}}
|
||
\end{center}
|
||
\end{alertblock}
|
||
|
||
\begin{itemize}
|
||
\item \texttt{guix system search} pour trouver les services disponibles
|
||
\item \texttt{guix system image} pour construire une image de type :
|
||
\begin{itemize}
|
||
\item qcow2
|
||
\item docker
|
||
\item iso9660, uncompressed-iso9660, efi-raw, raw-with-offset
|
||
\item rock64-raw, pinebook-pro-raw, pine64-raw, novena-raw
|
||
\item hurd-raw, hurd-qcow2
|
||
\end{itemize}
|
||
\item
|
||
\begin{minipage}{1.0\linewidth}
|
||
\begin{exampleblock}{}
|
||
\texttt{guix system vm} pour construire une machine virtuelle (VM)
|
||
\begin{center}
|
||
(la VM partage son dépôt avec le système hôte)
|
||
\end{center}
|
||
\end{exampleblock}
|
||
\end{minipage}
|
||
\end{itemize}
|
||
\end{frame}
|
||
|
||
|
||
|
||
\thisslide{image4}
|
||
\begin{frame}<presentation>[label=image4, fragile]{Machines virtuelles avec Guix}
|
||
|
||
% \begin{center}
|
||
% (\texttt{demo/vm})
|
||
% \end{center}
|
||
|
||
\begin{alertblock}{}
|
||
\begin{itemize}
|
||
\item Gestion déclarative
|
||
\item Réutilisation via des patrons (\emph{template})
|
||
\end{itemize}
|
||
\end{alertblock}
|
||
|
||
\end{frame}
|
||
|
||
|
||
|
||
\begin{frame}<presentation>[plain,fragile,noframenumbering]{}
|
||
Très bien tout cela, mais en quoi est-ce \uline{reproductible} ?
|
||
|
||
\vfill{}
|
||
\begin{center}
|
||
\textbf{Parlons de versions !}
|
||
\end{center}
|
||
\vfill{}
|
||
\begin{flushright}
|
||
(Exemple : Carole collabore avec Alice)
|
||
\end{flushright}
|
||
\end{frame}
|
||
|
||
|
||
|
||
\section{Une histoire de versions}
|
||
\subsection{Version ? Graphe ?}
|
||
|
||
|
||
|
||
\thisslide{version}
|
||
\begin{frame}<presentation>[label=version, fragile]{Quelle est ma version de Guix ?}
|
||
% \vspace{-0.25cm}
|
||
\begin{exampleblock}{}
|
||
\begin{verbatim}
|
||
$ guix describe
|
||
Generation 76 Apr 25 2022 12:44:37 (current)
|
||
guix eb34ff1
|
||
repository URL: https://git.savannah.gnu.org/git/guix.git
|
||
branch: master
|
||
commit: eb34ff16cc9038880e87e1a58a93331fca37ad92
|
||
|
||
$ guix --version
|
||
guix (GNU Guix) eb34ff16cc9038880e87e1a58a93331fca37ad92
|
||
\end{verbatim}
|
||
\end{exampleblock}
|
||
|
||
% \vspace{-0.175cm}
|
||
\begin{alertblock}{}
|
||
\begin{center}
|
||
Un état fixe toute la collection des paquets et de Guix lui-même
|
||
\end{center}
|
||
\end{alertblock}
|
||
|
||
(Un état peut contenir plusieurs canaux (\emph{channel} = dépôt Git),\\
|
||
\hfill avec des URL, branches ou commits divers et variés)
|
||
|
||
% \vspace{-0.175cm}
|
||
% \begin{verbatim}
|
||
% $ guix package --list-available=^python | head -2
|
||
% python 3.9.9 out,tk,idle gnu/packages/python.scm:431:2
|
||
% python-absl-py 0.6.1 out gnu/packages/python-xyz.scm:23415:2
|
||
% \end{verbatim}
|
||
\end{frame}
|
||
|
||
|
||
\begin{frame}[fragile]{Alice dit « GCC à la version 11.2.0 »}
|
||
\vspace{-0.1cm}
|
||
\includegraphics[width=\textwidth]{static/graph.png}
|
||
\vfill{}
|
||
\begin{alertblock}{}
|
||
\begin{center}
|
||
Est-ce la même version de GCC si \texttt{mpfr} est à la version 4.0 ?
|
||
\end{center}
|
||
\end{alertblock}
|
||
\vfill
|
||
\begin{flushright}
|
||
Graphe complet : 43 ou 104 ou 125 ou 218 n\oe uds
|
||
|
||
\small
|
||
(suivant ce que l’on considère comme graine binaire du \emph{bootstrap})
|
||
\end{flushright}
|
||
\end{frame}
|
||
|
||
|
||
|
||
\thisslide{dag}
|
||
\begin{frame}<presentation>[label=dag, fragile]{État = Graphe Acyclique Dirigé (\emph{DAG})}
|
||
\vspace{-0.5cm}
|
||
\begin{center}
|
||
\texttt{guix graph -{}-max-depth=6 python | dot -Tpng > graph-python.png}
|
||
\end{center}
|
||
|
||
\vfill{}
|
||
\includegraphics[width=\textwidth]{static/graph-python.png}
|
||
\vfill{}
|
||
|
||
Graphe complet : Python = 137 n\oe uds, Numpy = 189, Matplotlib = 915, Scipy
|
||
= 1439 n\oe uds
|
||
% graph python-scipy -t bag | grep label | cut -f2 -d'[' | sort | uniq | wc -l
|
||
\end{frame}
|
||
|
||
|
||
\begin{frame}[fragile]{Révision = un graphe spécifique}
|
||
\begin{alertblock}{}
|
||
\begin{center}
|
||
une version = un graphe
|
||
\end{center}
|
||
\end{alertblock}
|
||
|
||
\begin{verbatim}
|
||
$ guix describe
|
||
Generation 76 Apr 25 2022 12:44:37 (current)
|
||
guix eb34ff1
|
||
repository URL: https://git.savannah.gnu.org/git/guix.git
|
||
branch: master
|
||
commit: eb34ff16cc9038880e87e1a58a93331fca37ad92
|
||
\end{verbatim}
|
||
|
||
\begin{alertblock}{}
|
||
\begin{center}
|
||
La révision \texttt{eb34ff1} capture \textbf{tout} le graphe
|
||
\end{center}
|
||
\end{alertblock}
|
||
|
||
\begin{exampleblock}{}
|
||
\begin{itemize}
|
||
\item Alice dit « j’ai utilisé Guix à la révision \texttt{eb34ff1} »
|
||
\item Carole connaît toutes les informations pour reproduire le même environnement
|
||
\end{itemize}
|
||
\end{exampleblock}
|
||
\end{frame}
|
||
|
||
|
||
|
||
\subsection{Définir un paquet}
|
||
|
||
|
||
\thisslide{def-pkg}
|
||
\begin{frame}<presentation>[label=def-pkg, fragile]{Définition d’un paquet (n\oe ud du graphe)}
|
||
\vspace{-0.3cm}
|
||
\begin{exampleblock}{}
|
||
\lstinputlisting[language=Scheme,columns=space-flexible]{example/mock-define-python.scm}
|
||
\end{exampleblock}
|
||
|
||
\vspace{-0.2cm}
|
||
\begin{alertblock}{}
|
||
\begin{itemize}
|
||
\item Chaque \texttt{inputs} est une définition similaire
|
||
\hfill (récursion $\rightarrow$ graphe)
|
||
\item Il n’y a pas de cycle
|
||
\hfill (\texttt{bzip2} ou ses \texttt{inputs} ne peuvent pas utiliser \texttt{python})
|
||
\end{itemize}
|
||
\end{alertblock}
|
||
|
||
\vspace{-0.25cm}
|
||
\begin{center}
|
||
\small{%
|
||
(Quel commencement du graphe ? Problème du \emph{bootstrap} dont nous ne
|
||
parlerons pas ici)
|
||
}\normalsize
|
||
\end{center}
|
||
\end{frame}
|
||
|
||
|
||
\begin{frame}[fragile]{Gestionnaire de paquets = gestionnaire de graphe}
|
||
\vspace{-0.1cm}
|
||
\begin{alertblock}{}
|
||
\begin{center}
|
||
Comment capturer les informations du transparent \ref{p4}?
|
||
\end{center}
|
||
\end{alertblock}
|
||
|
||
\begin{itemize}
|
||
\item Quelles sont les sources des outils ?
|
||
\hfill \texttt{source}
|
||
\item \tikzmark{A}{Quelles sont les outils requis pour la construction ?}
|
||
\item \tikzmark{B}{Quelles sont les outils requis pour l’exécution ?}
|
||
\item Comment chaque outil est-il produit ?
|
||
\hfill \texttt{build-system}, \texttt{arguments}
|
||
\end{itemize}
|
||
\tikzbrace{A}{B}{\texttt{inputs}, \texttt{propagated-}, \texttt{native-inputs}}
|
||
|
||
\vspace{-0.5cm}
|
||
\begin{exampleblock}{}
|
||
\vspace{-0.3cm}
|
||
\lstinputlisting[language=Scheme,columns=space-flexible]{example/mock-define-pkg.scm}
|
||
\end{exampleblock}
|
||
\end{frame}
|
||
|
||
|
||
|
||
\subsection{Changer d'état}
|
||
|
||
|
||
\thisslide{pull}
|
||
\begin{frame}<presentation>[label=pull, fragile]{Concrètement, en pratique ?}
|
||
|
||
\begin{alertblock}{}
|
||
\begin{center}
|
||
une version = un graphe
|
||
\end{center}
|
||
\end{alertblock}
|
||
|
||
\begin{center}
|
||
Mise à jour de Guix
|
||
|
||
\texttt{guix pull}
|
||
|
||
(création d'une nouvelle \emph{génération} interne)
|
||
\end{center}
|
||
|
||
\begin{itemize}
|
||
\item Il est possible de \uline{spécifier un \emph{état}} :
|
||
\begin{exampleblock}{}
|
||
\begin{center}
|
||
\begin{tabular}{rl}
|
||
\blue{\texttt{alice@laptop\$}} & \texttt{guix describe -{}-format=channels >
|
||
alice-laptop.scm}
|
||
\\
|
||
\violet{\texttt{carole@desktop\$}} & \texttt{guix pull -{}-channels=alice-laptop.scm}
|
||
\end{tabular}
|
||
\end{center}
|
||
\end{exampleblock}
|
||
\item Il est possible de se placer \uline{\textbf{temporairement} dans un état spécifique}\\
|
||
\hfill pour exécuter une commande (comme créer un profil)
|
||
|
||
\begin{exampleblock}{}
|
||
\begin{center}
|
||
\texttt{guix time-machine -{}-commit=c61df1792c -{}- install python -p python/autres}
|
||
\end{center}
|
||
\end{exampleblock}
|
||
\end{itemize}
|
||
\end{frame}
|
||
|
||
|
||
|
||
\begin{frame}[fragile]{Collaboration}
|
||
\begin{description}
|
||
\item[Alice] décrit son environnement :
|
||
\begin{itemize}
|
||
\item la révision (Guix lui-même et aussi potentiellement les autres canaux):
|
||
\begin{center}
|
||
\texttt{guix describe -f channels > alice.scm}
|
||
\end{center}
|
||
\item la liste des paquets avec le fichier \texttt{paquets.scm}
|
||
\end{itemize}
|
||
génère son environnement avec, e.g.,
|
||
\begin{center}
|
||
\texttt{guix shell -m paquets.scm}
|
||
\end{center}
|
||
et \uline{\textbf{partage ses deux fichiers}}.
|
||
\item[Carole] génère le même environnement \uline{\textbf{à partir des deux fichiers}} d’Alice,
|
||
\begin{center}
|
||
\texttt{guix time-machine -C alice.scm -{}- shell -m paquets.scm}
|
||
\end{center}
|
||
\item[Dan] peut donc aussi avoir le même environnement qu’Alice et Carole.
|
||
\end{description}
|
||
\end{frame}
|
||
|
||
|
||
|
||
\thisslide{time-machine}
|
||
\begin{frame}<presentation>[label=time-machine, fragile]{Reproductibilité en arrière, en avant :
|
||
\texttt{guix time-machine}}
|
||
|
||
\vspace{-1cm}
|
||
\begin{center}
|
||
\begin{tikzpicture}
|
||
% draw horizontal line
|
||
\draw[thick, -Triangle] (0,0) -- (12,0) node[font=\scriptsize,below left=3pt and -8pt]{time};
|
||
|
||
\node[font=\scriptsize, text height=1.75ex, text depth=.5ex] at (0,-.3) {2018};
|
||
|
||
% draw vertical lines
|
||
\foreach \x in {1,...,11}
|
||
\draw (\x cm,3pt) -- (\x cm,-3pt);
|
||
|
||
\foreach \x/\descr in {3/Carole,6/Alice,8/Bob}
|
||
\node[font=\scriptsize, text height=1.75ex, text depth=.5ex] at (\x,-.3) {$\descr$};
|
||
|
||
\node[font=\scriptsize, text height=1.75ex, text depth=.5ex] (Carole) at (3,+.3) {d7e57e};
|
||
\node[font=\scriptsize, text height=1.75ex, text depth=.5ex] (Alice) at (6,+.3) {eb34ff1};
|
||
\node[font=\scriptsize, text height=1.75ex, text depth=.5ex] (Dan) at (8,+.3) {3682bd};
|
||
|
||
\draw[->] (Carole.north) to [out=50,in=150] (Alice.west);
|
||
\draw[->] (Dan.north) to [out=100,in=50] (Alice.east);
|
||
|
||
\draw[lightgray!0!red, line width=4pt] (2,-.6) -- +(8,0);
|
||
\foreach \x/\percol in {1/75,9/75}
|
||
\draw[lightgray!\percol!red, line width=4pt] (\x,-.6) -- +(1,0);
|
||
|
||
\node[font=\scriptsize, text height=1.75ex, text depth=.5ex] at (11,-.3) {$Dan$};
|
||
\node[font=\scriptsize, text height=1.75ex, text depth=.5ex] (Dan) at (11,+.3) {c99c3d};
|
||
\draw[dashed,->] (Dan.north) to [out=40,in=90] (Alice.north);
|
||
|
||
\end{tikzpicture}
|
||
\end{center}
|
||
|
||
\begin{exampleblock}{}
|
||
Pour être \uline{reproductible dans le temps}, il faut :
|
||
\begin{itemize}
|
||
\item Une préservation de \textbf{tous} les codes source~%
|
||
\small{%
|
||
(\href{https://ngyro.com/pog-reports/latest/}%
|
||
{$\approx 75\%$ archivés \tiny{(lien)}\small} dans~%
|
||
\href{https://www.softwareheritage.org/}%
|
||
{Software Heritage \tiny{(lien)}\small})%
|
||
}\normalsize
|
||
\item Une \emph{backward} compatibilité du noyau Linux
|
||
\item Une compatibilité du \emph{hardware} (p. ex. CPU, disque dur \tiny{(NVMe)}\normalsize, etc.)
|
||
\end{itemize}
|
||
\end{exampleblock}
|
||
|
||
\begin{alertblock}{}
|
||
\begin{center}
|
||
Quelle est la taille de la fenêtre temporelle avec les 3 conditions
|
||
satisfaites ?
|
||
\end{center}
|
||
\end{alertblock}
|
||
\begin{center}
|
||
\scriptsize{(À ma connaissance, le projet Guix réalise une expérimentation
|
||
grandeur nature et quasi-unique depuis sa v1.0 en 2019)}
|
||
\end{center}
|
||
\end{frame}
|
||
|
||
|
||
\subsection{Préservation}
|
||
|
||
|
||
\begin{frame}[fragile]{Pourquoi les préserver ?}
|
||
\vspace{-0.25cm}
|
||
\begin{exampleblock}{}
|
||
Parce que les \textbf{services en ligne parfois s’arrêtent}
|
||
\begin{itemize}
|
||
\item \href{https://code.google.com/archive/}{Google Code (lien)} début 2016
|
||
\item Alioth (Debian) en 2018 remplacé par
|
||
\href{https://salsa.debian.org/public}{Salsa}
|
||
\item Gna! en 2017 après 13 années d’activité
|
||
\item Gitourious en 2015 (le second plus populaire service
|
||
d’hébergement pour Git en 2011)
|
||
\item etc.
|
||
\item<2-> \texttt{gforge.inria.fr}
|
||
par exemple \href{https://issues.guix.gnu.org/42162}{Guix issue \#42162 (lien)}
|
||
\begin{verbatim}
|
||
Believe it or not, gforge.inria.fr was finally phased out on
|
||
Sept. 30th. And believe it or not, despite all the work and all the
|
||
chat :-), we lost the source tarball of Scotch 6.1.1 for a short period
|
||
of time (I found a copy and uploaded it to berlin a couple of hours
|
||
ago).
|
||
\end{verbatim}
|
||
\end{itemize}
|
||
\end{exampleblock}
|
||
\end{frame}
|
||
|
||
|
||
\begin{frame}[fragile]{Comment les préserver ?}
|
||
\begin{alertblock}{}
|
||
\begin{center}
|
||
Forge $\neq$ Archive
|
||
\end{center}
|
||
\end{alertblock}
|
||
|
||
\begin{flushright}
|
||
L'objectif d'une forge est de permettre à plusieurs développeurs de
|
||
\textbf{participer ensemble au développement} d'un ou plusieurs logiciels,
|
||
le plus souvent à travers le réseau Internet.
|
||
|
||
\medskip
|
||
|
||
\href{https://fr.wikipedia.org/w/index.php?title=Forge_(informatique)&oldid=192671997}%
|
||
{https://fr.wikipedia.org/wiki/Forge\_(informatique)}
|
||
\end{flushright}
|
||
|
||
\vfill
|
||
|
||
\begin{flushright}
|
||
L'archivage est un ensemble d'actions qui a pour but de garantir
|
||
l'\textbf{accessibilité sur le long terme} d'informations (dossiers,
|
||
documents, données) que l'on doit ou souhaite conserver pour des raisons
|
||
juridiques
|
||
|
||
\medskip
|
||
|
||
\href{https://fr.wikipedia.org/w/index.php?title=Archivage&oldid=186832550}
|
||
{https://fr.wikipedia.org/wiki/Archivage}
|
||
\end{flushright}
|
||
|
||
|
||
\begin{exampleblock}{}
|
||
\begin{center}
|
||
\href{https://www.softwareheritage.org/}%
|
||
{Software Heritage \emph{« are building the universal software archive »} (lien)}
|
||
\end{center}
|
||
\end{exampleblock}
|
||
\end{frame}
|
||
|
||
|
||
|
||
\begin{frame}[fragile]{Les services en ligne parfois s’arrêtent\dots}
|
||
\begin{center}
|
||
Pourquoi serait-il différent pour Software Heritage ?
|
||
\end{center}
|
||
|
||
Aucune garantie mais…
|
||
|
||
\begin{flushright}
|
||
Software Heritage is an open, non-profit initiative unveiled in 2016 by
|
||
Inria. It is supported by a broad panel of institutional and industry
|
||
partners, in collaboration with UNESCO.
|
||
|
||
\medskip
|
||
|
||
The long term goal is to collect all publicly available software in source
|
||
code form together with its development history, replicate it massively to
|
||
ensure its preservation, and share it with everyone who needs it.
|
||
\end{flushright}
|
||
|
||
\begin{exampleblock}{}
|
||
\begin{itemize}
|
||
\item Supporté par des institutions
|
||
\item Avec la mission d’archiver
|
||
\end{itemize}
|
||
\end{exampleblock}
|
||
|
||
\end{frame}
|
||
|
||
|
||
\begin{frame}[fragile]{État des lieux de Guix et Software Heritage (SWH)}
|
||
|
||
\begin{alertblock}{Guix est capable de}
|
||
\begin{itemize}
|
||
\item sauvegarder \hfill (automatiquement) les sources dans SWH
|
||
\item retrouver \hfill (automatiquement) les sources depuis SWH
|
||
\end{itemize}
|
||
\end{alertblock}
|
||
\begin{exampleblock}{}
|
||
\begin{center}
|
||
Mais pas tous les types de sources !
|
||
\end{center}
|
||
\end{exampleblock}
|
||
|
||
\vfill
|
||
|
||
\begin{itemize}
|
||
\item Des outils disponibles dans Guix pour les sources :
|
||
\begin{itemize}
|
||
\item dépôt Git \hfill \texttt{git-fetch}
|
||
\item archives \emph{tarballs} (compressées) \hfill \texttt{url-fetch}
|
||
\end{itemize}
|
||
\item \dots et manquants pour tout le reste \hfill (aide bienvenue :-))
|
||
\end{itemize}
|
||
\end{frame}
|
||
|
||
|
||
|
||
\begin{frame}[fragile]{Quelques stats : préservation de Guix}
|
||
\vspace{-0.25cm}
|
||
\begin{center}
|
||
\href{https://ngyro.com/pog-reports/latest/}{https://ngyro.com/pog-reports/latest/}
|
||
|
||
\begin{tabular}{cc}
|
||
\begin{minipage}{0.6\linewidth}
|
||
\includegraphics[width=0.95\textwidth]{static/all-abs-hist.png}
|
||
\end{minipage}
|
||
&
|
||
\begin{minipage}{0.4\linewidth}
|
||
Sauvegarder dans Software Heritage :
|
||
\begin{itemize}
|
||
\item Git = 98.3\%
|
||
\item \emph{tarballs} $\approx$ 70\%
|
||
\end{itemize}
|
||
\end{minipage}
|
||
\end{tabular}
|
||
\end{center}
|
||
\end{frame}
|
||
|
||
|
||
\begin{frame}[fragile]{Oui, mais\dots}
|
||
\begin{itemize}
|
||
\item Comment identifier mon code ?
|
||
\begin{center}
|
||
\href{https://www.softwareheritage.org/2020/07/09/intrinsic-vs-extrinsic-identifiers/}%
|
||
{Identifiant intrinsèque vs extrinsèque (lien)}
|
||
\end{center}
|
||
tag (v1.2.3) vs hash (\texttt{eb34ff1}), quel hash ? etc.
|
||
\item Comment s’assurer que tout le graphe est bien préservé ?
|
||
\item Que se passe-t-il s'il manque les sources d'un seul n\oe ud ?
|
||
\item On n’a pas parlé du \emph{boostrap} (les racines du graphes).
|
||
\item etc.
|
||
\end{itemize}
|
||
\end{frame}
|
||
|
||
|
||
\section{Au final\dots}
|
||
\subsection*{Au final\dots}
|
||
|
||
|
||
\begin{frame}<presentation>[plain,fragile,noframenumbering]{}
|
||
\begin{center}
|
||
\textbf{Au final}
|
||
\end{center}
|
||
\end{frame}
|
||
|
||
|
||
|
||
\thisslide{continuum2}
|
||
\begin{frame}<presentation>[label=continuum2, fragile]{\dots Guix est un \emph{continuum}%
|
||
\hfill \small{(sur n'importe quelle distribution Linux)}}
|
||
|
||
\vspace{-0.5cm}
|
||
|
||
\begin{center}
|
||
\begin{tabular}{llr}
|
||
un \uline{\textbf{gestionnaire de paquets}} déclaratif
|
||
& \texttt{guix package}
|
||
& (\texttt{-m} \emph{manifest})
|
||
\\
|
||
\ \ temporairement étendu à la volée
|
||
& \texttt{guix shell}
|
||
& (\texttt{-{}-container})
|
||
\\
|
||
\ \ \ \ maîtrisant exactement l'\emph{état}
|
||
& \texttt{guix time-machine}
|
||
& (\texttt{-C} \emph{channels})
|
||
\\
|
||
\ \ \ \ \ \ qui produit des \uline{\textbf{\emph{packs} distribuables}}
|
||
& \texttt{guix pack}
|
||
& (\texttt{-f docker})
|
||
\\
|
||
\ \ \ \ \ \ \ \ qui génèrent des \textbf{\uline{\emph{machines virtuelles}} isolées}
|
||
& \texttt{guix sytem vm}
|
||
\\
|
||
\ \ \ \ \ \ \ \ \ \ \ \ \ et aussi une bibliothèque Scheme
|
||
& \texttt{guix repl}
|
||
& (\emph{extensions})
|
||
\\
|
||
$\Big($
|
||
la distribution Linux elle-même
|
||
& \texttt{config.scm}
|
||
& (Guix System)
|
||
$\Big)$
|
||
\end{tabular}
|
||
|
||
\begin{alertblock}{}
|
||
\begin{center}
|
||
\textbf{%
|
||
Guix permet un contrôle fin du graphe de configuration sous-jacent
|
||
}
|
||
\end{center}
|
||
\end{alertblock}
|
||
\end{center}
|
||
|
||
\begin{exampleblock}{}
|
||
\begin{center}
|
||
\texttt{guix time-machine -C channels.scm -{}-}
|
||
\emph{commande options}
|
||
\texttt{une-config.scm}
|
||
\end{center}
|
||
\end{exampleblock}
|
||
|
||
\begin{alertblock}{}
|
||
\begin{center}
|
||
\texttt{une-config.scm} est \textbf{reproductible}
|
||
d'une machine à l'autre et dans le temps
|
||
\end{center}
|
||
\end{alertblock}
|
||
\end{frame}
|
||
|
||
|
||
|
||
\thisslide{scenarii2}
|
||
\begin{frame}<presentation>[label=scenarii2,fragile]{Scenarii}
|
||
\vspace{-0.2cm}
|
||
\begin{itemize}
|
||
\item Alice utilise \texttt{python@3.9} et \texttt{numpy@1.20.3}
|
||
\vspace{-0.1cm}
|
||
\begin{exampleblock}{}
|
||
\begin{verbatim}
|
||
$ guix install python python-numpy
|
||
\end{verbatim}
|
||
\end{exampleblock}
|
||
\item Carole \textbf{collabore} avec Alice\ldots{}
|
||
mais utilise d'autres outils pour un autre projet
|
||
\vspace{-0.1cm}
|
||
\begin{exampleblock}{}
|
||
\begin{verbatim}
|
||
$ guix time-machine -C version-alice.scm \
|
||
-- install -m outils-alice.scm -p projet/alice
|
||
\end{verbatim}
|
||
\end{exampleblock}
|
||
\item Charlie \textbf{mets à jour} son système et \textbf{tout est cassé}
|
||
\vspace{-0.1cm}
|
||
\begin{exampleblock}{}
|
||
\begin{verbatim}
|
||
$ guix pull --roll-back
|
||
\end{verbatim}
|
||
\end{exampleblock}
|
||
\item Bob utilise les \textbf{{mêmes} versions} qu'Alice mais n'a
|
||
\textbf{pas le {même} résultat}
|
||
\vspace{-0.1cm}
|
||
\begin{exampleblock}{}
|
||
\begin{verbatim}
|
||
error: You found a bug
|
||
\end{verbatim}
|
||
\end{exampleblock}
|
||
\item Dan essaie de \textbf{rejouer plus tard} le scénario d'Alice\dots
|
||
\vspace{-0.25cm}
|
||
\begin{flushright}
|
||
\scriptsize{(voir ligne commande Carole)}\normalsize
|
||
\hfill{}
|
||
\dots ça dépend de la date du scénario ;-)
|
||
\end{flushright}
|
||
\end{itemize}
|
||
\end{frame}
|
||
|
||
|
||
|
||
\subsection*{Limitations}
|
||
|
||
|
||
\thisslide{limit}
|
||
\begin{frame}<presentation>[label=limit,fragile]{On s'habitue vite\dots}
|
||
\begin{itemize}
|
||
\item Fonctionne uniquement avec Linux.
|
||
\item Environnement isolé implique une forte transparence,
|
||
\begin{flushright}
|
||
c.-à-d., difficile avec des parties propriétaires.
|
||
\end{flushright}
|
||
|
||
\item Certaines commandes peuvent apparaître lentes (\texttt{pull}, \texttt{search}, etc.),
|
||
\begin{flushright}
|
||
ou retourner des erreurs obscures.
|
||
\end{flushright}
|
||
\item Les premiers pas requièrent un peu de patience,
|
||
\begin{flushright}
|
||
et d’accepter que ce
|
||
n’est \uline{pas \emph{comme d’habitude}}.
|
||
\end{flushright}
|
||
\end{itemize}
|
||
|
||
\vfill{}
|
||
\begin{alertblock}{}
|
||
\begin{center}
|
||
\textbf{La communauté est très accueillante et toujours disponible pour aider}
|
||
\end{center}
|
||
\end{alertblock}
|
||
\end{frame}
|
||
|
||
|
||
|
||
\subsection*{Ressources}
|
||
|
||
|
||
\thisslide{prod}
|
||
\begin{frame}<presentation>[label=prod]{En production}
|
||
\vspace{-0.2cm}
|
||
\begin{exampleblock}{}
|
||
\begin{tabular}{lcrl|c}
|
||
\textbf{Grid’5000} & & 828-nodes &(12,000+ cores, 31 clusters) &(France) \\
|
||
\textbf{GliCID (CCIPL)} & Nantes & 392-nodes &(7500+ cores) &(France) \\
|
||
\textbf{PlaFrIM Inria} & Bordeaux & 120-nodes &(3000+ cores) &(France) \\
|
||
\textbf{GriCAD} & Grenoble & 72-nodes &(1000+ cores) &(France) \\
|
||
\textbf{Max Delbrück Center} & Berlin & 250-nodes &+ workstations &(Allemagne) \\
|
||
\textbf{UMC} & Utrecht & 68-nodes &(1000+ cores) &(Pays-Bas) \\
|
||
\textbf{UTHSC Pangenome} & & 11-nodes &(264 cores) &(USA) \\
|
||
\\
|
||
\quad (le vôtre ?)
|
||
\end{tabular}
|
||
\end{exampleblock}
|
||
|
||
\vspace{-0.65cm}
|
||
\begin{center}
|
||
\includegraphics[width=0.25\paperwidth]{static/guixhpc-logo-transparent-white}
|
||
|
||
\vspace{-0.55cm}
|
||
|
||
\href{https://hpc.guix.info/}{\texttt{https://hpc.guix.info}}
|
||
\end{center}
|
||
|
||
%\vspace{-1.2cm}
|
||
JRES -- Marseille, 2022
|
||
\href{https://zimoun.gitlab.io/jres22-tuto-guix/}{(PDF)}
|
||
\href{https://replay.jres.org/w/3TuYmocHwKtzs7q1VtL1GB}{(Vidéo)}
|
||
|
||
\vspace{-1.cm}
|
||
\begin{flushright}
|
||
\includegraphics[width=0.175\paperwidth]{static/cafe-guix}
|
||
\end{flushright}
|
||
\end{frame}
|
||
|
||
\subsection*{Mémo}
|
||
|
||
|
||
\begin{frame}[fragile]{comment refaire plus tard et là-bas ce qui a été fait aujourd’hui et ici ?}
|
||
\begin{alertblock}{}
|
||
\begin{center}
|
||
\textbf{traçabilité et transparence}
|
||
\end{center}
|
||
\end{alertblock}
|
||
\begin{center}
|
||
\emph{être capable d’étudier bogue-à-bogue}
|
||
\end{center}
|
||
|
||
\begin{exampleblock}{}
|
||
Guix devrait s’occuper de tout
|
||
\begin{center}
|
||
\texttt{guix time-machine -C channels.scm -{}- \emph{cmd} -m manifest.scm}
|
||
\end{center}
|
||
si on spécifie
|
||
\begin{description}
|
||
\item[« comment construire »] \hfill \texttt{channels.scm}
|
||
\item[« quoi construire »] \hfill \texttt{manifest.scm}
|
||
\end{description}
|
||
\end{exampleblock}
|
||
|
||
\end{frame}
|
||
|
||
|
||
|
||
\begin{frame}[plain, noframenumbering]{}
|
||
\begin{center}
|
||
\vfill{}
|
||
\Large{%
|
||
\textbf{%
|
||
Des questions ?%
|
||
}}\normalsize
|
||
|
||
\vfill{}
|
||
\texttt{guix-science@gnu.org}
|
||
|
||
\vfill{}
|
||
\includegraphics[width=0.2\paperwidth]{static/cafe-guix}\\
|
||
\href{https://hpc.guix.info/events/2022/café-guix/}{\texttt{https://hpc.guix.info/events/2022/café-guix/}}
|
||
|
||
\vfill{}
|
||
\vspace{1.5cm}
|
||
\href{https://zimoun.gitlab.io/fcc-inrae/}%
|
||
{Cette présentation voir là\\
|
||
\texttt{{https://zimoun.gitlab.io/fcc-inrae/}}}
|
||
|
||
\vfill{}
|
||
\href{https://archive.softwareheritage.org/swh:1:rev:f722a7ce1a5a98c8b5c1619ba826e034b5090db6;origin=https://gitlab.com/zimoun/fcc-inrae;visit=swh:1:snp:ad6a15c3fc4153ba0b4a6c09f5a62a25f5008304}%
|
||
{(Software Heritage id swh:1:rev:f722a7ce1a5a98c8b5c1619ba826e034b5090db6)}
|
||
|
||
% \vfill{}
|
||
% \tiny{%
|
||
% Copyright \copyright{} 2021 Simon Tournier%
|
||
% }
|
||
\end{center}
|
||
\end{frame}
|
||
|
||
|
||
\end{document}
|