From d539a0f15ea713176507ac6f6779853bd20812e6 Mon Sep 17 00:00:00 2001 From: Jeremy Auguste <jeremy.auguste@lis-lab.fr> Date: Wed, 29 Jul 2020 13:40:51 +0200 Subject: [PATCH] Update to pylauncher --- pylauncher.sh | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/pylauncher.sh b/pylauncher.sh index dcf3f03..019a4a5 100755 --- a/pylauncher.sh +++ b/pylauncher.sh @@ -3,12 +3,14 @@ if [[ $# -lt 2 ]]; then echo "Usage: $0 environment_name [OPTIONS] command [arg1..argn]" >&2 echo "OPTIONS:" >&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 " -h, --help Show this message" >&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 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 case "$1" in @@ -16,11 +18,16 @@ while [[ $1 == -* ]]; do cuda_path="$2" shift 2 ;; + -a|--anaconda-path) + anaconda_path="$2" + shift 2 + ;; -h|--help) echo "Usage: $0 environment_name [OPTIONS] command [arg1..argn]" echo "OPTIONS:" 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 ;; *) @@ -35,6 +42,8 @@ done environment="$1" shift 1 +source "$anaconda_path/etc/profile.d/conda.sh" + conda activate $environment if [[ $environment =~ ^keras.* || $environment =~ ^pytorch.* ]]; then -- GitLab