Skip to content

Commit

Permalink
cd works fine
Browse files Browse the repository at this point in the history
  • Loading branch information
neworderofjamie committed Oct 27, 2022
1 parent 3081c0f commit 0dc3d72
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions bin/genn-docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,15 @@ if [[ "$1" = "script" ]]; then
# **YUCK** this should not really be necessary but PyGeNN does
# not work nicely running scripts not in working directory
CWD=$(dirname "$1")
exec gosu genn:genn /bin/bash -c "cd \"$CWD\" && python3 \"$@\""
cd "$CWD"
exec gosu genn:genn python3 "$@"
# Otherwise, if notebook is passes
elif [[ "$1" = "notebook" ]]; then
# Extract working directory from next command line argument, otherwise use home
# Extract notebook directory from next command line argument, otherwise use home
CWD=${2:-$HOME}
exec gosu genn:genn /usr/local/bin/jupyter-notebook --ip=0.0.0.0 --port=8080 --no-browser --notebook-dir="$CWD"
# Otherwise, execute arguments
# Otherwise, change directory to home directory and execute arguments
else
cd $HOME
exec gosu genn:genn "$@"
fi

0 comments on commit 0dc3d72

Please sign in to comment.