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

refactor: rename CONDA_PATH to SERVER_CONDA_PATH for clarity

parent 732be769
No related branches found
No related tags found
No related merge requests found
......@@ -132,9 +132,9 @@ 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` |
| :------------------ | :------------------------------- | :--------------------------------- |
| `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` |
......
......@@ -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;\
'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment