Skip to content

Commit

Permalink
Docker tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
diceroll123 committed Jan 5, 2025
1 parent 9bf093e commit 8fde889
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 14 deletions.
10 changes: 9 additions & 1 deletion automation/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,12 @@ services:
- ${PWD}:/app
mem_limit: 15g
stop_signal: SIGINT
command: ['./runner.sh']
command: >
sh -c "
rm -rf ./output &&
mkdir ./output &&
uv sync &&
uv run grab_rounds.py &&
uv run preprocessing.py &&
uv run final.py
"
16 changes: 11 additions & 5 deletions automation/run.sh
Original file line number Diff line number Diff line change
@@ -1,16 +1,22 @@
# Get the directory of the current script
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"

# Change to the script's directory
cd "$DIR"

# Build/run the docker container
docker compose run --rm nfc_values

# copy file from ./output/javascript.js to ../src/app/constants_logit.js
cp ./output/javascript.js ../src/app/constants_logit.js
cp "$DIR/output/javascript.js" "$DIR/../src/app/constants_logit.js"

# stage the changes
git add ./output/
git add ./raw_json/
git add ../src/app/constants_logit.js
git add "$DIR/output/"
git add "$DIR/raw_json/"
git add "$DIR/../src/app/constants_logit.js"

# check if the files exist before committing or pushing
if [ ! -f ./output/javascript.js ]; then
if [ ! -f "$DIR/output/javascript.js" ]; then
exit 1
fi

Expand Down
8 changes: 0 additions & 8 deletions automation/runner.sh

This file was deleted.

0 comments on commit 8fde889

Please sign in to comment.