Skip to content
Snippets Groups Projects
Commit d539a0f1 authored by Jeremy Auguste's avatar Jeremy Auguste
Browse files

Update to pylauncher

parent 1f0880c1
No related branches found
No related tags found
No related merge requests found
...@@ -4,11 +4,13 @@ if [[ $# -lt 2 ]]; then ...@@ -4,11 +4,13 @@ if [[ $# -lt 2 ]]; then
echo "Usage: $0 environment_name [OPTIONS] command [arg1..argn]" >&2 echo "Usage: $0 environment_name [OPTIONS] command [arg1..argn]" >&2
echo "OPTIONS:" >&2 echo "OPTIONS:" >&2
echo " -h, --help Show this message" >&2 echo " -h, --help Show this message" >&2
echo " -p, --cuda-path Specify the path where cuda is installed (default: /usr/local/cuda-8.0)" >&2 echo " -p, --cuda-path Specify the path where cuda is installed (default: /usr/local/cuda-10.1)" >&2
echo " -a, --anaconda-path Specify the path where anaconda is installed (default: /storage/raid1/homedirs/jeremy.auguste/.anaconda3)" >&2
exit 1 exit 1
fi fi
cuda_path="/usr/local/cuda-8.0" cuda_path="/usr/local/cuda-10.1"
anaconda_path="/storage/raid1/homedirs/jeremy.auguste/.anaconda3"
while [[ $1 == -* ]]; do while [[ $1 == -* ]]; do
case "$1" in case "$1" in
...@@ -16,11 +18,16 @@ while [[ $1 == -* ]]; do ...@@ -16,11 +18,16 @@ while [[ $1 == -* ]]; do
cuda_path="$2" cuda_path="$2"
shift 2 shift 2
;; ;;
-a|--anaconda-path)
anaconda_path="$2"
shift 2
;;
-h|--help) -h|--help)
echo "Usage: $0 environment_name [OPTIONS] command [arg1..argn]" echo "Usage: $0 environment_name [OPTIONS] command [arg1..argn]"
echo "OPTIONS:" echo "OPTIONS:"
echo " -h, --help Show this message" echo " -h, --help Show this message"
echo " -p, --cuda-path Specify the path where cuda is installed (default: /usr/local/cuda-8.0)" echo " -p, --cuda-path Specify the path where cuda is installed (default: /usr/local/cuda-10.1)"
echo " -a, --anaconda-path Specify the path where anaconda is installed (default: /storage/raid1/homedirs/jeremy.auguste/.anaconda3)"
exit 0 exit 0
;; ;;
*) *)
...@@ -35,6 +42,8 @@ done ...@@ -35,6 +42,8 @@ done
environment="$1" environment="$1"
shift 1 shift 1
source "$anaconda_path/etc/profile.d/conda.sh"
conda activate $environment conda activate $environment
if [[ $environment =~ ^keras.* || $environment =~ ^pytorch.* ]]; then if [[ $environment =~ ^keras.* || $environment =~ ^pytorch.* ]]; then
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment