pysupport-exer-internal/README.md

37 lines
1.2 KiB
Markdown
Raw Permalink Normal View History

# DTU Python Support Exercises
Implements the exercises at https://pythonsupport.dtu.dk/internal/exercises.html.
You'll need:
- `bash`: To run the `.sh` script.
- `podman`: To run the exercises in rootless containers.
- `python3`, `python3-pip`, `python3-future`: To pass Exercise 4 (too lazy to containerize `pip show`).
## Running the Exercises
Each exercise will run the corresponding `run.sh` in a rootless container, with `bash -x` (so you can see what they're doing exactly).
To run them all, run:
```
for exer in { exer_1_2 exer_2 exer_3 exer_4 exer_5 exer_6 exer_7 exer_8 }; do
./run.sh $exer
done
```
Each exercise will exit into a bash shell within the container, so you can play around.
**NOTE**: Exercise 3 should fail, as `numpy==1.23` is not compatible with Python 3.11.
**NOTE**: Exercise 4 will fail if system-level `pip` and `future` isn't installed.
## Reuse
These `run.sh` files can be used as templates for the described end-to-end installation procedure.
Note the MIT license.
## Running with Non-Debian Image
This may be useful for testing / as a baseline for testing installation procedures on any OS.
In `run.sh`, simply replace
```
IMAGE="docker.io/debian:bookworm-slim"
```
with the Docker image of the OS you wish to test.