sinteractive --mem=40g --cpus-per-task=16 --tunnel --time 36:00:00
ssh cn4319
Requires ~/.ssh/config:
Host cn*
User fordmk
ProxyCommand /usr/bin/ssh -o ForwardAgent=yes fordmk@biowulf.nih.gov nc -w 120ms %h %p
#!/bin/bash
port=$(/usr/local/slurm/bin/reconnect_tunnels --list 2> /dev/null)
tmux new-session -d -s jupyter
tmux send-keys -t jupyter "cd /data/$USER; jupyter lab --no-browser --port=$port" C-m
tmux new-session -d -s main
sleep 5
tmux send-keys -t main "cd /data/$USER; get-jupyter-url.sh" C-m
tmux attach -t main
exit 0
#!/bin/bash
result=""
while [[ -z "$result" ]]; do
result=$(jupyter server list 2> /dev/null | grep http | cut -f1 -d' ')
sleep 1
done
echo "$result"
ssh biowulf.nih.gov /usr/local/slurm/bin/reconnect_tunnels
Copy the URL from the output and paste it into your browser.
- Command + shift + p:
Remote-SSH: Connect current window to host... cn4319
├── data
│ ├── external <- Data from third party sources.
| | └── SOURCE.tsv <- Record of data sources
│ ├── interim <- Intermediate data that has been transformed.
│ ├── raw <- The original, immutable data dump.
│ └── results <- Final results
|
├── environment.yml <- Conda environment definition for reproducing
|
├── experiments <- Experiments devided by subdirectory
│ └── 03-04-14.sample-experiment <- Sample demonstrating the structure
│ ├── data -> ../../data/ <- Softlink to data/ for code cleanliness
│ ├── notebooks <- Jupyter notebooks for experiment
| | └── template.ipynb <- Sample notebook containing useful code
│ └── results <- Final reports for communication (e.g. html
| | version of jupyter nb)
│ └── figures <- Figures for reports
|
├── LICENSE
├── README.md <- The top-level README for developers using
| this project.
├── setup.py <- Configuration for installing src/ as python package
|
└── src <- Source code for use in this project.
├── data
│ └── __init__.py
└── __init__.py <- Makes src a Python module
main: Always stable and deployable.develop: Integrates features for the next release.
feature/*: New features or enhancements.release/*: Prepares for a new production release.hotfix/*: Quick fixes for production issues.
- Create a branch from
developfor new features. - Commit changes with meaningful messages.
- Regularly sync with
develop. - Push the branch and open a PR for review.
- After approval, merge the PR and delete the feature branch.
- Use CI tools to ensure code quality and test coverage.
conda update -n base conda
conda install -n base conda-libmamba-solver
conda config --set solver libmamba
Script in data-science-development-project-template to export env to environment.yml
Example:
name: bakir_analysis
channels:
- bioconda
- conda-forge
- defaults
dependencies:
- nextflow
- numpy
- pandas
- python=3.9
- ipykernel
- biopython
- panel
- pyfastx
- yaml
- parasail-python
- mappy
- dill
- matplotlib
- seaborn
- clustalw
- papermill
conda env create -f environment.yml
FROM continuumio/miniconda3
# Set the working directory in the container
WORKDIR /app
# Install git
RUN apt-get update && apt-get install -y git
# Clone the repository
RUN git clone https://github.com/michael-ford/bakir.git
# Create the conda environment
RUN conda env create -f /app/bakir/bakir-env.yml
# Initialize conda in bash shell
RUN conda init bash
# Make RUN commands use the new environment:
SHELL ["conda", "run", "-n", "bakir", "/bin/bash", "-c"]
# Install bakir within the conda environment
RUN pip install /app/bakir
# Ensure commands run inside the conda environment
ENTRYPOINT ["conda", "run", "--no-capture-output", "-n", "bakir", "bakir"]
Host on Docker Hub
Configure automated builds on Docker Hub to build the image when the repository is updated.
singularity pull docker://cdslsahinalp/kir-annotator:latest