From b09fd4f8961b9b29f5753463b8dea40506be5468 Mon Sep 17 00:00:00 2001 From: Max Melchert <maximilian.melchert@stud.hs-bochum.de> Date: Fri, 14 Mar 2025 13:31:31 +0100 Subject: [PATCH] refactor: rename CONDA_PATH to SERVER_CONDA_PATH for clarity --- src/makefile/README.md | 12 ++++++------ src/makefile/basic.mk | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/makefile/README.md b/src/makefile/README.md index 01731f0..edde22c 100644 --- a/src/makefile/README.md +++ b/src/makefile/README.md @@ -131,12 +131,12 @@ Sie werden durch den Aufruf von `make download` im zuvor definierten Ordner `LOC ### Python Environment -| Variable | Verwendung | Beispiel | -| :---------------- | :------------------------------- | :--------------------------------- | -| `CONDA_PATH` | Server: Conda-Installations-Pfad | `/opt/conda` | -| `CONDA_ENV` | Server: Conda-Environment-Pfad | `~/envs/ml` | -| `PYTHON_VERSION` | Python: Gewünschte Version | `3.10` | -| `PYTHON_PACKAGES` | Python: Benötigte Pakete | `tensorflow-cpu matplotlib optuna` | +| Variable | Verwendung | Beispiel | +| :------------------ | :------------------------------- | :--------------------------------- | +| `SERVER_CONDA_PATH` | Server: Conda-Installations-Pfad | `/opt/conda` | +| `SERVER_CONDA_ENV` | Server: Conda-Environment-Pfad | `~/envs/ml` | +| `PYTHON_VERSION` | Python: Gewünschte Version | `3.10` | +| `PYTHON_PACKAGES` | Python: Benötigte Pakete | `tensorflow-cpu matplotlib optuna` | ### Project Paths diff --git a/src/makefile/basic.mk b/src/makefile/basic.mk index a67abfb..7a6d450 100644 --- a/src/makefile/basic.mk +++ b/src/makefile/basic.mk @@ -5,8 +5,8 @@ SERVER_USER := mmustermann SERVER_HOST := hyrican-1-extern ## Python Environment -CONDA_PATH := /opt/conda -CONDA_ENV := ~/envs/ml +SERVER_CONDA_PATH := /opt/conda +SERVER_CONDA_ENV := ~/envs/ml PYTHON_VERSION := 3.10 PYTHON_PACKAGES := tensorflow-cpu ipympl mypy jupyter pystan \ matplotlib seaborn scikit-learn openpyxl odfpy pyarrow \ @@ -36,8 +36,8 @@ COPY_LINKS_AS_FILES := false LOGIN := $(SERVER_USER)@$(SERVER_HOST) SSH := ssh $(LOGIN) RSYNC := rsync --archive --compress --progress $(if $(filter true,$(COPY_LINKS_AS_FILES)),--copy-links) -MAMBA := source $(CONDA_PATH)/etc/profile.d/conda.sh && mamba # TODO: mamba.sh -CONDA := source $(CONDA_PATH)/etc/profile.d/conda.sh && conda +MAMBA := source $(SERVER_CONDA_PATH)/etc/profile.d/conda.sh && mamba # TODO: mamba.sh +CONDA := source $(SERVER_CONDA_PATH)/etc/profile.d/conda.sh && conda .PHONY: install upload run kill log download delete @@ -46,7 +46,7 @@ help: # list targets and usage install: # install conda environment $(SSH) '\ - $(MAMBA) create -p $(CONDA_ENV) python=$(PYTHON_VERSION) $(PYTHON_PACKAGES)\ + $(MAMBA) create -p $(SERVER_CONDA_ENV) python=$(PYTHON_VERSION) $(PYTHON_PACKAGES)\ ' upload: # upload project files from client to server @@ -55,7 +55,7 @@ upload: # upload project files from client to server run: # execute main script on server $(SSH) '\ cd $(REMOTE_PROJECT_DIR);\ - $(CONDA) activate $(CONDA_ENV);\ + $(CONDA) activate $(SERVER_CONDA_ENV);\ python $(MAIN_SCRIPT);\ $(CONDA) deactivate;\ ' -- GitLab