-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add environment variable configuration
- Loading branch information
1 parent
0b3cb52
commit c31c81c
Showing
8 changed files
with
40 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
[core] | ||
remote = myremote | ||
['remote "myremote"'] | ||
url = webdavs://tubcloud.tu-berlin.de/remote.php/dav/files/cf531c5e-2043-103b-8745-111da40a61ee/dvcR | ||
url = webdavs://tubcloud.tu-berlin.de/remote.php/dav/files/cf531c5e-2043-103b-8745-111da40a61ee/rDVC | ||
ask_password = true | ||
timeout = 600 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,3 +28,4 @@ NOTES.md | |
# Ignore singularity image | ||
ml-pipeline-image_latest.sif | ||
|
||
local.env |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,11 +17,14 @@ ulimit -u 512 | |
module load singularity/4.0.2 | ||
module load nvidia/cuda/12.2 | ||
|
||
chmod +x unix_set_env.sh | ||
source unix_set_env.sh | ||
|
||
# Check and pull the latest container image | ||
if [ -f ml-pipeline-image_latest.sif ]; then | ||
rm ml-pipeline-image_latest.sif | ||
if [ -f $TUSTU_PROJECT_NAME-image_latest.sif ]; then | ||
rm $TUSTU_PROJECT_NAME-image_latest.sif | ||
fi | ||
singularity pull docker://michaelwitte/ml-pipeline-image:latest | ||
singularity pull docker://$TUSTU_DOCKERHUB_USERNAME/$TUSTU_PROJECT_NAME-image:latest | ||
|
||
echo "Cleaning up the logs directory..." | ||
find ./logs -type f ! -name "slurm-$SLURM_JOB_ID.out" -delete | ||
|
@@ -33,8 +36,8 @@ STORAGE_DEFAULT_DIRECTORY="$PWD" singularity exec --nv --bind $(pwd):/usr/src/ap | |
# Add the github.com host key to the known hosts file | ||
ssh-keyscan github.com >> /root/.ssh/known_hosts && | ||
# Set the git user name and email | ||
git config --global user.name "michaelwitte" && | ||
git config --global user.email "[email protected]" && | ||
git config --global user.name $TUSTU_GITHUB_USERNAME && | ||
git config --global user.email $TUSTU_GITHUB_EMAIL && | ||
# Activate the virtual environment, located at a different path than the containers working directory | ||
source /usr/src/cntnrvenv/bin/activate && | ||
# Pull the latest raw data for the pipeline and run the experiment | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
TUSTU_PROJECT_NAME=ml-pipeline | ||
TUSTU_PYTHON_VERSION=3.12.4 | ||
TUSTU_GITHUB_EMAIL=[email protected] | ||
TUSTU_GITHUB_USERNAME=michaelwitte | ||
TUSTU_DOCKERHUB_USERNAME=michaelwitte |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/bin/bash | ||
|
||
load_env() { | ||
while IFS= read -r line; do | ||
if [ ! -z "$line" ]; then | ||
export "$line" | ||
fi | ||
done < "$1" | ||
echo "Environment variables set from $1." | ||
} | ||
|
||
if [ -f "global.env" ]; then | ||
load_env "global.env" | ||
fi | ||
|