Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
RM4ES Practicals
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
sepia-pub
mael
RM4ES Practicals
Commits
a4149fcf
Commit
a4149fcf
authored
1 year ago
by
Maël Madon
Browse files
Options
Downloads
Patches
Plain Diff
instruction for install with nix-user-chroot
parent
93327f22
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
README.md
+28
-3
28 additions, 3 deletions
README.md
default.nix
+3
-66
3 additions, 66 deletions
default.nix
util/nix.conf
+6
-0
6 additions, 0 deletions
util/nix.conf
with
37 additions
and
69 deletions
README.md
+
28
−
3
View file @
a4149fcf
...
...
@@ -3,15 +3,40 @@
This repository contains the material for the practical session of course
[
RM4ES
](
https://moodle.univ-tlse3.fr/course/view.php?id=4996
)
given in the Spring semester of 2024.
## Install
Ensure that you are in your home directory (run
`cd`
).
Clone this repository:
```
git clone git@gitlab.irit.fr:sepia-pub/mael/RM4ES-practicals.git
cd RM4ES-practicals
```
TODO: how to install Nix on lab computers
Install [Nix]:
```
bash
# download and install nix-user-chroot, a hack to install nix without root privilege
curl
-L
https://github.com/nix-community/nix-user-chroot/releases/download/1.2.2/nix-user-chroot-bin-1.2.2-x86_64-unknown-linux-musl
--output
nix-user-chroot
# give exec rights
chmod
u+x nix-user-chroot
# download and install nix
./nix-user-chroot ~/.nix bash
-c
"curl -L https://nixos.org/nix/install | bash"
# enable cachix
mkdir
-p
~/.config/nix
&&
cp
~/RM4ES-practicals/util/nix.conf ~/.config/nix
# add a line to your bashrc
echo
'source ~/.nix-profile/etc/profile.d/nix.sh'
>>
~/.bashrc
```
Now, each time you want to test your schedulers, you need to run, from the repository
`RM4ES-practicals`
:
```
bash
~/nix-user-chroot ~/.nix bash
nix-shell
-A
expe
```
Or, as a one-liner:
```
bash
~/nix-user-chroot ~/.nix bash
-c
"nix-shell -A expe"
```
TODO: how to install poetry on lab computers
## Status rn
We can start a small expe!
...
...
This diff is collapsed.
Click to expand it.
default.nix
+
3
−
66
View file @
a4149fcf
...
...
@@ -9,7 +9,6 @@
let
jobs
=
rec
{
evalys
=
kapack
.
evalys
.
overrideAttrs
(
attr
:
rec
{
name
=
"evalys"
;
version
=
"d4d47bd2f4d076730b05f1345b1bf9032cd28753"
;
...
...
@@ -20,77 +19,15 @@ let
};
});
# small shell to dev and test schedulers
dev
=
pkgs
.
mkShell
rec
{
packages
=
[
# kapack.pybatsim-core
pkgs
.
stdenv
.
cc
.
cc
.
lib
# python3Packages.poetry
python3
(
pkgs
.
poetry
.
override
{
python3
=
python3
;
})
# (python3.withPackages
# (ps: with ps; with python3Packages; [
# poetry-core
# ])
# )
];
shellHook
=
''
cd sched
poetry install
export VIRTUAL_ENV_DISABLE_PROMPT=1
poetry shell
''
;
LD_LIBRARY_PATH
=
"
${
pkgs
.
stdenv
.
cc
.
cc
.
lib
}
/lib"
;
};
expe
=
pkgs
.
mkShell
rec
{
buildInputs
=
[
kapack
.
batsim
kapack
.
batsim-410
kapack
.
pybatsim-320
python3Packages
.
matplotlib
evalys
];
QT_QPA_PLATFORM_PLUGIN_PATH
=
with
pkgs
.
libsForQt5
.
qt5
;
"
${
qtbase
.
bin
}
/lib/qt-
${
qtbase
.
version
}
/plugins/platforms"
;
QT_QPA_PLATFORM_PLUGIN_PATH
=
with
pkgs
.
libsForQt5
.
qt5
;
"
${
qtbase
.
bin
}
/lib/qt-
${
qtbase
.
version
}
/plugins/platforms"
;
};
test
=
pkgs
.
mkShell
rec
{
buildInputs
=
[
# pkgs.stdenv.cc.cc.lib
python3Packages
.
poetry-core
pkgs
.
poetry
];
# LD_LIBRARY_PATH="${pkgs.stdenv.cc.cc.lib}/lib";
};
# lib = pkgs.lib;
# pybatsim-example = python3Packages.buildPythonPackage rec {
# pname = "pybatsim-example";
# version = "local";
# format = "pyproject";
# src = lib.sourceByRegex ./sched [
# "^pyproject\.toml$"
# "^poetry\.lock$"
# "^.*\.py$"
# ];
# buildInputs = [
# poetry
# ];
# propagatedBuildInputs = [
# pybatsim-core
# ];
# };
# # example shell that enables to run the example scheduler (run `pybatsim rejector` in the shell)
# example-shell = pkgs.mkShell rec {
# buildInputs = [
# pybatsim-example
# ];
# };
};
in
...
...
This diff is collapsed.
Click to expand it.
util/nix.conf
0 → 100644
+
6
−
0
View file @
a4149fcf
sandbox
=
true
experimental
-
features
=
nix
-
command
flakes
cores
=
4
max
-
jobs
=
auto
substituters
=
https
://
cache
.
nixos
.
org
https
://
capack
.
cachix
.
org
https
://
batsim
.
cachix
.
org
trusted
-
public
-
keys
=
cache
.
nixos
.
org
-
1
:
6
NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY
=
batsim
.
cachix
.
org
-
1
:
IQ
/
4
c8P
/
yzhxQwp6t58LatLcvHz0qMolEHJQz9w9pxc
=
capack
.
cachix
.
org
-
1
:
38
D
+
QFk3JXvMYJuhSaZ
+
3
Nm
/
Qh
+
bZJdCrdu4pkIh5BU
=
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment