Skip to content

Instantly share code, notes, and snippets.

@atgmello
Last active March 10, 2020 13:11
Show Gist options
  • Save atgmello/838e239b5900c912d5f9e5ccebdfb9cc to your computer and use it in GitHub Desktop.
Save atgmello/838e239b5900c912d5f9e5ccebdfb9cc to your computer and use it in GitHub Desktop.

Revisions

  1. atgmello revised this gist Mar 10, 2020. 1 changed file with 9 additions and 0 deletions.
    9 changes: 9 additions & 0 deletions launch_case.sh
    Original file line number Diff line number Diff line change
    @@ -4,6 +4,8 @@ eval "$(conda shell.bash hook)"

    cd $1

    echo ""

    if [ ! -f osx_env.yml ]; then
    echo "Cant find osx_env.yaml file!"
    exit
    @@ -14,9 +16,16 @@ ds4a_env_name=$(grep "name" osx_env.yml | awk '{print $2}')

    # Activate the right environment
    echo "Activating ${ds4a_env_name}"
    echo "..."
    conda activate ${ds4a_env_name}
    echo "Done!"
    echo ""

    # Launch jupyter notebook
    echo "Launching Jupyter Notebook"
    echo "..."
    echo ""
    jupyter notebook

    echo ""
    echo "All done!"
  2. atgmello created this gist Mar 10, 2020.
    22 changes: 22 additions & 0 deletions launch_case.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,22 @@
    #!/bin/bash

    eval "$(conda shell.bash hook)"

    cd $1

    if [ ! -f osx_env.yml ]; then
    echo "Cant find osx_env.yaml file!"
    exit
    fi

    # Grab correct environment name
    ds4a_env_name=$(grep "name" osx_env.yml | awk '{print $2}')

    # Activate the right environment
    echo "Activating ${ds4a_env_name}"
    conda activate ${ds4a_env_name}

    # Launch jupyter notebook
    jupyter notebook

    echo "All done!"