(address . guix-patches@gnu.org)(name . zimoun)(address . zimon.toutoune@gmail.com)
* talks/jres-2022: New directory.
---
talks/jres-2022/.gitlab-ci.yml | 52 +
talks/jres-2022/README | 110 +
talks/jres-2022/demo/commands.txt | 119 +
.../demo/mp4/01-getting-started-1-2.txt | 4 +
.../demo/mp4/02-getting-started-3.txt | 6 +
.../demo/mp4/03-getting-started-4.txt | 5 +
.../demo/mp4/04-getting-started-5.txt | 5 +
.../demo/mp4/05-getting-started-6.txt | 5 +
talks/jres-2022/demo/mp4/06-profile.txt | 9 +
talks/jres-2022/demo/mp4/07-generations.txt | 8 +
.../demo/mp4/08-multi-profiles-1.txt | 7 +
talks/jres-2022/demo/mp4/09-shell-ipython.txt | 14 +
talks/jres-2022/demo/mp4/do-chapters.py | 73 +
talks/jres-2022/demo/mp4/videos.txt | 9 +
talks/jres-2022/do-all.sh | 4 +
talks/jres-2022/do-clean.sh | 6 +
talks/jres-2022/do-pres.sh | 8 +
talks/jres-2022/do-supp.sh | 16 +
talks/jres-2022/src/channels.scm | 6 +
talks/jres-2022/src/contenu.tex | 2413 +++++++++++++++++
talks/jres-2022/src/example/config-vm-1.scm | 22 +
talks/jres-2022/src/example/config-vm-2.scm | 13 +
.../src/example/mock-define-python.scm | 9 +
.../jres-2022/src/example/some-python-bis.scm | 11 +
.../src/example/some-python-with-gcc7.scm | 13 +
talks/jres-2022/src/example/some-python.scm | 6 +
talks/jres-2022/src/header.tex | 86 +
talks/jres-2022/src/listings-scheme.tex | 97 +
talks/jres-2022/src/manifest.scm | 26 +
talks/jres-2022/src/presentation.tex | 70 +
talks/jres-2022/src/static/Guix-white.pdf | Bin 0 -> 8483 bytes
talks/jres-2022/src/static/LOGO-JRES-2022.png | Bin 0 -> 18956 bytes
talks/jres-2022/src/static/cafe-guix.png | Bin 0 -> 17311 bytes
.../jres-2022/src/static/forest-symlinks.pdf | Bin 0 -> 16418 bytes
talks/jres-2022/src/static/graph-python.png | Bin 0 -> 479843 bytes
.../static/guixhpc-logo-transparent-white.pdf | Bin 0 -> 8808 bytes
talks/jres-2022/src/static/u-paris.png | Bin 0 -> 7104 bytes
talks/jres-2022/src/supplement.tex | 282 ++
.../src/support-notes-additionnelles.tex | 58 +
.../support-notes-additionnelles.20220519.pdf | Bin 0 -> 3948392 bytes
talks/jres-2022/talk.20220519.pdf | Bin 0 -> 1077431 bytes
41 files changed, 3572 insertions(+)
create mode 100644 talks/jres-2022/.gitlab-ci.yml
create mode 100644 talks/jres-2022/README
create mode 100644 talks/jres-2022/demo/commands.txt
create mode 100644 talks/jres-2022/demo/mp4/01-getting-started-1-2.txt
create mode 100644 talks/jres-2022/demo/mp4/02-getting-started-3.txt
create mode 100644 talks/jres-2022/demo/mp4/03-getting-started-4.txt
create mode 100644 talks/jres-2022/demo/mp4/04-getting-started-5.txt
create mode 100644 talks/jres-2022/demo/mp4/05-getting-started-6.txt
create mode 100644 talks/jres-2022/demo/mp4/06-profile.txt
create mode 100644 talks/jres-2022/demo/mp4/07-generations.txt
create mode 100644 talks/jres-2022/demo/mp4/08-multi-profiles-1.txt
create mode 100644 talks/jres-2022/demo/mp4/09-shell-ipython.txt
create mode 100644 talks/jres-2022/demo/mp4/do-chapters.py
create mode 100644 talks/jres-2022/demo/mp4/videos.txt
create mode 100755 talks/jres-2022/do-all.sh
create mode 100755 talks/jres-2022/do-clean.sh
create mode 100755 talks/jres-2022/do-pres.sh
create mode 100755 talks/jres-2022/do-supp.sh
create mode 100644 talks/jres-2022/src/channels.scm
create mode 100644 talks/jres-2022/src/contenu.tex
create mode 100644 talks/jres-2022/src/example/config-vm-1.scm
create mode 100644 talks/jres-2022/src/example/config-vm-2.scm
create mode 100644 talks/jres-2022/src/example/mock-define-python.scm
create mode 100644 talks/jres-2022/src/example/some-python-bis.scm
create mode 100644 talks/jres-2022/src/example/some-python-with-gcc7.scm
create mode 100644 talks/jres-2022/src/example/some-python.scm
create mode 100644 talks/jres-2022/src/header.tex
create mode 100644 talks/jres-2022/src/listings-scheme.tex
create mode 100644 talks/jres-2022/src/manifest.scm
create mode 100644 talks/jres-2022/src/presentation.tex
create mode 100644 talks/jres-2022/src/static/Guix-white.pdf
create mode 100644 talks/jres-2022/src/static/LOGO-JRES-2022.png
create mode 100644 talks/jres-2022/src/static/cafe-guix.png
create mode 100644 talks/jres-2022/src/static/forest-symlinks.pdf
create mode 100644 talks/jres-2022/src/static/graph-python.png
create mode 100644 talks/jres-2022/src/static/guixhpc-logo-transparent-white.pdf
create mode 100644 talks/jres-2022/src/static/u-paris.png
create mode 100644 talks/jres-2022/src/supplement.tex
create mode 100644 talks/jres-2022/src/support-notes-additionnelles.tex
create mode 100644 talks/jres-2022/support-notes-additionnelles.20220519.pdf
create mode 100644 talks/jres-2022/talk.20220519.pdf
Toggle diff (572 lines)
diff --git a/talks/jres-2022/.gitlab-ci.yml b/talks/jres-2022/.gitlab-ci.yml
new file mode 100644
index 0000000..6d7f55c
--- /dev/null
+++ b/talks/jres-2022/.gitlab-ci.yml
@@ -0,0 +1,52 @@
+stages:
+ - tex2pdf
+ - deploy
+
+pdf:
+ image:
+ name: zimoun/jres
+ stage: tex2pdf
+ script:
+ - mkdir public && cd src
+ - rubber --pdf presentation.tex
+ - rubber --pdf support-notes-additionnelles.tex
+ - mv *.pdf ../public/
+ artifacts:
+ paths:
+ - public
+ only:
+ - main
+
+pages:
+ image:
+ name: zimoun/jres
+ stage: deploy
+ script:
+ - |
+ cat > public/index.html <<EOF
+ <?xml version="1.0" encoding="utf-8"?>
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+ <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
+ <head>
+ <title>Reproductibilité des environnements logiciels avec GNU Guix</title>
+ <meta name="author" content="Simon Tournier" />
+ </head>
+ <body>
+ <div id="content" class="content">
+ <h1 class="title">Reproductibilité des environnements logiciels avec GNU Guix</h1>
+ <ul class="org-ul">
+ <li><a href="presentation.pdf">presentation.pdf</a></li>
+ <li><a href="support-notes-additionnelles.pdf">support-notes-additionnelles.pdf</a></li>
+ </ul>
+ </div>
+ <p>Simon Tournier</p>
+ <p>JRES 2022 - Marseille</p>
+ </body>
+ </html>
+ EOF
+ artifacts:
+ paths:
+ - public
+ only:
+ - main
diff --git a/talks/jres-2022/README b/talks/jres-2022/README
new file mode 100644
index 0000000..2785cb2
--- /dev/null
+++ b/talks/jres-2022/README
@@ -0,0 +1,110 @@
+# -*- mode:org -*-
+
+Original Git repo: https://gitlab.com/zimoun/jres22-tuto-guix
+SWH archive: https://archive.softwareheritage.org/swh:1:rev:8a378f2f833dd28ea71d38e7fc45bac10fe122d5
+
+Visible: https://zimoun.gitlab.io/jres22-tuto-guix/
+Web archive: https://web.archive.org/web/20220520150253/https://zimoun.gitlab.io/jres22-tuto-guix/
+
+This repository contains the all material to run the tutorial about Guix
+presented at [[https://www.jres.org/][JRES 2022]]. The language of the conference is French, thus this
+material is initially written in French.
+
+The version of the presentation for the D-day is tagged 'pres-d-day'
+corresponnding to commit 6ff987583173ab5a0bc65708f8bf2482c7390eb0.
+
+* Get PDF from source
+
+#+begin_src bash
+ cd src
+ guix time-machine -C channels.scm \
+ -- shell -C -m manifest.scm \
+ -- rubber --pdf presentation.tex
+#+end_src
+
+* Record Gif
+
+#+begin_src bash
+ export PS1="\[\033[0;34m\]alice@laptop:\w$ \[\033[0;30m\] "
+
+ if [ -n "$GUIX_ENVIRONMENT" ]; then
+ export PS1="\[\033[0;34m\]alice@laptop:\w\[\033[0;30m\] [env]$ "
+ fi
+
+#+end_src
+
+#+begin_src bash
+ # Fix <https://issues.guix.gnu.org/51202#3>
+ # addition of: gtk+ gsettings-desktop-schemas
+ guix time-machine -C channels.scm \
+ -- shell peek ffmpeg gtk+ gsettings-desktop-schemas \
+ -- peek
+#+end_src
+
+* Capture Video
+
+#+begin_src bash
+ guix time-machine -C channels.scm \
+ -- shell obs \
+ -- obs
+#+end_src
+
+** Resolution (screen from desktop)
+ - 1920x1080 Base
+ - 1920x1080 Output
+ - Downscale filter: Bicubic (sharpened scaling, 16 samples)x
+ - Common FPS values 60
+
+** Recording / Streaming
+ - 2500 Kbps / audio bitrate 160
+ - Medium file size
+ - mp4
+ - x264
+
+* Chapters
+
+#+begin_src bash
+ guix time-machine -C channels.scm \
+ -- shell ffmpeg python-minimal
+#+end_src
+
+
+Be careful, the Python help is a quick too simplistic script.
+
+#+begin_src bash
+ ffmpeg -i INPUT.mp4 -f ffmetadata META.txt
+ python3 do-chapters.py CHAPS.txt
+ cat META.txt CHAPS.txt.meta > CHAPS.meta
+ ffmpeg -i INPUT.mp4 -i CHAPS.meta -map_metadata 1 -codec copy OUTPUT.mp4
+#+end_src
+
+For each video, end with a title at video length time.
+
+* Merge videos
+
+#+begin_src bash
+ guix time-machine -C channels.scm \
+ -- shell ffmpeg python-minimal
+#+end_src
+
+
+The file =videos.txt= contains the list of videos
+
+#+begin_src text
+ file 'test.mp4'
+ file 'test2.mp4'
+#+end_src
+
+#+begin_src bash
+ ffmpeg -f concat -safe 0 -i videos.txt -c copy demos.mp4
+#+end_src
+
+#+begin_src bash
+ ffmpeg -i INPUT.mp4 -f ffmetadata META.txt
+ python3 do-chapters.py CHAPS.txt CHAPS2.txt
+ cat META.txt merged.meta > video.meta
+ ffmpeg -i video.mp4 -i video.meta -map_metadata 1 -codec copy video_chapters.mp4
+#+end_src
+
+The Python script =do-chapters.py= reads, at the finest, seconds when it would
+require a finer scale. Especially, see =08-multi-profiles-1.txt=.
diff --git a/talks/jres-2022/demo/commands.txt b/talks/jres-2022/demo/commands.txt
new file mode 100644
index 0000000..a2f06a7
--- /dev/null
+++ b/talks/jres-2022/demo/commands.txt
@@ -0,0 +1,119 @@
+# -*- mode:org -*-
+
+* 01
+
+guix search dynamically-typed programming language
+guix show python
+
+* 02
+
+which python3
+python3
+guix install python
+guix package --search-paths
+
+which python3
+
+GUIX_PROFILE=/home/alice/.guix-profile
+. $GUIX_PROFILE/etc/profile
+which python3
+python3
+>> import this
+
+* 03
+
+guix insall python-ipython python-numpy
+guix package --search-paths
+which python3
+python3
+import numpy as np
+x = np.linspace(0,1,20)
+which ipython
+ipython
+import numpy as np
+x = np.linspace(0,1,20)
+
+* 04
+
+which ipython
+guix remove python-ipython
+which ipython
+ipython
+
+* 05
+
+guix install python-matplotlib python-scipy
+guix package --search-paths
+python3 plot.py
+
+* 06
+
+env | grep ^PATH
+GUIX_PROFILE=$HOME/.guix-profile
+cat $GUIX_PROFILE/etc/profile
+guix package --search-paths
+guix package --search-paths=prefix
+guix package --search-paths=suffix
+. GUIX_PROFILE/etc/profile # == eval $(guix package --search-paths=prefix)
+clear
+
+ls $GUIX_PROFILE
+guix install tree
+clear
+
+tree -L 1 $GUIX_PROFILE
+
+* 07
+
+guix package --list-generations
+CLICK
+
+which tree
+guix package --roll-back
+which tree
+tree
+
+guix package --list-generations
+CLICK
+
+which ipython
+guix package --switch-generations=2
+ipython
+guix package --list-generations
+
+guix package --switch-generation=5
+ipython
+
+* 08
+
+guix install python-ipython --profile=outils
+guix package --search-paths --profile=outils
+env | grep ^PATH
+eval $(guix package --search-paths=suffix --profile-outils)
+env | grep ^PATH
+CLICK
+which ipython
+tree -L 1 outils
+ls -l
+
+* 09
+
+ls -d */
+cd project-foo && ls
+python3 some-fun.py
+guix shell --manifest=some-python-pkgs.scm
+python3 some-fun.py
+^D
+guix shell -m some-python-pkgs.scm --pure
+ls
+cd ../project-bar
+^D
+guix shell -m some-python-pkgs.scm --container
+ls
+cd ../project-bar
+python3 some-fun.py
+^D
+guix shell -m some-python-pkgs.scm --container python-ipython
+ipython
+^D
+python3 some-fun.py
diff --git a/talks/jres-2022/demo/mp4/01-getting-started-1-2.txt b/talks/jres-2022/demo/mp4/01-getting-started-1-2.txt
new file mode 100644
index 0000000..2ffb66a
--- /dev/null
+++ b/talks/jres-2022/demo/mp4/01-getting-started-1-2.txt
@@ -0,0 +1,4 @@
+00:00 -
+00:05 guix search
+00:32 guix show
+00:36 done 01
diff --git a/talks/jres-2022/demo/mp4/02-getting-started-3.txt b/talks/jres-2022/demo/mp4/02-getting-started-3.txt
new file mode 100644
index 0000000..7706020
--- /dev/null
+++ b/talks/jres-2022/demo/mp4/02-getting-started-3.txt
@@ -0,0 +1,6 @@
+00:00 -
+00:22 guix install python
+00:38 guix package --search-paths #1
+00:57 GUIX_PROFILE
+01:10 python3 (from Guix)
+01:22 done 02
diff --git a/talks/jres-2022/demo/mp4/03-getting-started-4.txt b/talks/jres-2022/demo/mp4/03-getting-started-4.txt
new file mode 100644
index 0000000..366ff4f
--- /dev/null
+++ b/talks/jres-2022/demo/mp4/03-getting-started-4.txt
@@ -0,0 +1,5 @@
+00:00 -
+00:12 guix install python-ipython python-numpy
+02:10 guix package --search-paths #2
+02:15 python3 with numpy
+03:14 done 03
diff --git a/talks/jres-2022/demo/mp4/04-getting-started-5.txt b/talks/jres-2022/demo/mp4/04-getting-started-5.txt
new file mode 100644
index 0000000..8a0e0b8
--- /dev/null
+++ b/talks/jres-2022/demo/mp4/04-getting-started-5.txt
@@ -0,0 +1,5 @@
+00:00 -
+00:06 ipython
+00:13 guix remove python-ipython
+00:24 ipython (removed)
+00:30 done 04
diff --git a/talks/jres-2022/demo/mp4/05-getting-started-6.txt b/talks/jres-2022/demo/mp4/05-getting-started-6.txt
new file mode 100644
index 0000000..bb4dbee
--- /dev/null
+++ b/talks/jres-2022/demo/mp4/05-getting-started-6.txt
@@ -0,0 +1,5 @@
+00:00 -
+00:12 guix install python-matplotlib python-scipy
+02:04 guix package --search-paths #3
+02:11 python3 plot.py
+02:18 done 05
diff --git a/talks/jres-2022/demo/mp4/06-profile.txt b/talks/jres-2022/demo/mp4/06-profile.txt
new file mode 100644
index 0000000..1994571
--- /dev/null
+++ b/talks/jres-2022/demo/mp4/06-profile.txt
@@ -0,0 +1,9 @@
+00:00 -
+00:24 cat $GUIX_PROFILE
+00:34 breath
+00:42 guix package --search-paths=prefix
+00:47 guix package --search-paths=suffix
+01:11 eval $(guix package --search-paths=prefix)
+01:21 ls $GUIX_PROFILE
+01:35 tree $GUIX_PROFILE
+01:38 done 06
diff --git a/talks/jres-2022/demo/mp4/07-generations.txt b/talks/jres-2022/demo/mp4/07-generations.txt
new file mode 100644
index 0000000..eff2daf
--- /dev/null
+++ b/talks/jres-2022/demo/mp4/07-generations.txt
@@ -0,0 +1,8 @@
+00:00 -
+00:07 guix package --list-generations #1
+00:20 guix package --roll-back
+00:31 guix package --list-generations (4) #2
+00:54 guix package --switch-generation=2
+01:10 guix package --list-generations (2) #3
+01:20 guix package --switch-generation=5
+01:31 done 07
diff --git a/talks/jres-2022/demo/mp4/08-multi-profiles-1.txt b/talks/jres-2022/demo/mp4/08-multi-profiles-1.txt
new file mode 100644
index 0000000..0479e88
--- /dev/null
+++ b/talks/jres-2022/demo/mp4/08-multi-profiles-1.txt
@@ -0,0 +1,7 @@
+00:00 -
+00:13 guix install --profile
+00:26 guix package --search-paths --profile
+00:54 eval $(guix package --search-paths=suffix --profile)
+01:23 tree profile
+01:27 ls -l profile
+01:29 done 08
diff --git a/talks/jres-2022/demo/mp4/09-shell-ipython.txt b/talks/jres-2022/demo/mp4/09-shell-ipython.txt
new file mode 100644
index 0000000..9846760
--- /dev/null
+++ b/talks/jres-2022/demo/mp4/09-shell-ipython.txt
@@ -0,0 +1,14 @@
+00:00 -
+00:05 ls -d
+00:17 python3 some-fun.py (fail)
+00:29 guix shell --manifest
+00:37 python3 some-fun.py (success)
+00:41 guix shell --pure
+00:54 exit pure shell
+00:59 guix shell --container
+01:20 exit containerized shell
+01:26 guix shell python-ipython
+01:36 ipython in container
+01:47 exit
+01:55 python3 some-fun.py (fail again)
+01:59 done 09
diff --git a/talks/jres-2022/demo/mp4/do-chapters.py b/talks/jres-2022/demo/mp4/do-chapters.py
new file mode 100644
index 0000000..9a6a73b
--- /dev/null
+++ b/talks/jres-2022/demo/mp4/do-chapters.py
@@ -0,0 +1,73 @@
+#!/bin/env python3
+
+import re
+
+def read_chapters(filename):
+ print("Read chapters from {}...".format(filename), sep=" ", end="")
+
+ with open(filename, 'r') as f:
+ chapters = list()
+ for line in f:
+ try:
+ x = re.match(r"(\d{2}):(\d{2}) (.*)", line)
+ except:
+ print("Error: excepted format 'XY:uv The title'")
+ return
+
+ mins = int(x.group(1))
+ secs = int(x.group(2))
+ title = x.group(3)
+
+ minutes = mins
+ seconds = secs + (minutes * 60)
+ timestamp = (seconds * 1000)
+ chap = {
+ "title": title,
+ "time": timestamp
+ }
+ chapters.append(chap)
+
+ print("done.")
+ return chapters
+
+
+def generate_meta(chapters, offset=0):
+ print("Generate meta...", sep=" ", end="")
+
+ text = ""
+ for i in range(len(chapters)-1): # Require unnecessary mm:ss Stop
+ chap = chapters[i]
+ title = chap['title']
+ start = chap['time'] + offset
+ end = chapters[i+1]['time']-1 + offset
+ text += f"""
+[CHAPTER]
+TIMEBASE=1/1000
+START={start}
+END={end}
+title={title}
+"""
+
+ print("done.")
+ return text, end
+
+if __name__ == "__main__":
+ import sys
+ try:
+ offset = 0
+ for i, filename in enumerate(sys.argv[1:]):
+ chapters= read_chapters(filename)
+ text, offset = generate_meta(chapters, offset)
+ if len(sys.argv) > 2:
+ out, perm = "merged.meta", 'a'
+ if i == 0:
+ with open(out, 'w') as f:
+ f.write('')
+ else:
+ out, perm = filename + '.meta', 'w'
+ with open(out, perm) as f:
+ f.write(text)
+ print("Wrote {}".format(out))
+ except:
+ print("Error.")
+ sys.exit(1)
diff --git a/talks/jres-2022/demo/mp4/videos.txt b/talks/jres-2022/demo/mp4/videos.txt
new file mode 100644
index 0000000..521a4e8
--- /dev/null
+++ b/talks/jres-2022/demo/mp4/videos.txt
@@ -0,0 +1,9 @@
+file '01-getting-started-1-2_raw.mp4'
+file '02-getting-started-3_raw.mp4'
+file '03-getting-started-4_raw.mp4'
+file '04-getting-started-5_raw.mp4'
+file '05-getting-started-6_raw.mp4'
+file '06-profile_raw.mp4'
+file '07-generations_raw.mp4'
+file '08-multi-profiles-1_raw.mp4'
+file '09-shell-ipython_raw.mp4'
diff --git a/talks/jres-2022/do-all.sh b/talks/jres-2022/do-all.sh
new file mode 100755
index 0000000..96a9d51
--- /dev/null
+++ b/talks/jres-2022/do-all.sh
@@ -0,0 +1,4 @@
+#!/usr/bin/env bash
+
+./do-pres.sh
+./do-supp.sh
diff --git a/talks/jres-2022/do-clean.sh b/talks/jres-2022/do-clean.sh
new file mode 100755
index 0000000..5121cbb
--- /dev/null
+++ b/talks/jres-2022/do-clean.sh
@@ -0,0 +1,6 @@
+#!/usr/bin/env bash
+
+for ext in vrb aux log nav out snm toc;
+do
+ find src/ -name "*.${ext}" -type f -print -exec rm {} \;
+done
diff --git a/talks/jres-2022/do-pres.sh b/talks/jres-2022/do-pres.sh
new file mode 100755
index 0000000..2e01d14
--- /dev/null
+++ b/talks/jres-2022/do-pres.sh
@@ -0,0 +1,8 @@
+#!/usr/bin/env bash
+
+here=$(pwd)
+cd src
+guix time-machine -C channels.scm \
+ -- shell -C -m manifest.scm \
+ -- rubber --pdf presentation.tex
+cd $here
diff --git a/talks/jres-2022/do-supp.sh b/talks/jres-2022/do-supp.sh
new file mode 100755
index 0000000..08dacef
--- /dev/null
+++ b/talks/jres-2022/do-supp.sh
@@ -0,0 +1,16 @@
+#!/usr/bin/env bash
+
+here=$(pwd)
+cd src
+if [ -f presentation.snm ]
+then
+ guix time-machine -C channels.scm \
+ -- shell -C -m manifest.scm \
+ -- rubber --pdf support-notes-additionnelles.tex
+fi
+cd $here
+
+if [ ! -f src/presentation.snm ]
+then
+ ./do-all.sh
+fi
diff --git a/talks/jres-2022/src/channels.scm b/talks/jres-2022/src/channels.scm
new file mode 100644
index 0000000..7df15c6
-
This message was truncated. Download the full message here.