Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
A
AKIS Cloud Computing
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
Container 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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Max Melchert
AKIS Cloud Computing
Commits
fcd9f807
Commit
fcd9f807
authored
2 months ago
by
Max Melchert
Browse files
Options
Downloads
Patches
Plain Diff
feat: global conda installation; local conda env
parent
189360e6
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/makefile/basic.mk
+6
-5
6 additions, 5 deletions
src/makefile/basic.mk
src/makefile/makefile
+0
-77
0 additions, 77 deletions
src/makefile/makefile
with
6 additions
and
82 deletions
src/makefile/basic.mk
+
6
−
5
View file @
fcd9f807
...
@@ -5,8 +5,8 @@ SERVER_USER := mmustermann
...
@@ -5,8 +5,8 @@ SERVER_USER := mmustermann
SERVER_HOST
:=
hyrican-1-extern
SERVER_HOST
:=
hyrican-1-extern
## Python Environment
## Python Environment
CONDA_PATH
:=
~/.local
/opt/conda
CONDA_PATH
:=
/opt/conda
CONDA_ENV
:=
ml
CONDA_ENV
:=
~/envs/
ml
PYTHON_VERSION
:=
3.10
PYTHON_VERSION
:=
3.10
PYTHON_PACKAGES
:=
tensorflow-cpu ipympl mypy jupyter pystan
\
PYTHON_PACKAGES
:=
tensorflow-cpu ipympl mypy jupyter pystan
\
matplotlib seaborn scikit-learn openpyxl odfpy pyarrow
\
matplotlib seaborn scikit-learn openpyxl odfpy pyarrow
\
...
@@ -28,13 +28,14 @@ REMOTE_PROJECT_DIR := ~/my_project
...
@@ -28,13 +28,14 @@ REMOTE_PROJECT_DIR := ~/my_project
REMOTE_OUTPUT_FILES
:=
output/
*
REMOTE_OUTPUT_FILES
:=
output/
*
## Misc
## Misc
COPY_LINKS_AS_FILES
?
=
false
COPY_LINKS_AS_FILES
:
=
false
# ---
# ---
LOGIN
:=
$(
SERVER_USER
)
@
$(
SERVER_HOST
)
LOGIN
:=
$(
SERVER_USER
)
@
$(
SERVER_HOST
)
SSH
:=
ssh
$(
LOGIN
)
SSH
:=
ssh
$(
LOGIN
)
RSYNC
:=
rsync
--archive
--compress
--progress
$(
if
$(
filter
true
,
$(
COPY_LINKS_AS_FILES
))
,--copy-links
)
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
CONDA
:=
source
$(
CONDA_PATH
)
/etc/profile.d/conda.sh
&&
conda
.PHONY
:
install upload run kill log download delete
.PHONY
:
install upload run kill log download delete
...
@@ -44,7 +45,7 @@ help: # list targets and usage
...
@@ -44,7 +45,7 @@ help: # list targets and usage
install
:
#
install conda environment
install
:
#
install conda environment
$(
SSH
)
'\
$(
SSH
)
'\
$(
COND
A
)
create -
n
$(
CONDA_ENV
)
python=
$(
PYTHON_VERSION
)
$(
PYTHON_PACKAGES
)
\
$(
MAMB
A
)
create -
p
$(
CONDA_ENV
)
python=
$(
PYTHON_VERSION
)
$(
PYTHON_PACKAGES
)
\
'
'
upload
:
#
upload project files from client to server
upload
:
#
upload project files from client to server
...
@@ -53,7 +54,7 @@ upload: # upload project files from client to server
...
@@ -53,7 +54,7 @@ upload: # upload project files from client to server
run
:
#
execute main script on server
run
:
#
execute main script on server
$(
SSH
)
'\
$(
SSH
)
'\
cd
$(
REMOTE_PROJECT_DIR
)
;\
cd
$(
REMOTE_PROJECT_DIR
)
;\
$(
CONDA
)
activate
$(
CONDA_ENV
)
;\
$(
CONDA
)
activate
-p
$(
CONDA_ENV
)
;\
python
$(
MAIN_SCRIPT
)
;\
python
$(
MAIN_SCRIPT
)
;\
$(
CONDA
)
deactivate;\
$(
CONDA
)
deactivate;\
'
'
...
...
This diff is collapsed.
Click to expand it.
src/makefile/makefile
deleted
100644 → 0
+
0
−
77
View file @
189360e6
# Configuration
## Server
SERVER_USER
:=
mmustermann
SERVER_HOST
:=
hyrican-1-extern
## Python Environment
CONDA_PATH
:=
~/.local/opt/conda
CONDA_ENV
:=
ml
PYTHON_VERSION
:=
3.10
PYTHON_PACKAGES
:=
tensorflow-cpu ipympl mypy jupyter pystan
\
matplotlib seaborn scikit-learn openpyxl odfpy pyarrow
\
geopandas descartes pyogrio optuna plotly tqdm spyder
\
jax-jumpy moviepy shimmy-atari gymnasium-box2d
\
ipywidgets notebook lxml fastparquet zstandard
\
contextily networkx pyvis netgraph pip
## Project Files
MAIN_SCRIPT
:=
main.py
LOG_FILE
:=
progress.log
## Local Project Paths
LOCAL_PROJECT_DIR
:=
.
LOCAL_OUTPUT_DIR
:=
output
## Remote Project Paths
REMOTE_PROJECT_DIR
:=
~/my_project
REMOTE_OUTPUT_FILES
:=
output/
*
## Misc
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
)
CONDA
:=
source
$(
CONDA_PATH
)
/etc/profile.d/conda.sh
&&
conda
.PHONY
:
install upload run kill log download delete
help
:
#
list targets and usage
@
awk
'/^[a-zA-Z0-9_-]+:/{print $1}'
makefile
install
:
#
install conda environment
$(
SSH
)
'\
$(
CONDA
)
create -n
$(
CONDA_ENV
)
python=
$(
PYTHON_VERSION
)
$(
PYTHON_PACKAGES
)
\
'
upload
:
#
upload project files from client to server
$(
RSYNC
)
$(
LOCAL_PROJECT_DIR
)
/
$(
LOGIN
)
:
$(
REMOTE_PROJECT_DIR
)
run
:
#
execute main script on server
$(
SSH
)
'\
cd
$(
REMOTE_PROJECT_DIR
)
;\
$(
CONDA
)
activate
$(
CONDA_ENV
)
;\
python
$(
MAIN_SCRIPT
)
;\
$(
CONDA
)
deactivate;\
'
kill
:
#
terminate the running script on the server
$(
SSH
)
'\
pkill -f
$(
MAIN_SCRIPT
)
\
'
log
:
#
show the last lines of the log file
$(
SSH
)
'\
cd
$(
REMOTE_PROJECT_DIR
)
&& tail -f
$(
LOG_FILE
)
\
'
download
:
#
download output files from server to client
$(
RSYNC
)
$(
LOGIN
)
:
$(
REMOTE_PROJECT_DIR
)
/
$(
REMOTE_OUTPUT_FILES
)
$(
LOCAL_PROJECT_DIR
)
/
$(
LOCAL_OUTPUT_DIR
)
delete
:
#
remove/delete all project files on server
$(
SSH
)
'\
rm -rf
$(
REMOTE_PROJECT_DIR
)
\
'
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