Skip to content
Snippets Groups Projects
Commit f562b2b3 authored by Max Melchert's avatar Max Melchert
Browse files

docs: add makefile readme

parent e128d374
No related branches found
No related tags found
No related merge requests found
Pipeline #1801 passed
# Makefile
## Voraussetzungen
> Server-Admin kontaktieren
- SSH-Public-Key auf Server
- SSH-Private-Key auf Client
- SSH-Config auf Client konfiguriert
## Installation
1. Makefile [herunterladen](./makefile)
2. Makefile in Projektordner speichern
- Projektstruktur ([Beispiel](#projektstruktur))
3. Makefile [konfigurieren](#konfiguration)
4. `make install`
## Bedienung
> siehe [Befehle](#befehle)
1. `make upload` Projektdateien hochladen
2. `make run` Python-Script ausführen
3. `make log` Fortschritt überprüfen
4. `make download` Output-Dateien herunterladen
---
## Projektstruktur
> Beispiel
```txt
/home/max/akis/my_project/
├── data
│ ├── one.pkl
│ ├── three.pkl
│ └── two.pkl
├── main.py
├── makefile
├── output
│ └── empty
└── scripts
├── script-1.py
├── script-2.py
└── script-3.py
```
## Konfiguration
| Variable | Verwendung | Beispiel |
| :-------------------- | :-------------------------------- | :----------------------------------- |
| `SERVER_USER` | Server: User Name | `mmustermann` |
| `SERVER_HOST` | Server: Host Name | `hyrican-1-extern` |
| `CONDA_PATH` | Server: Conda-Installations-Pfad | `/home/mmustermann/.local/opt/conda` |
| `CONDA_ENV` | Server: Conda-Environment-Name | `ml` |
| `PYTHON_VERSION` | Python: Gewünschte Version | `3.10` |
| `PYTHON_PACKAGES` | Python: Benötigte Pakete | `tensorflow-cpu matplotlib optuna` |
| `MAIN_SCRIPT` | Auszuführendes Python-Script [^1] | `main.py` |
| `LOG_FILE` | Log-Datei (optional) [^1] | `progress.log` |
| `LOCAL_PROJECT_DIR` | Client: Projektordner [^1] | `.` |
| `LOCAL_OUTPUT_DIR` | Client: Output-Ordner [^1] | `output` |
| `REMOTE_PROJECT_DIR` | Server: Projektordner [^2] | `/home/mmustermann/akis/my_project` |
| `REMOTE_OUTPUT_FILES` | Server: Output-Dateien [^1] | `output/*.svg output/*pkl` |
[^1]: Relativer Pfad zum Projektordner
[^2]: Absoluter Pfad
## Befehle
> `make <target>`
| Target | Aktion | Ort |
| :--------- | :---------------------------------------- | :-------------: |
| `install` | Installiert Python Environment und Pakete | Server |
| `upload` | Läd veränderte Projektdateien hoch | Client → Server |
| `run` | Führt Python Script aus | Server |
| `kill` | Bricht Python Script ab | Server |
| `log` | Zeigt Log-Datei (optional) an | Client |
| `download` | Läd Outputdateien herunter | Server → Client |
| `delete` | Löscht Projektdateien | Server |
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment