Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 800455a9 authored by Simon Tournier's avatar Simon Tournier
Browse files

Add exos.

parent bafa02d6
No related branches found
No related tags found
No related merge requests found
../intro/channels.scm
\ No newline at end of file
../intro/do-clean.sh
\ No newline at end of file
#!/usr/bin/env bash
guix time-machine -C channels.scm \
-- shell --container -m manifest.scm \
-- rubber --pdf exos-tuto-Guix-UGA2022.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=.20\paperwidth,ht=2.25ex,dp=1ex,left]{author in head/foot}%
\usebeamerfont{author in head/foot}Open Science Days@UGA
\end{beamercolorbox}%
\begin{beamercolorbox}[wd=.65\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[Toward reproducible research using Guix]%
{Reproducible deployment for scientific software using GNU Guix}
\author{Ludovic Courtès, Konrad Hinsen, Simon Tournier}
\date{December, 14th, 2022}
\institute{%
\texttt{ludovic.courtes@inria.fr}\\
\texttt{konrad.hinsen@cnrs.fr}\\
\texttt{simon.tournier@inserm.fr}}
\hypersetup{
pdfauthor={Courtès, Hinsen, Tournier},
pdftitle={Reproducible deployment for scientific software using GNU Guix},
pdfkeywords={GNU Guix, reproducible research, open science, package manager, virutal machine},
pdfsubject={GNU Guix},
pdfcreator={with love},
pdflang={English}}
%
% Document
%
\begin{document}
\begin{frame}{Warm-up: First things first}
\begin{enumerate}
\item Install the packages \texttt{git-minimal} and \texttt{which}
\item Clone the repository
\href{https://gitlab.inria.fr/guix-hpc/open-science-days-tutorial}%
{https://gitlab.inria.fr/guix-hpc/open-science-days-tutorial}
and go inside
\end{enumerate}
\end{frame}
\begin{frame}{Warm-up: Yet another package manager}
\begin{enumerate}
\item Search with the terms \texttt{high-performance}, \texttt{dynamic},
\texttt{language}
\item Display the information corresponding to the Julia package
\item Install the Julia package and start the Julia REPL (\texttt{julia},
quite \emph{Control-D})
\item Install other Julia packages: PyPlot and DataFrames
\item Try \texttt{guix package -{}-list-generations}
\item Remove the package \texttt{julia-pyplot}
\item Try \texttt{guix package -{}-roll-back} and list again the generations
\item Remove PyPlot and install the Julia packages CSV and Zygote with
only one command-line
\item Try \texttt{guix package -{}-list-installed}
\end{enumerate}
\end{frame}
\begin{frame}{\texttt{guix shell}}
\begin{enumerate}
\item Create a shell with the Python packages Python, Pandas, Numpy and
Matplotlib
Start \texttt{python3} and try \texttt{import numpy}
Exit the created shell with \texttt{exit} or \emph{Control-D}
\item Create a manifest file containing these Python packages
\item Start a new shell using this manifest file
Run the script \texttt{python/co2.py}
Exit the created shell.
\item Create a new shell and run the script with one command-line
\item Create a new shell using the previous manifest file and start the
IPython REPL instead
Try \texttt{\%run python/co2.py} then \texttt{x.shape}, exit and exit.
\item Using the previous manifest, start a new shell using the IPython REPL
but unsetting all the existing environment variables
Try \texttt{which ipython}. Compare with \texttt{echo \$GUIX\_ENVIRONMENT}.
Exit.
\end{enumerate}
\end{frame}
\begin{frame}{\texttt{guix shell} again}
\begin{enumerate}
\item Run the script \texttt{python/co2.py} inside a container.
Try \texttt{which ipython}. Try to list other directories. Exit.
\item Create a new shell using the manifest file and using IPython and
adding Emacs too
\item Idem but containerized. Start Emacs. Exit.
\item Re-try considering the option \texttt{-{}-network}.
Try to preserve the environment variable \texttt{TERM} and
\texttt{DISPLAY}
Start Emacs in this container. Exit.
\end{enumerate}
\end{frame}
\begin{frame}{Example: \texttt{article/the-article.pdf}}
\begin{enumerate}
\item Try to reproduce the figure
\item Try to get the same value (see \texttt{python/co2-bis.py})
\end{enumerate}
\vfill
Bonus: try \texttt{guix lint -c archive python-scikit-learn}
and browse
\href{https://archive.softwareheritage.org/save/list/}{https://archive.softwareheritage.org/save/list/}
\end{frame}
\end{document}
../intro/manifest.scm
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment