-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Pull Request to Update Farmshare Pathway to create Jupyter Notebooks (#…
…39) * Adding better support for farmshare * Updated setup.sh to delete params.sh file everytime setup is run * Added .singularity option back to singularity-jupyter and singularity-jupyterlab sbatch scripts. * Updated Default Notebook and checks environment variable * Updated setup.sh file for different machine prefixes and added a new prompt for machine prefixeS * Updated Setup file to address Lsof and ssh tunneling * Updated resume.sh for to work in general sense * Updated to generalise all scripts except for ssh tunneling * Keep Resume.sh as hardcoded due to tunneling problems * Added a Boolean Operator for the ssh tunneling * Updated Resume.sh * Updated README.md to include the new subsection SSH Port forwarding considerations in the Setup Section * Formatting Changes for the README port forwarding subsection * Deleting Untested original scripts from the sbatches in farmshare * Update setup.sh to remove extraneous variable of SHERLOCK * Modification to use container maintained by Soham Co-authored-by: Vanessasaurus <[email protected]>
- Loading branch information
1 parent
c7e728c
commit eb91534
Showing
11 changed files
with
149 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,9 @@ | ||
# Farmshare | ||
|
||
Hi friend! These haven't been tested fully yet. Do you want to help? Please work with @vsoch! | ||
1. Go to your home directory in rice. Type `module load singularity`. | ||
2. On Rice,while still in your home directory, type `singularity exec library://sohams/default/farmsharejupyter:latest jupyter notebook --generate-config` | ||
3. Next type, `singularity exec library://sohams/default/farmsharejupyter:latest jupyter notebook password`. Choose a password and verify it. This will serve as the login password for the notebooks. | ||
4. Follow the original tutorial to setup ssh, and fill out the params.sh file by running `bash setup.sh`. Choose a port that is higher than 32768 for the tunnel to work. | ||
5. In order to start type `bash start_farmshare.sh singularity-jupyter` for classic notebook or `bash start_farmshare.sh singularity-jupyterlab` for Jupyter Lab. | ||
6. During establishing the tunnel to the compute node, there will be a prompt for user password and duo factor authentication. | ||
7. See where the notebook is running is at the end of the prompt and type in a browser (http://localhost:(your chosen port number)). The default location of the notebook will be at your scratch location - /farmshare/scratch/users/yourusername |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#!/bin/bash | ||
|
||
# Usage | ||
|
||
# 1. Default Jupyter notebook (with your scratch to work in) | ||
# $ bash start.sh singularity-jupyter | ||
|
||
# 2. Default Jupyter notebook with custom working directory | ||
# $ bash start.sh singularity-jupyter /farmshare/scratch/users/<username> | ||
|
||
# 3. Select your own jupyter container on Sherlock! | ||
# $ bash start.sh singularity-jupyter /farmshare/scratch/users/<username> /path/to/container | ||
|
||
# 4. Or any singularity container... | ||
# $ bash start.sh singularity /path/to/container <args> | ||
|
||
PORT=$1 | ||
NOTEBOOK_DIR=${2:-/farmshare/scratch/users/$USER} | ||
CONTAINER=${3:-library://sohams/default/farmsharejupyter:latest} | ||
|
||
export SINGULARITY_CACHEDIR=/farmshare/user_data/${USER}/.singularity | ||
echo "Container is ${CONTAINER}" | ||
echo "Notebook directory is ${NOTEBOOK_DIR}" | ||
cd ${NOTEBOOK_DIR} | ||
|
||
#Create .local folder for default modules, if doesn't exist | ||
if [ ! -d "${HOME}/.local" ]; | ||
then | ||
echo "Creating local python modules folder to map at ${HOME}/.local"; | ||
mkdir -p "${HOME}/.local"; | ||
fi | ||
|
||
. /etc/profile | ||
module load singularity/3.4.0 | ||
singularity exec --home ${HOME} --bind ${HOME}/.local:/home/username/.local ${CONTAINER} jupyter-lab --no-browser --port=$PORT --ip 0.0.0.0 |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters