Skip to content

Commit

Permalink
export PORT
Browse files Browse the repository at this point in the history
  • Loading branch information
xpillons committed Sep 28, 2023
1 parent bd9637b commit aeec8fb
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,10 @@ THIS_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
[[ $(type -t module) == "function" ]] && export -f module

# Find available port to run server on
port=$(find_port ${host})
export port=$(find_port ${host})

<%- if OodAppkit.clusters[context.cluster].job_config[:adapter] == 'pbspro' -%>
# TODO : Use the job ID for the container name
export CONTAINER_NAME=rstudio.$PBS_JOBID
$THIS_DIR/get_container.sh <%=context.container_image%> $CONTAINER_NAME
<%- end -%>
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ container_name=$1

echo "container_name=$container_name"
echo "enroot start"
enroot start --rw -e NOTEBOOK_ROOT="$NOTEBOOK_ROOT" -e CONFIG_FILE="$CONFIG_FILE" $container_name $THIS_DIR/start_rstudio.sh
enroot start --rw -e NOTEBOOK_ROOT="$NOTEBOOK_ROOT" -e CONFIG_FILE="$CONFIG_FILE" -e PORT="$port" $container_name $THIS_DIR/start_rstudio.sh
echo "enroot remove"
enroot remove -f $container_name
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ EOF

# Launch the Rstudio server
set -x
/usr/lib/rstudio-server/bin/rserver --www-port ${port}
/usr/lib/rstudio-server/bin/rserver --www-port ${PORT}

0 comments on commit aeec8fb

Please sign in to comment.